def show(self, req, tenant_id, id): """Return a single instance.""" LOG.info(_LI("Showing database instance '%(instance_id)s' for tenant " "'%(tenant_id)s'"), {'instance_id': id, 'tenant_id': tenant_id}) LOG.debug("req : '%s'\n\n", req) context = req.environ[wsgi.CONTEXT_KEY] server = models.load_instance_with_info(models.DetailInstance, context, id) return wsgi.Result(views.InstanceDetailView(server, req=req).data(), 200)
def load_instance(context, cluster_id, instance_id): return inst_models.load_instance_with_info( inst_models.DetailInstance, context, instance_id, cluster_id)