예제 #1
0
파일: gateway.py 프로젝트: onodes/glance
 def get_metadef_namespace_factory(self, context):
     ns_factory = glance.domain.MetadefNamespaceFactory()
     policy_ns_factory = policy.MetadefNamespaceFactoryProxy(
         ns_factory, context, self.policy)
     authorized_ns_factory = authorization.MetadefNamespaceFactoryProxy(
         policy_ns_factory, context)
     return authorized_ns_factory
예제 #2
0
파일: gateway.py 프로젝트: crowdy/glance
 def get_metadef_namespace_factory(self, context, authorization_layer=True):
     factory = glance.domain.MetadefNamespaceFactory()
     if authorization_layer:
         factory = policy.MetadefNamespaceFactoryProxy(
             factory, context, self.policy)
     factory = glance.notifier.MetadefNamespaceFactoryProxy(
         factory, context, self.notifier)
     if authorization_layer:
         factory = authorization.MetadefNamespaceFactoryProxy(
             factory, context)
     return factory