コード例 #1
0
ファイル: gateway.py プロジェクト: crowdy/glance
 def get_task_stub_repo(self, context, authorization_layer=True):
     repo = glance.db.TaskRepo(context, self.db_api)
     if authorization_layer:
         repo = policy.TaskStubRepoProxy(repo, context, self.policy)
     repo = glance.notifier.TaskStubRepoProxy(repo, context, self.notifier)
     if authorization_layer:
         repo = authorization.TaskStubRepoProxy(repo, context)
     return repo
コード例 #2
0
ファイル: gateway.py プロジェクト: onodes/glance
 def get_task_stub_repo(self, context):
     task_stub_repo = glance.db.TaskRepo(context, self.db_api)
     policy_task_stub_repo = policy.TaskStubRepoProxy(
         task_stub_repo, context, self.policy)
     notifier_task_stub_repo = glance.notifier.TaskStubRepoProxy(
         policy_task_stub_repo, context, self.notifier)
     authorized_task_stub_repo = authorization.TaskStubRepoProxy(
         notifier_task_stub_repo, context)
     return authorized_task_stub_repo