Example #1
0
 def index(self, req):
     context = req.environ["coriolis.context"]
     context.can(replica_policies.get_replicas_policy_label("list"))
     return replica_view.collection(
         req,
         self._replica_api.get_replicas(context,
                                        include_tasks_executions=False))
Example #2
0
 def detail(self, req):
     context = req.environ["coriolis.context"]
     context.can(
         replica_policies.get_replicas_policy_label("show_executions"))
     return replica_view.collection(
         req,
         self._replica_api.get_replicas(context,
                                        include_tasks_executions=True))
Example #3
0
 def index(self, req):
     show_deleted = api_utils._get_show_deleted(
         req.GET.get("show_deleted", None))
     context = req.environ["coriolis.context"]
     context.show_deleted = show_deleted
     context.can(replica_policies.get_replicas_policy_label("list"))
     return replica_view.collection(
         req,
         self._replica_api.get_replicas(context,
                                        include_tasks_executions=False))
Example #4
0
 def detail(self, req):
     return replica_view.collection(
         req,
         self._replica_api.get_replicas(req.environ['coriolis.context'],
                                        include_tasks_executions=True))