Beispiel #1
0
    def show_instance(self, req, tenant_id, cluster_id, instance_id):
        """Return a single instance belonging to a cluster."""
        LOG.debug("Showing an Instance in a Cluster for Tenant '%s'"
                  % tenant_id)
        LOG.info(_("req : '%s'\n\n") % req)
        LOG.info(_("cluster_id : '%s'\n\n") % cluster_id)
        LOG.info(_("instance_id : '%s'\n\n") % instance_id)

        context = req.environ[wsgi.CONTEXT_KEY]
        cluster = models.Cluster.load(context, cluster_id)
        instance = models.Cluster.load_instance(context, cluster.id,
                                                instance_id)
        return wsgi.Result(views.ClusterInstanceDetailView(
            instance, req=req).data(), 200)
Beispiel #2
0
    def show_instance(self, req, tenant_id, cluster_id, instance_id):
        """Return a single instance belonging to a cluster."""
        LOG.debug(("Showing an Instance in a Cluster for Tenant "
                   "'%(tenant_id)s'\n"
                   "req : '%(req)s'\n\n"
                   "cluster_id : '%(cluster_id)s'\n\n"
                   "instance_id : '%(instance_id)s;\n\n") %
                  {"req": req, "tenant_id": tenant_id,
                   "cluster_id": cluster_id,
                   "instance_id": instance_id})

        context = req.environ[wsgi.CONTEXT_KEY]
        cluster = models.Cluster.load(context, cluster_id)
        instance = models.Cluster.load_instance(context, cluster.id,
                                                instance_id)
        return wsgi.Result(views.ClusterInstanceDetailView(
            instance, req=req).data(), 200)