示例#1
0
 def get_metadef_tag_factory(self, context):
     tag_factory = glance.domain.MetadefTagFactory()
     policy_tag_factory = policy.MetadefTagFactoryProxy(
         tag_factory, context, self.policy)
     authorized_tag_factory = authorization.MetadefTagFactoryProxy(
         policy_tag_factory, context)
     return authorized_tag_factory
示例#2
0
文件: gateway.py 项目: crowdy/glance
 def get_metadef_tag_factory(self, context, authorization_layer=True):
     factory = glance.domain.MetadefTagFactory()
     if authorization_layer:
         factory = policy.MetadefTagFactoryProxy(factory, context,
                                                 self.policy)
     factory = glance.notifier.MetadefTagFactoryProxy(
         factory, context, self.notifier)
     if authorization_layer:
         factory = authorization.MetadefTagFactoryProxy(factory, context)
     return factory