def pub_DeleteSliver (self, slice_urn, credentials, options):
    try:
      if CredVerifier.checkValid(credentials, "deletesliver", slice_urn):
        self.recordAction("deletesliver", credentials, slice_urn)
        if GeniDB.getSliverURN(slice_urn) is None:
          raise UnkownSlice(slice_urn)

        sliver_urn = GeniDB.getSliverURN(slice_urn)
        data = GeniDB.getSliverData(sliver_urn, True)

        foam.geni.lib.deleteSliver(sliver_urn = sliver_urn)

        foam.task.emailGAPIDeleteSliver(data)

        propertyList = self.buildPropertyList(GENI_ERROR_CODE.SUCCESS, value=True)

    except UnknownSlice as e:
      msg = "Attempt to delete unknown sliver for slice URN %s" % (slice_urn)
      propertyList = self.buildPropertyList(GENI_ERROR_CODE.SEARCHFAILED, output=msg)
      e.log(self._log, msg, logging.INFO)
    except Exception as e:
      msg = "Exception: %s" % str(e)
      propertyList = self.buildPropertyList(GENI_ERROR_CODE.ERROR, output=msg)
      self._log.exception("Exception")
    finally:
      return propertyList
Delete a sliver
dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/foam/api/gapi2.py/AMAPIv2.pub_DeleteSliver