Merge "Use URIOpt for options taking URI/URL"
diff --git a/tempest/config.py b/tempest/config.py
index e4e7171..0e3f465 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -126,9 +126,11 @@
                default=None,
                help='Specify a CA bundle file to use in verifying a '
                     'TLS (https) server certificate.'),
-    cfg.StrOpt('uri',
+    cfg.URIOpt('uri',
+               schemes=['http', 'https'],
                help="Full URI of the OpenStack Identity API (Keystone), v2"),
-    cfg.StrOpt('uri_v3',
+    cfg.URIOpt('uri_v3',
+               schemes=['http', 'https'],
                help='Full URI of the OpenStack Identity API (Keystone), v3'),
     cfg.StrOpt('auth_version',
                default='v3',
@@ -835,8 +837,9 @@
                                title="Dashboard options")
 
 DashboardGroup = [
-    cfg.StrOpt('dashboard_url',
+    cfg.URIOpt('dashboard_url',
                default='http://localhost/',
+               schemes=['http', 'https'],
                help="Where the dashboard can be found"),
     cfg.BoolOpt('disable_ssl_certificate_validation',
                 default=False,
diff --git a/tempest/tests/common/test_credentials_factory.py b/tempest/tests/common/test_credentials_factory.py
index 374474d..8a1158d 100644
--- a/tempest/tests/common/test_credentials_factory.py
+++ b/tempest/tests/common/test_credentials_factory.py
@@ -37,7 +37,7 @@
                          fake_config.FakePrivate)
 
     def test_get_dynamic_provider_params_creds_v2(self):
-        expected_uri = 'EXPECTED_V2_URI'
+        expected_uri = 'http://v2.identy.example.com'
         cfg.CONF.set_default('uri', expected_uri, group='identity')
         admin_creds = fake_credentials.FakeCredentials()
         params = cf.get_dynamic_provider_params('v2', admin_creds=admin_creds)
@@ -48,7 +48,7 @@
             self.assertEqual(expected_params[key], params[key])
 
     def test_get_dynamic_provider_params_creds_v3(self):
-        expected_uri = 'EXPECTED_V3_URI'
+        expected_uri = 'http://v3.identy.example.com'
         cfg.CONF.set_default('uri_v3', expected_uri, group='identity')
         admin_creds = fake_credentials.FakeCredentials()
         params = cf.get_dynamic_provider_params('v3', admin_creds=admin_creds)
@@ -76,14 +76,14 @@
                 fill_in=True, identity_version=expected_identity_version)
 
     def test_get_preprov_provider_params_creds_v2(self):
-        expected_uri = 'EXPECTED_V2_URI'
+        expected_uri = 'http://v2.identy.example.com'
         cfg.CONF.set_default('uri', expected_uri, group='identity')
         params = cf.get_preprov_provider_params('v2')
         self.assertIn('identity_uri', params)
         self.assertEqual(expected_uri, params['identity_uri'])
 
     def test_get_preprov_provider_params_creds_v3(self):
-        expected_uri = 'EXPECTED_V3_URI'
+        expected_uri = 'http://v3.identy.example.com'
         cfg.CONF.set_default('uri_v3', expected_uri, group='identity')
         params = cf.get_preprov_provider_params('v3')
         self.assertIn('identity_uri', params)
@@ -237,7 +237,7 @@
 
     @mock.patch('tempest.lib.auth.get_credentials')
     def test_get_credentials_v2(self, mock_auth_get_credentials):
-        expected_uri = 'V2_URI'
+        expected_uri = 'http://v2.identity.example.com'
         expected_result = 'my_creds'
         mock_auth_get_credentials.return_value = expected_result
         cfg.CONF.set_default('uri', expected_uri, 'identity')
@@ -252,7 +252,7 @@
 
     @mock.patch('tempest.lib.auth.get_credentials')
     def test_get_credentials_v3_no_domain(self, mock_auth_get_credentials):
-        expected_uri = 'V3_URI'
+        expected_uri = 'https://v3.identity.exmaple.com'
         expected_result = 'my_creds'
         expected_domain = 'my_domain'
         mock_auth_get_credentials.return_value = expected_result
@@ -272,7 +272,7 @@
 
     @mock.patch('tempest.lib.auth.get_credentials')
     def test_get_credentials_v3_domain(self, mock_auth_get_credentials):
-        expected_uri = 'V3_URI'
+        expected_uri = 'https://v3.identity.exmaple.com'
         expected_result = 'my_creds'
         expected_domain = 'my_domain'
         mock_auth_get_credentials.return_value = expected_result
@@ -291,7 +291,7 @@
 
     @mock.patch('tempest.lib.auth.get_credentials')
     def test_get_credentials_v3_system(self, mock_auth_get_credentials):
-        expected_uri = 'V3_URI'
+        expected_uri = 'https://v3.identity.exmaple.com'
         expected_result = 'my_creds'
         mock_auth_get_credentials.return_value = expected_result
         cfg.CONF.set_default('uri_v3', expected_uri, 'identity')