def index(self, req, tenant_id): context = req.environ[wsgi.CONTEXT_KEY] only_active = True if context.is_admin: only_active = False datastores = models.Datastores.load(only_active) datastores_versions = models.DatastoreVersions.load_all(only_active) return wsgi.Result( views.DatastoresView(datastores, datastores_versions, req).data(), 200)
def index(self, req, tenant_id): datastores = models.Datastores.load() return wsgi.Result(views.DatastoresView(datastores, req).data(), 200)