def initialize_keystone(platform, environment):
    """
    Initialize the keystone environment needed to the tests
    :param platform:
    :param environment:
    :return:
    """
    try:
        IdmUtils.prepare_environment(platform, environment)
    except Exception as e:
        for domain in environment['domains']:
            IdmUtils.clean_service(platform, domain['name'])
        IdmUtils.prepare_environment(platform, environment)
def initialize_keystone(platform, environment):
    """
    Initialize the keystone environment needed to the tests
    :param platform:
    :param environment:
    :return:
    """
    try:
        IdmUtils.prepare_environment(platform, environment)
    except Exception as e:
        for domain in environment['domains']:
            IdmUtils.clean_service(platform, domain['name'])
        IdmUtils.prepare_environment(platform, environment)
Exemplo n.º 3
0
def after_all_scenarios(scenario):
    """
    Actions after all scenarios
    Show the initial and final time of the tests completed
    :param scenario:
    """
    IdmUtils.clean_service(world.ks['platform'], world.ks['domain_ok'])
    IdmUtils.clean_service(world.ks['platform'], world.ks['domain_ko'])
    IdmUtils.clean_service(world.ks['platform'], world.ks['domain_no_roles'])
    IdmUtils.clean_service(world.ks['platform'],
                           world.ks['domain_project_only'])
    IdmUtils.clean_service(world.ks['platform'],
                           world.ks['domain_domain_only'])
    IdmUtils.clean_service(world.ks['platform'], world.ks['domain_bypass'])
    ac_utils = AC(world.ac['ip'], port=world.ac['port'])
    ac_utils.delete_tenant_policies(world.ks['domain_ok'])
    ac_utils.delete_tenant_policies(world.ks['domain_project_only'])
    ac_utils.delete_tenant_policies(world.ks['domain_domain_only'])
    stop_environment()
    show_times(world.test_time_init)
Exemplo n.º 4
0
def after_all_scenarios(scenario):
    """
    Actions after all scenarios
    Show the initial and final time of the tests completed
    :param scenario:
    """
    IdmUtils.clean_service(world.ks['platform'], world.ks['domain_ok'])
    IdmUtils.clean_service(world.ks['platform'], world.ks['domain_ko'])
    IdmUtils.clean_service(world.ks['platform'], world.ks['domain_no_roles'])
    IdmUtils.clean_service(world.ks['platform'], world.ks['domain_project_only'])
    IdmUtils.clean_service(world.ks['platform'], world.ks['domain_domain_only'])
    IdmUtils.clean_service(world.ks['platform'], world.ks['domain_bypass'])
    ac_utils = AC(world.ac['ip'], port=world.ac['port'])
    ac_utils.delete_tenant_policies(world.ks['domain_ok'])
    ac_utils.delete_tenant_policies(world.ks['domain_project_only'])
    ac_utils.delete_tenant_policies(world.ks['domain_domain_only'])
    stop_environment()
    show_times(world.test_time_init)