+ def test_v3_Keystone(self):
+ # Keystone v3 authentication
+ auth_exp = False
+ try:
+ drv = KeystoneDriverV3(openstack_V3_info['username'],
+ openstack_V3_info['password'],
+ openstack_V3_info['auth_url'],
+ openstack_V3_info['project_name'],
+ None,
+ openstack_V3_info['user_domain_name'],
+ openstack_V3_info['project_domain_name'])
+ client = drv._get_keystone_connection()
+ except Exception:
+ auth_exp = True
+ self.assertFalse(auth_exp)
+
+ # Incorrect domain being to passed to v3 Keystone API
+ auth_exp = False
+ try:
+ drv = KeystoneDriverV3(openstack_V3_info['username'],
+ openstack_V3_info['password'],
+ openstack_V3_info['auth_url'],
+ openstack_V3_info['project_name'],
+ None,
+ "DummyDom",
+ openstack_V3_info['project_domain_name'])
+ client = drv._get_keystone_connection()
+ except Exception:
+ auth_exp = True
+ self.assertTrue(auth_exp)
+
+ # Keystone v3 authentication-Backward compatabilty test
+ auth_exp = False
+ try:
+ drv = KeystoneDriverV3(openstack_info['username'],
+ openstack_info['password'],
+ openstack_info['auth_url'],
+ openstack_info['project_name'],
+ None,
+ openstack_info['user_domain_name'],
+ openstack_info['project_domain_name'])
+ client = drv._get_keystone_connection()
+ except Exception:
+ auth_exp = True
+ self.assertFalse(auth_exp)
+
+ # Keystone v3 authentication-Backward compatabilty
+ auth_exp = False
+ try:
+ drv = KeystoneDriverV3(openstack_info['username'],
+ openstack_info['password'],
+ openstack_info['auth_url'],
+ openstack_info['project_name'],
+ None,
+ None,
+ None)
+ client = drv._get_keystone_connection()
+ except Exception:
+ auth_exp = True
+ self.assertFalse(auth_exp)
+
+ # Keystone v2 authentication
+ auth_exp = False
+ try:
+ drv2 = KeystoneDriverV2(
+ openstack_info['username'],
+ openstack_info['password'],
+ 'http://10.66.4.17:5000/v2.0',
+ openstack_info['project_name'],
+ None)
+ client = drv2._get_keystone_connection()
+ except Exception:
+ auth_exp = True
+ self.assertFalse(auth_exp)
+
+ @unittest.skip("Skipping test_vm_operations")