Ejemplo n.º 1
0
    def delete(self, req, id):
        """Deletes an existing agent build."""
        context = req.environ['nova.context']
        authorize(context)

        try:
            db.agent_build_destroy(context, id)
        except exception.AgentBuildNotFound as ex:
            raise webob.exc.HTTPNotFound(explanation=ex.format_message())
Ejemplo n.º 2
0
    def delete(self, req, id):
        """Deletes an existing agent build."""
        context = req.environ['nova.context']
        authorize(context)

        try:
            db.agent_build_destroy(context, id)
        except exception.AgentBuildNotFound as ex:
            raise webob.exc.HTTPNotFound(explanation=ex.format_message())
Ejemplo n.º 3
0
 def destroy(self):
     db.agent_build_destroy(self._context, self.id)
Ejemplo n.º 4
0
 def destroy(self, context):
     db.agent_build_destroy(context, self.id)
Ejemplo n.º 5
0
 def destroy(self, context):
     db.agent_build_destroy(context, self.id)
Ejemplo n.º 6
0
 def delete(self, os, architecture, hypervisor='xen'):
     """Deletes an existing agent build."""
     ctxt = context.get_admin_context()
     agent_build_ref = db.agent_build_get_by_triple(ctxt,
                               hypervisor, os, architecture)
     db.agent_build_destroy(ctxt, agent_build_ref['id'])
Ejemplo n.º 7
0
 def destroy(self):
     db.agent_build_destroy(self._context, self.id)