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())
def destroy(self): db.agent_build_destroy(self._context, self.id)
def destroy(self, context): db.agent_build_destroy(context, self.id)
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'])