Merge "Fixes RequestContext initialization failure."
This commit is contained in:
commit
e92add8ee2
|
@ -84,7 +84,7 @@ class RequestContext(object):
|
|||
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')]
|
||||
if s.get('type') in ('volume',)]
|
||||
else:
|
||||
# if list is empty or none
|
||||
self.service_catalog = []
|
||||
|
|
|
@ -95,7 +95,9 @@ class ContextTestCase(test.NoDBTestCase):
|
|||
{u'type': u'volume', u'name': u'cinder'},
|
||||
{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'identity', u'name': u'keystone'},
|
||||
{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'}]
|
||||
ctxt = context.RequestContext('111', '222',
|
||||
|
|
Loading…
Reference in New Issue