コード例 #1
0
ファイル: types_manage.py プロジェクト: 52136/openstack
    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)
コード例 #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)
コード例 #3
0
ファイル: types_extra_specs.py プロジェクト: 52136/openstack
 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))
コード例 #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))