def setup_clients(cls): super(BaseApplicationCatalogScenarioTest, cls).setup_clients() if not hasattr(cls, "os_primary"): creds = cls.get_configured_isolated_creds(type_of_creds='primary') cls.os_primary = clients.Manager(credentials=creds) cls.services_manager = services_manager(creds) cls.application_catalog_client = \ cls.os_primary.application_catalog_client cls.artifacts_client = cls.os_primary.artifacts_client cls.servers_client = cls.services_manager.servers_client params = { 'disable_ssl_certificate_validation': CONF.identity.disable_ssl_certificate_validation, 'ca_certs': CONF.identity.ca_certificates_file, 'trace_requests': CONF.debug.trace_requests, 'http_timeout': CONF.service_clients.http_timeout, 'proxy_url': CONF.service_clients.proxy_url, 'build_timeout': CONF.orchestration.build_timeout, 'build_interval': CONF.orchestration.build_interval, 'endpoint_type': CONF.orchestration.endpoint_type, 'service': CONF.orchestration.catalog_type } options = getattr(CONF, 'orchestration') # Set region # If a service client does not define region or region is not set # default to the identity region if not hasattr(options, 'region') or not getattr(options, 'region'): params['region'] = CONF.identity.region else: params['region'] = getattr(options, 'region') cls.orchestration_client = orchestration.OrchestrationClient( cls.services_manager.auth_provider, **params) cls.images_client = cls.services_manager.image_client_v2
def get_client_with_isolated_creds(cls, type_of_creds="admin"): creds = cls.get_configured_isolated_creds(type_of_creds=type_of_creds) os = clients.Manager(credentials=creds) client = os.artifacts_client return client
def get_client_with_isolated_creds(cls, type_of_creds="admin"): creds = cls.get_configured_isolated_creds(type_of_creds=type_of_creds) os = clients.Manager(credentials=creds) client = os.application_catalog_client return client
def setup_clients(cls): super(BaseApplicationCatalogIsolatedAdminTest, cls).setup_clients() if not hasattr(cls, "os_admin"): creds = cls.get_configured_isolated_creds(type_of_creds='admin') cls.os_admin = clients.Manager(credentials=creds) cls.application_catalog_client = \ cls.os_admin.application_catalog_client cls.artifacts_client = cls.os_admin.artifacts_client
def setup_clients(cls): super(BaseArtifactsTest, cls).setup_clients() if not hasattr(cls, "os_primary"): creds = cls.get_configured_isolated_creds(type_of_creds='primary') cls.os_primary = clients.Manager(credentials=creds) cls.artifacts_client = cls.os_primary.artifacts_client cls.application_catalog_client = \ cls.os_primary.application_catalog_client
def resource_setup(cls): if not CONF.service_available.murano: skip_msg = "Murano is disabled" raise cls.skipException(skip_msg) if not hasattr(cls, "os"): creds = cls.get_configured_isolated_creds(type_of_creds='primary') cls.os = clients.Manager(credentials=creds) cls.application_catalog_client = cls.os.application_catalog_client cls.artifacts_client = cls.os.artifacts_client
def setup_clients(cls): super(BaseServiceBrokerTest, cls).setup_clients() if not hasattr(cls, "os_admin"): cls.username = CONF.auth.admin_username cls.password = CONF.auth.admin_password cls.tenant_name = CONF.auth.admin_project_name cls.verify_nonempty(cls.username, cls.password, cls.tenant_name) cls.os_admin = clients.Manager() cls.service_broker_client = cls.os_admin.service_broker_client cls.application_catalog_client = \ cls.os_admin.application_catalog_client
def setup_clients(cls): super(BaseServiceBrokerTest, cls).setup_clients() if not hasattr(cls, "os_primary"): cls.username = CONF.identity.username cls.password = CONF.identity.password cls.tenant_name = CONF.identity.tenant_name cls.verify_nonempty(cls.username, cls.password, cls.tenant_name) cls.os_primary = clients.Manager() cls.service_broker_client = cls.os_primary.service_broker_client cls.application_catalog_client = \ cls.os_primary.application_catalog_client
def resource_setup(cls): if hasattr(CONF.identity, 'admin_username'): cls.username = CONF.identity.admin_username cls.password = CONF.identity.admin_password cls.tenant_name = CONF.identity.admin_tenant_name else: cls.username = CONF.auth.admin_username cls.password = CONF.auth.admin_password cls.tenant_name = CONF.auth.admin_tenant_name cls.verify_nonempty(cls.username, cls.password, cls.tenant_name) cls.os = clients.Manager() super(BaseServiceBrokerAdminTest, cls).resource_setup()
def resource_setup(cls): if not CONF.service_available.murano: skip_msg = "Murano is disabled" raise cls.skipException(skip_msg) if not hasattr(cls, "os"): creds = cls.get_configured_isolated_creds(type_of_creds='primary') cls.os = clients.Manager(credentials=creds) cls.services_manager = services_manager(creds) cls.linux_image = CONF.application_catalog.linux_image cls.application_catalog_client = cls.os.application_catalog_client cls.artifacts_client = cls.os.artifacts_client cls.servers_client = cls.services_manager.servers_client cls.orchestration_client = cls.services_manager.orchestration_client cls.snapshots_client = cls.services_manager.snapshots_client cls.volumes_client = cls.services_manager.volumes_client cls.backups_client = cls.services_manager.backups_client
def get_client_with_isolated_creds(cls, name=None, type_of_creds="admin"): cls.dynamic_cred = dynamic_creds.DynamicCredentialProvider( identity_version=CONF.identity.auth_version, name=cls.__name__) if "admin" in type_of_creds: creds = cls.dynamic_cred.get_admin_creds() elif "alt" in type_of_creds: creds = cls.dynamic_cred.get_alt_creds() else: creds = cls.dynamic_cred.get_credentials(type_of_creds) cls.dynamic_cred.type_of_creds = type_of_creds os = clients.Manager(credentials=creds) client = os.service_broker_client return client
def setup_clients(cls): super(BaseApplicationCatalogScenarioTest, cls).setup_clients() if not hasattr(cls, "os_primary"): creds = cls.get_configured_isolated_creds(type_of_creds='primary') cls.os_primary = clients.Manager(credentials=creds) cls.services_manager = services_manager(creds) cls.application_catalog_client = \ cls.os_primary.application_catalog_client cls.artifacts_client = cls.os_primary.artifacts_client cls.servers_client = cls.services_manager.servers_client cls.orchestration_client = cls.services_manager.orchestration_client cls.snapshots_client = cls.services_manager.snapshots_v2_client cls.volumes_client = cls.services_manager.volumes_v2_client cls.backups_client = cls.services_manager.backups_v2_client cls.images_client = cls.services_manager.image_client_v2
def setup_clients(cls): super(BaseApplicationCatalogScenarioTest, cls).setup_clients() if not hasattr(cls, "os_primary"): creds = cls.get_configured_isolated_creds(type_of_creds='primary') cls.os_primary = clients.Manager(credentials=creds) cls.services_manager = services_manager(creds) cls.application_catalog_client = \ cls.os_primary.application_catalog_client cls.artifacts_client = cls.os_primary.artifacts_client cls.servers_client = cls.services_manager.servers_client # NOTE(andreaf) The orchestration client is not initialised in Tempest # by default anymore. params = config.service_client_config('orchestration') cls.orchestration_client = orchestration.OrchestrationClient( cls.services_manager.auth_provider, **params) cls.images_client = cls.services_manager.image_client_v2
def get_client_with_isolated_creds(cls, name=None, type_of_creds="admin"): cls.credentials = common_creds.get_credentials_provider( name=cls.__name__, force_tenant_isolation=CONF.auth.use_dynamic_credentials, identity_version=CONF.identity.auth_version) if "admin" in type_of_creds: creds = cls.credentials.get_admin_creds() elif "alt" in type_of_creds: creds = cls.credentials.get_alt_creds() else: creds = cls.credentials.get_credentials(type_of_creds) cls.credentials.type_of_creds = type_of_creds os = clients.Manager(credentials=creds) client = os.service_broker_client return client
def resource_setup(cls): if not CONF.service_broker.run_service_broker_tests: skip_msg = "Service Broker API tests are disabled" raise cls.skipException(skip_msg) if not CONF.service_available.murano_cfapi: skip_msg = "Service Broker API is disabled" raise cls.skipException(skip_msg) if not CONF.service_available.murano: skip_msg = "Murano is disabled" raise cls.skipException(skip_msg) if not hasattr(cls, "os"): cls.username = CONF.identity.username cls.password = CONF.identity.password cls.tenant_name = CONF.identity.tenant_name cls.verify_nonempty(cls.username, cls.password, cls.tenant_name) cls.os = clients.Manager() cls.service_broker_client = cls.os.service_broker_client cls.application_catalog_client = cls.os.application_catalog_client
def resource_setup(cls): creds = cls.get_configured_isolated_creds(type_of_creds='admin') cls.os = clients.Manager(credentials=creds) super(BaseApplicationCatalogIsolatedAdminTest, cls).resource_setup()
def resource_setup(cls): cls.os = clients.Manager() super(BaseApplicationCatalogAdminTest, cls).resource_setup()
def resource_setup(cls): cls.os = clients.Manager() super(BaseServiceBrokerAdminTest, cls).resource_setup()
def resource_setup(cls): creds = cls.get_configured_isolated_creds(type_of_creds='admin') cls.os_primary = clients.Manager(credentials=creds) cls.services_manager = services_manager(creds) super(BaseApplicationCatalogScenarioIsolatedAdminTest, cls).\ resource_setup()