def given_tenant_id_is_registered_in_cloto(context):

    context.secondary_tenant_id = \
        configuration_utils.config[PROPERTIES_CONFIG_FACTS_SERVICE][PROPERTIES_CONFIG_FACTS_SERVICE_OS_SECONDARY_TENANT_ID]

    print ("> Initiating Cloto REST Client for the secondary Tenant")
    context.secondary_cloto_client = ClotoClient(
        username=configuration_utils.config[PROPERTIES_CONFIG_CLOTO_SERVICE][PROPERTIES_CONFIG_SERVICE_OS_USERNAME],
        password=configuration_utils.config[PROPERTIES_CONFIG_CLOTO_SERVICE][PROPERTIES_CONFIG_SERVICE_OS_PASSWORD],
        tenant_id=context.secondary_tenant_id,
        auth_url=configuration_utils.config[PROPERTIES_CONFIG_CLOTO_SERVICE][PROPERTIES_CONFIG_SERVICE_OS_AUTH_URL],
        api_protocol=configuration_utils.config[PROPERTIES_CONFIG_CLOTO_SERVICE][PROPERTIES_CONFIG_SERVICE_PROTOCOL],
        api_host=configuration_utils.config[PROPERTIES_CONFIG_CLOTO_SERVICE][PROPERTIES_CONFIG_SERVICE_HOST],
        api_port=configuration_utils.config[PROPERTIES_CONFIG_CLOTO_SERVICE][PROPERTIES_CONFIG_SERVICE_PORT],
        api_resource=configuration_utils.config[PROPERTIES_CONFIG_CLOTO_SERVICE][PROPERTIES_CONFIG_SERVICE_RESOURCE])

    print ("> A GET request is executed to CLOTO component, "
           "to init all data about that secondary tenant in its system.")
    _, response = context.secondary_cloto_client.\
        get_tenant_id_resource_client().get_tenant_id(context.secondary_tenant_id)

    assert_that(response.ok,
                "TenantId '{}' for testing cannot be "
                "retrieved from CLOTO: Message: {}".format(context.secondary_tenant_id, response.text))