Exemple #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())
Exemple #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())
Exemple #3
0
 def destroy(self):
     db.agent_build_destroy(self._context, self.id)
Exemple #4
0
 def destroy(self, context):
     db.agent_build_destroy(context, self.id)
Exemple #5
0
 def destroy(self, context):
     db.agent_build_destroy(context, self.id)
Exemple #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'])
Exemple #7
0
 def destroy(self):
     db.agent_build_destroy(self._context, self.id)