diff --git a/nova/context.py b/nova/context.py index b17c156ab718..7ea29f3c5697 100644 --- a/nova/context.py +++ b/nova/context.py @@ -119,7 +119,7 @@ class RequestContext(context.RequestContext): # Only include required parts of service_catalog self.service_catalog = [s for s in service_catalog if s.get('type') in ('image', 'block-storage', 'volumev3', - 'key-manager', 'placement')] + 'key-manager', 'placement', 'network')] else: # if list is empty or none self.service_catalog = [] diff --git a/nova/tests/unit/test_context.py b/nova/tests/unit/test_context.py index 2603c67bbde7..e10e0caf1cee 100644 --- a/nova/tests/unit/test_context.py +++ b/nova/tests/unit/test_context.py @@ -103,6 +103,7 @@ class ContextTestCase(test.NoDBTestCase): {u'type': u's3', u'name': u's3'}, {u'type': u'image', u'name': u'glance'}, {u'type': u'volumev3', u'name': u'cinderv3'}, + {u'type': u'network', u'name': u'neutron'}, {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'}, @@ -112,6 +113,7 @@ class ContextTestCase(test.NoDBTestCase): volume_catalog = [{u'type': u'image', u'name': u'glance'}, {u'type': u'volumev3', u'name': u'cinderv3'}, + {u'type': u'network', u'name': u'neutron'}, {u'type': u'block-storage', u'name': u'cinder'}] ctxt = context.RequestContext('111', '222', service_catalog=service_catalog)