def delete_snapshot(self, req): cmd = jsonobject.loads(req[http.REQUEST_BODY]) spath = self._normalize_install_path(cmd.snapshotPath) lichbd.lichbd_snap_delete(snap_path) rsp = AgentResponse() self._set_capacity_to_response(rsp) return jsonobject.dumps(rsp)
def delete_snapshot(self, req): cmd = jsonobject.loads(req[http.REQUEST_BODY]) spath = self._normalize_install_path(cmd.snapshotPath) rsp = AgentResponse() try: lichbd.lichbd_snap_delete(spath) self._set_capacity_to_response(rsp) except Exception, e: logger.debug('%s' % str(e)) rsp.success = False rsp.error = str(e)