diff options
author | Eric Fried <efried@us.ibm.com> | 2017-10-10 12:00:38 -0500 |
---|---|---|
committer | Eric Fried <efried@us.ibm.com> | 2017-10-10 12:00:38 -0500 |
commit | a03976ee892333720b2227f607a5ddbb77163fea (patch) | |
tree | 34b5d2a4d938a013d563ac4f5587a0b87c5d468a /nova/tests/unit | |
parent | 253aad457fa3cc7000572ec7a33378c5f6264a1f (diff) | |
download | nova-a03976ee892333720b2227f607a5ddbb77163fea.tar.gz |
Update cinder in RequestContext service catalog
We've removed support for cinder v1 [1] and v2 [2]. The service catalog
entries for 'volume' and 'volumev2' are therefore no longer needed in
RequestContext.
Also, 'block-storage' is the official service type for cinder [3], so we
want to start supporting service catalogs with an entry for it.
[1] https://review.openstack.org/409904
[2] https://review.openstack.org/501874
[3] https://github.com/openstack/service-types-authority/blob/671b42dda721d95f1719be3f376c950a020ede8c/service-types.yaml#L68
Change-Id: I8360b2a05e982285ad852aa475f1e1cd953c2c8b
Diffstat (limited to 'nova/tests/unit')
-rw-r--r-- | nova/tests/unit/test_context.py | 6 | ||||
-rw-r--r-- | nova/tests/unit/test_utils.py | 2 |
2 files changed, 5 insertions, 3 deletions
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 |