Esempio n. 1
0
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()
Esempio n. 2
0
def execute_subcommand(config, subcommand):
    command_module = getattr(molecule.command, subcommand)
    command = getattr(command_module, util.camelize(subcommand))

    return command(config).execute()
Esempio n. 3
0
def test_camelize():
    assert "Foo" == util.camelize("foo")
    assert "FooBar" == util.camelize("foo_bar")
    assert "FooBarBaz" == util.camelize("foo_bar_baz")
Esempio n. 4
0
def test_camelize():
    assert 'Foo' == util.camelize('foo')
    assert 'FooBar' == util.camelize('foo_bar')
    assert 'FooBarBaz' == util.camelize('foo_bar_baz')
Esempio n. 5
0
def test_camelize():
    assert 'Foo' == util.camelize('foo')
    assert 'FooBar' == util.camelize('foo_bar')
    assert 'FooBarBaz' == util.camelize('foo_bar_baz')
Esempio n. 6
0
def execute_subcommand(config, subcommand):
    command_module = getattr(molecule.command, subcommand)
    command = getattr(command_module, util.camelize(subcommand))

    return command(config).execute()