Example #1
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(migration_policies.get_migrations_policy_label("show"))
     return migration_view.collection(
         req, self._migration_api.get_migrations(
             context, include_tasks=False))
Example #2
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))