def setUp(self): super(EncryptionVolTypeTest, self).setUp() self.conf = config.init_conf() # cinder security policy usage of volume type is limited # to being used by administrators only. # Temporarily set username as admin for this test case. self.conf.username = '******' self.manager = clients.ClientManager(self.conf) self.client = self.manager.orchestration_client self.volume_client = self.manager.volume_client
def setup_clients(self, conf, admin_credentials=False): self.manager = clients.ClientManager(conf, admin_credentials) self.identity_client = self.manager.identity_client self.orchestration_client = self.manager.orchestration_client self.compute_client = self.manager.compute_client self.network_client = self.manager.network_client self.volume_client = self.manager.volume_client self.object_client = self.manager.object_client self.client = self.orchestration_client
def setup_clients(self, conf): self.manager = clients.ClientManager(conf) self.identity_client = self.manager.identity_client self.orchestration_client = self.manager.orchestration_client self.compute_client = self.manager.compute_client self.network_client = self.manager.network_client self.volume_client = self.manager.volume_client self.object_client = self.manager.object_client self.metering_client = self.manager.metering_client self.client = self.orchestration_client
def setUp(self): super(EncryptionVolTypeTest, self).setUp() if not self.conf.admin_username or not self.conf.admin_password: self.skipTest('No admin creds found, skipping') self.conf = config.init_conf() # cinder security policy usage of volume type is limited # to being used by administrators only. # Temporarily switch to admin self.conf.username = self.conf.admin_username self.conf.password = self.conf.admin_password self.manager = clients.ClientManager(self.conf) self.client = self.manager.orchestration_client self.volume_client = self.manager.volume_client
def setUp(self): super(HeatIntegrationTest, self).setUp() self.conf = config.init_conf() self.assertIsNotNone(self.conf.auth_url, 'No auth_url configured') self.assertIsNotNone(self.conf.username, 'No username configured') self.assertIsNotNone(self.conf.password, 'No password configured') self.manager = clients.ClientManager(self.conf) self.identity_client = self.manager.identity_client self.orchestration_client = self.manager.orchestration_client self.compute_client = self.manager.compute_client self.network_client = self.manager.network_client self.volume_client = self.manager.volume_client
def setUp(self): super(HeatIntegrationTest, self).setUp() self.conf = config.init_conf() self.assertIsNotNone(self.conf.auth_url, 'No auth_url configured') self.assertIsNotNone(self.conf.username, 'No username configured') self.assertIsNotNone(self.conf.password, 'No password configured') self.manager = clients.ClientManager(self.conf) self.identity_client = self.manager.identity_client self.orchestration_client = self.manager.orchestration_client self.compute_client = self.manager.compute_client self.network_client = self.manager.network_client self.volume_client = self.manager.volume_client self.object_client = self.manager.object_client self.metering_client = self.manager.metering_client self.useFixture(fixtures.FakeLogger(format=_LOG_FORMAT)) self.updated_time = {}
def load_tests(loader, tests, pattern): """Provide a TestSuite to the discovery process.""" test_dir = os.path.join(os.path.dirname(__file__), TESTS_DIR) conf = config.CONF.heat_plugin if conf.auth_url is None: # It's not configured, let's not load tests return manager = clients.ClientManager(conf) endpoint = manager.identity_client.get_endpoint_url( 'orchestration', conf.region) host = urlparse.urlparse(endpoint).hostname os.environ['OS_TOKEN'] = manager.identity_client.auth_token os.environ['PREFIX'] = test.rand_name('api') return driver.build_tests(test_dir, loader, host=host, url=endpoint, test_loader_name=__name__)