示例#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
文件: s3.py 项目: a7235365/aws-cli
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')