예제 #1
0
파일: agent.py 프로젝트: MFALHI/cargo
    def post(self, containerId, volumeId):
        payload = request.data
        idfile = os.path.join(CONFIG_DIR, AGENT_IDFILE)
        with open(idfile, 'r') as infile:        
            for line in infile:
                nodeId = line

        rc = reqHandler.startReplication(containerId, volumeId, nodeId, cargoServer, payload)
        return make_response("", codes.herror(rc))
예제 #2
0
    def post(self, containerId, volumeId):
        payload = request.data
        idfile = os.path.join(CONFIG_DIR, AGENT_IDFILE)
        with open(idfile, 'r') as infile:
            for line in infile:
                nodeId = line

        rc = reqHandler.startReplication(containerId, volumeId, nodeId,
                                         cargoServer, payload)
        return make_response("", codes.herror(rc))
예제 #3
0
 def post(self):
     config = request.data
     rc = reqHandler.handleFSOp(config)
     return make_response("", codes.herror(rc))
예제 #4
0
 def get(self):
     config = request.data
     rc, msg = reqHandler.handleFSOp(config)
     return make_response(json.dumps(msg), codes.herror(rc))
예제 #5
0
 def post(self, containerId):
     reqData = request.data
     rc = reqHandler.handleContainerOp(reqData, containerId)
     return make_response("", codes.herror(rc))
예제 #6
0
 def get(self, containerId):
     rc, msg = reqHandler.getContainer(containerId)
     return make_response(msg, codes.herror(rc))
예제 #7
0
 def get(self):
     rc, msg = reqHandler.getAllContainers()
     return make_response(json.dumps(msg), codes.herror(rc))
예제 #8
0
파일: agent.py 프로젝트: MFALHI/cargo
 def get(self, containerId):
     rc, msg = reqHandler.getContainer(containerId)
     return make_response(msg, codes.herror(rc))
예제 #9
0
파일: agent.py 프로젝트: MFALHI/cargo
 def post(self, containerId):
     rc = reqHandler.doFailover(containerId)
     return make_response("", codes.herror(rc))
예제 #10
0
파일: agent.py 프로젝트: MFALHI/cargo
 def delete(self, containerId, volumeId):
     rc = reqHandler.stopReplication(containerId, volumeId)
     return make_response("", codes.herror(rc))
예제 #11
0
파일: agent.py 프로젝트: MFALHI/cargo
 def post(self):
 	config = request.data
     rc = reqHandler.handleFSOp(config)
     return make_response("", codes.herror(rc))
예제 #12
0
파일: agent.py 프로젝트: MFALHI/cargo
 def get(self):
     config = request.data
     rc, msg = reqHandler.handleFSOp(config)
     return make_response(json.dumps(msg), codes.herror(rc))
예제 #13
0
파일: agent.py 프로젝트: MFALHI/cargo
 def post(self, containerId):
     reqData = request.data
     rc = reqHandler.handleContainerOp(reqData, containerId)
     return make_response("", codes.herror(rc))
예제 #14
0
 def delete(self, containerId, volumeId):
     rc = reqHandler.stopReplication(containerId, volumeId)
     return make_response("", codes.herror(rc))
예제 #15
0
 def post(self, containerId):
     rc = reqHandler.doFailover(containerId)
     return make_response("", codes.herror(rc))
예제 #16
0
 def get(self):
     reqData = request.get_json(force=True)
     rc, data = reqHandler.handleRequestOp(reqData)
     return make_response(data, codes.herror(rc))
예제 #17
0
파일: agent.py 프로젝트: MFALHI/cargo
 def get(self):
     rc, msg = reqHandler.getAllContainers()
     return make_response(json.dumps(msg), codes.herror(rc))