summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nova/context.py2
-rw-r--r--nova/tests/unit/test_context.py6
-rw-r--r--nova/tests/unit/test_utils.py2
3 files changed, 6 insertions, 4 deletions
diff --git a/nova/context.py b/nova/context.py
index 03cb953790..e5700356fb 100644
--- a/nova/context.py
+++ b/nova/context.py
@@ -118,7 +118,7 @@ class RequestContext(context.RequestContext):
if service_catalog:
# Only include required parts of service_catalog
self.service_catalog = [s for s in service_catalog
- if s.get('type') in ('volume', 'volumev2', 'volumev3',
+ if s.get('type') in ('block-storage', 'volumev3',
'key-manager', 'placement')]
else:
# if list is empty or none
diff --git a/nova/tests/unit/test_context.py b/nova/tests/unit/test_context.py
index 387078557b..e0191e1be9 100644
--- a/nova/tests/unit/test_context.py
+++ b/nova/tests/unit/test_context.py
@@ -102,14 +102,16 @@ class ContextTestCase(test.NoDBTestCase):
{u'type': u'compute', u'name': u'nova'},
{u'type': u's3', u'name': u's3'},
{u'type': u'image', u'name': u'glance'},
- {u'type': u'volume', u'name': u'cinder'},
+ {u'type': u'volumev3', u'name': u'cinderv3'},
{u'type': u'ec2', u'name': u'ec2'},
{u'type': u'object-store', u'name': u'swift'},
{u'type': u'identity', u'name': u'keystone'},
+ {u'type': u'block-storage', u'name': u'cinder'},
{u'type': None, u'name': u'S_withouttype'},
{u'type': u'vo', u'name': u'S_partofvolume'}]
- volume_catalog = [{u'type': u'volume', u'name': u'cinder'}]
+ volume_catalog = [{u'type': u'volumev3', u'name': u'cinderv3'},
+ {u'type': u'block-storage', u'name': u'cinder'}]
ctxt = context.RequestContext('111', '222',
service_catalog=service_catalog)
self.assertEqual(volume_catalog, ctxt.service_catalog)
diff --git a/nova/tests/unit/test_utils.py b/nova/tests/unit/test_utils.py
index f2a7d0f626..2bda15549f 100644
--- a/nova/tests/unit/test_utils.py
+++ b/nova/tests/unit/test_utils.py
@@ -1373,7 +1373,7 @@ class GetKSAAdapterTestCase(test.NoDBTestCase):
min_version=None, max_version=None)
def test_load_auth_and_session(self):
- ret = utils.get_ksa_adapter('volumev2')
+ ret = utils.get_ksa_adapter('volumev3')
# Returned the result of load_adapter_from_conf_options
self.assertEqual(self.load_adap.return_value, ret)
# Had to load the auth