def execute_subcommand(config, subcommand): command_module = getattr(molecule.command, subcommand) command = getattr(command_module, util.camelize(subcommand)) # knowledge of the current action is used by some provisioners # to ensure they behave correctly during certain sequence steps, # particulary the setting of ansible options in create/destroy, # and is also used for reporting in execute_cmdline_scenarios config.action = subcommand return command(config).execute()
def execute_subcommand(config, subcommand): command_module = getattr(molecule.command, subcommand) command = getattr(command_module, util.camelize(subcommand)) return command(config).execute()
def test_camelize(): assert "Foo" == util.camelize("foo") assert "FooBar" == util.camelize("foo_bar") assert "FooBarBaz" == util.camelize("foo_bar_baz")
def test_camelize(): assert 'Foo' == util.camelize('foo') assert 'FooBar' == util.camelize('foo_bar') assert 'FooBarBaz' == util.camelize('foo_bar_baz')
def test_camelize(): assert 'Foo' == util.camelize('foo') assert 'FooBar' == util.camelize('foo_bar') assert 'FooBarBaz' == util.camelize('foo_bar_baz')
def execute_subcommand(config, subcommand): command_module = getattr(molecule.command, subcommand) command = getattr(command_module, util.camelize(subcommand)) return command(config).execute()