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)
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")
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')
def change_name(command_table, session, **kwargs): """ Change all existing 'aws codedeploy' commands to 'aws deploy' commands. """ utils.rename_command(command_table, 'codedeploy', 'deploy')
def change_name(command_table, session, **kwargs): """ Change all existing ``aws config`` commands to ``aws configservice`` commands. """ utils.rename_command(command_table, 'config', 'configservice')