Esempio n. 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)
Esempio n. 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)
Esempio n. 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")
Esempio n. 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')
Esempio n. 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')
Esempio n. 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')
Esempio n. 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')
Esempio n. 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')