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))
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))
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))
def detail(self, req): return replica_view.collection( req, self._replica_api.get_replicas(req.environ['coriolis.context'], include_tasks_executions=True))