Пример #1
0
def add_s3(command_table, session, **kwargs):
    """
    This creates a new service object for the s3 plugin.  It sends the
    old s3 commands to the namespace ``s3api``.
    """
    utils.rename_command(command_table, 's3', 's3api')
    command_table['s3'] = S3('s3', session)
Пример #2
0
def add_s3(command_table, session, **kwargs):
    """
    This creates a new service object for the s3 plugin.  It sends the
    old s3 commands to the namespace ``s3api``.
    """
    utils.rename_command(command_table, 's3', 's3api')
    command_table['s3'] = S3('s3', session)
Пример #3
0
    def test_rename_command_table(self):
        handler = lambda command_table, **kwargs: utils.rename_command(command_table, "ec2", "fooec2")
        # Verify that we can rename a top level command.
        self.session.register("building-command-table.main", handler)
        self.driver.main(["fooec2", "help"])
        self.assert_contains("fooec2")

        # We can also see subcommands help as well.
        self.driver.main(["fooec2", "run-instances", "help"])
        self.assert_contains("run-instances")
Пример #4
0
    def test_rename_command_table(self):
        handler = lambda command_table, **kwargs: utils.rename_command(
            command_table, 'ec2', 'fooec2')
        # Verify that we can rename a top level command.
        self.session.register('building-command-table.main', handler)
        self.driver.main(['fooec2', 'help'])
        self.assert_contains('fooec2')

        # We can also see subcommands help as well.
        self.driver.main(['fooec2', 'run-instances', 'help'])
        self.assert_contains('run-instances')
Пример #5
0
    def test_rename_command_table(self):
        handler = lambda command_table, **kwargs: utils.rename_command(
            command_table, 'ec2', 'fooec2')
        # Verify that we can rename a top level command.
        self.session.register('building-command-table.main', handler)
        self.driver.main(['fooec2', 'help'])
        self.assert_contains('fooec2')

        # We can also see subcommands help as well.
        self.driver.main(['fooec2', 'run-instances', 'help'])
        self.assert_contains('run-instances')
Пример #6
0
def change_name(command_table, session, **kwargs):
    """
    Change all existing 'aws codedeploy' commands to 'aws deploy' commands.
    """
    utils.rename_command(command_table, 'codedeploy', 'deploy')
Пример #7
0
def change_name(command_table, session, **kwargs):
    """
    Change all existing 'aws codedeploy' commands to 'aws deploy' commands.
    """
    utils.rename_command(command_table, 'codedeploy', 'deploy')
Пример #8
0
def change_name(command_table, session, **kwargs):
    """
    Change all existing ``aws config`` commands to ``aws configservice``
    commands.
    """
    utils.rename_command(command_table, 'config', 'configservice')