Пример #1
0
    def delete(self, req, tenant_id, id):
        """Delete a cluster."""
        LOG.debug("Deleting a Cluster for Tenant '%s'" % tenant_id)
        LOG.info(_("req : '%s'\n\n") % req)
        LOG.info(_("id : '%s'\n\n") % id)

        context = req.environ[wsgi.CONTEXT_KEY]
        cluster = models.Cluster.load(context, id)
        context.notification = notification.DBaaSClusterDelete(context,
                                                               request=req)
        with StartNotification(context, cluster_id=id):
            cluster.delete()
        return wsgi.Result(None, 202)
Пример #2
0
    def delete(self, req, tenant_id, id):
        """Delete a cluster."""
        LOG.debug(("Deleting a Cluster for Tenant '%(tenant_id)s'\n"
                   "req : '%(req)s'\n\nid : '%(id)s'\n\n") %
                  {"req": req, "id": id, "tenant_id": tenant_id})

        context = req.environ[wsgi.CONTEXT_KEY]
        cluster = models.Cluster.load(context, id)
        context.notification = notification.DBaaSClusterDelete(context,
                                                               request=req)
        with StartNotification(context, cluster_id=id):
            cluster.delete()
        return wsgi.Result(None, 202)