def test_add_host(): destroy_model() create_model('test-model') add_host('foo') assert len(get_model().hosts()) == 1 assert get_model().hosts()[0]['name'] == 'foo'
def resolve_host_name(name): from config.Model import get_model return resolve_entity_name(name, 'host', get_model().hosts())