Beispiel #1
0
    def _delete(self, req, id):
        """Deletes an existing servicemanage type."""
        context = req.environ['monitor.context']
        authorize(context)

        try:
            vol_type = servicemanage_types.get_servicemanage_type(context, id)
            servicemanage_types.destroy(context, vol_type['id'])
        except exception.NotFound:
            raise webob.exc.HTTPNotFound()

        return webob.Response(status_int=202)
Beispiel #2
0
    def _delete(self, req, id):
        """Deletes an existing servicemanage type."""
        context = req.environ['monitor.context']
        authorize(context)

        try:
            vol_type = servicemanage_types.get_servicemanage_type(context, id)
            servicemanage_types.destroy(context, vol_type['id'])
        except exception.NotFound:
            raise webob.exc.HTTPNotFound()

        return webob.Response(status_int=202)
Beispiel #3
0
 def _check_type(self, context, type_id):
     try:
         servicemanage_types.get_servicemanage_type(context, type_id)
     except exception.NotFound as ex:
         raise webob.exc.HTTPNotFound(explanation=unicode(ex))
Beispiel #4
0
 def _check_type(self, context, type_id):
     try:
         servicemanage_types.get_servicemanage_type(context, type_id)
     except exception.NotFound as ex:
         raise webob.exc.HTTPNotFound(explanation=unicode(ex))