Ejemplo n.º 1
0
 def test_get_credential_provider_with_tenant(self):
     self.opts.os_project_name = None
     self.opts.os_tenant_name = 'fake_tenant'
     cp = account_generator.get_credential_provider(self.opts)
     admin_creds = cp.default_admin_creds
     self.assertEqual(self.opts.os_tenant_name, admin_creds.tenant_name)
     self.assertEqual(self.opts.os_username, admin_creds.username)
     self.assertEqual(self.opts.os_password, admin_creds.password)
Ejemplo n.º 2
0
 def test_get_credential_provider_with_tenant(self):
     self.opts.os_project_name = None
     self.opts.os_tenant_name = 'fake_tenant'
     cp = account_generator.get_credential_provider(self.opts)
     admin_creds = cp.default_admin_creds
     self.assertEqual(self.opts.os_tenant_name, admin_creds.tenant_name)
     self.assertEqual(self.opts.os_username, admin_creds.username)
     self.assertEqual(self.opts.os_password, admin_creds.password)
Ejemplo n.º 3
0
 def setUp(self):
     super(TestGenerateResourcesV2, self).setUp()
     self.mock_config_and_opts(self.identity_version)
     self.useFixture(
         fixtures.MockPatch("tempest.lib.auth.AuthProvider.set_auth", return_value=self.identity_response)
     )
     self.cred_provider = account_generator.get_credential_provider(self.opts)
     self.mock_resource_creation()
Ejemplo n.º 4
0
 def test_get_credential_provider(self):
     cp = account_generator.get_credential_provider(self.opts)
     admin_creds = cp.default_admin_creds
     self.assertEqual(self.opts.tag, cp.name)
     self.assertIn(str(self.opts.identity_version), cp.identity_version)
     self.assertEqual(self.opts.os_username, admin_creds.username)
     self.assertEqual(self.opts.os_project_name, admin_creds.tenant_name)
     self.assertEqual(self.opts.os_password, admin_creds.password)
     self.assertFalse(hasattr(admin_creds, 'domain_name'))
Ejemplo n.º 5
0
 def setUp(self):
     super(TestGenerateResourcesV2, self).setUp()
     self.mock_config_and_opts(self.identity_version)
     self.useFixture(fixtures.MockPatch(
         'tempest.lib.auth.AuthProvider.set_auth',
         return_value=self.identity_response))
     self.cred_provider = account_generator.get_credential_provider(
         self.opts)
     self.mock_resource_creation()
Ejemplo n.º 6
0
 def test_get_credential_provider(self):
     cp = account_generator.get_credential_provider(self.opts)
     admin_creds = cp.default_admin_creds
     self.assertEqual(self.opts.tag, cp.name)
     self.assertIn(str(self.opts.identity_version), cp.identity_version)
     self.assertEqual(self.opts.os_username, admin_creds.username)
     self.assertEqual(self.opts.os_project_name, admin_creds.tenant_name)
     self.assertEqual(self.opts.os_password, admin_creds.password)
     self.assertFalse(hasattr(admin_creds, 'domain_name'))
Ejemplo n.º 7
0
 def setUp(self):
     super(TestDumpAccountsV2, self).setUp()
     self.mock_config_and_opts(self.identity_version)
     self.cred_provider = account_generator.get_credential_provider(
         self.opts)
     self.mock_resource_creation()
     cfg.CONF.set_default('swift', True, group='service_available')
     self.resources = account_generator.generate_resources(
         self.cred_provider, admin=True)
Ejemplo n.º 8
0
 def setUp(self):
     super(TestDumpAccountsV2, self).setUp()
     self.mock_config_and_opts(self.identity_version)
     self.cred_provider = account_generator.get_credential_provider(
         self.opts)
     self.mock_resource_creation()
     cfg.CONF.set_default('swift', True, group='service_available')
     self.resources = account_generator.generate_resources(
         self.cred_provider, admin=True)
Ejemplo n.º 9
0
 def setUp(self):
     super(TestDumpAccountsV2, self).setUp()
     self.mock_config_and_opts(self.identity_version)
     self.useFixture(
         fixtures.MockPatch("tempest.lib.auth.AuthProvider.set_auth", return_value=self.identity_response)
     )
     self.cred_provider = account_generator.get_credential_provider(self.opts)
     self.mock_resource_creation()
     cfg.CONF.set_default("swift", True, group="service_available")
     cfg.CONF.set_default("heat", True, group="service_available")
     self.resources = account_generator.generate_resources(self.cred_provider, admin=True)
Ejemplo n.º 10
0
 def setUp(self):
     super(TestDumpAccountsV2, self).setUp()
     self.mock_config_and_opts(self.identity_version)
     self.useFixture(fixtures.MockPatch(
         'tempest.lib.auth.AuthProvider.set_auth',
         return_value=self.identity_response))
     self.cred_provider = account_generator.get_credential_provider(
         self.opts)
     self.mock_resource_creation()
     cfg.CONF.set_default('swift', True, group='service_available')
     cfg.CONF.set_default('heat', True, group='service_available')
     self.resources = account_generator.generate_resources(
         self.cred_provider, admin=True)
Ejemplo n.º 11
0
 def test_get_credential_provider_without_domain(self):
     self.opts.os_domain_name = None
     cp = account_generator.get_credential_provider(self.opts)
     admin_creds = cp.default_admin_creds
     self.assertIsNotNone(admin_creds.domain_name)
Ejemplo n.º 12
0
 def test_get_credential_provider_without_domain(self):
     self.opts.os_domain_name = None
     cp = account_generator.get_credential_provider(self.opts)
     admin_creds = cp.default_admin_creds
     self.assertIsNotNone(admin_creds.domain_name)
Ejemplo n.º 13
0
 def setUp(self):
     super(TestGenerateResourcesV2, self).setUp()
     self.mock_config_and_opts(self.identity_version)
     self.cred_provider = account_generator.get_credential_provider(
         self.opts)
     self.mock_resource_creation()
Ejemplo n.º 14
0
 def setUp(self):
     super(TestGenerateResourcesV2, self).setUp()
     self.mock_config_and_opts(self.identity_version)
     self.cred_provider = account_generator.get_credential_provider(
         self.opts)
     self.mock_resource_creation()