Ejemplo n.º 1
0
    def delete(self, req):
        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        path = self._normalize_install_path(cmd.installPath)

        lichbd.lichbd_rm(path)
        rsp = AgentResponse()
        self._set_capacity_to_response(rsp)
        return jsonobject.dumps(rsp)
Ejemplo n.º 2
0
    def delete(self, req):
        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        path = self._normalize_install_path(cmd.installPath)

        lichbd.lichbd_rm(path)
        rsp = AgentResponse()
        self._set_capacity_to_response(rsp)
        return jsonobject.dumps(rsp)
Ejemplo n.º 3
0
    def delete(self, req):
        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        pool, image_name = self._parse_install_path(cmd.installPath)
        lichbd_file = os.path.join(pool, image_name)
        lichbd.lichbd_rm(lichbd_file)
        lichbd.lichbd_rm(lichbd_file, "iscsi")

        rsp = AgentResponse()
        self._set_capacity_to_response(rsp)
        return jsonobject.dumps(rsp)
Ejemplo n.º 4
0
    def delete(self, req):
        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        pool, image_name = self._parse_install_path(cmd.installPath)
        protocol = lichbd.get_protocol()
        lichbd_file = os.path.join(pool, image_name)
        lichbd.lichbd_rm(lichbd_file)
        if protocol == 'lichbd':
            lichbd.lichbd_rm(lichbd_file, "iscsi")

        rsp = AgentResponse()
        self._set_capacity_to_response(rsp)
        return jsonobject.dumps(rsp)
Ejemplo n.º 5
0
 def _1():
     if lichbd.lichbd_file_exist(tmp_lichbd_file):
         lichbd.lichbd_rm(tmp_lichbd_file)
     lichbd.lichbd_rm(lichbd_file)
Ejemplo n.º 6
0
 def _1():
     if lichbd.lichbd_file_exist(tmp_lichbd_file):
         lichbd.lichbd_rm(tmp_lichbd_file)
     lichbd.lichbd_rm(lichbd_file)