monitor part of multiple master
This commit is contained in:
parent
3b17bd33a3
commit
375abd85b7
|
@ -24,11 +24,7 @@ def getenv(key):
|
||||||
elif key == "MASTER_IP":
|
elif key == "MASTER_IP":
|
||||||
return os.environ.get("MASTER_IP", "0.0.0.0")
|
return os.environ.get("MASTER_IP", "0.0.0.0")
|
||||||
elif key == "MASTER_IPS":
|
elif key == "MASTER_IPS":
|
||||||
<<<<<<< 14ed490029469f18398a26e21c921bbbf3247df2
|
|
||||||
return os.environ.get("MASTER_IPS", "0.0.0.0@docklet")
|
return os.environ.get("MASTER_IPS", "0.0.0.0@docklet")
|
||||||
=======
|
|
||||||
return os.environ.get("MASTER_IPS", "0.0.0.0")
|
|
||||||
>>>>>>> multiple master
|
|
||||||
elif key == "MASTER_PORT":
|
elif key == "MASTER_PORT":
|
||||||
return int(os.environ.get("MASTER_PORT", 9000))
|
return int(os.environ.get("MASTER_PORT", 9000))
|
||||||
elif key == "WORKER_PORT":
|
elif key == "WORKER_PORT":
|
||||||
|
|
|
@ -40,7 +40,6 @@ if (external_login == 'TRUE'):
|
||||||
userpoint = "http://" + env.getenv('USER_IP') + ":" + str(env.getenv('USER_PORT'))
|
userpoint = "http://" + env.getenv('USER_IP') + ":" + str(env.getenv('USER_PORT'))
|
||||||
G_userip = env.getenv("USER_IP")
|
G_userip = env.getenv("USER_IP")
|
||||||
|
|
||||||
|
|
||||||
def post_to_user(url = '/', data={}):
|
def post_to_user(url = '/', data={}):
|
||||||
return requests.post(userpoint+url,data=data).json()
|
return requests.post(userpoint+url,data=data).json()
|
||||||
|
|
||||||
|
|
19
web/web.py
19
web/web.py
|
@ -246,28 +246,44 @@ def descriptionImage(image,masterip):
|
||||||
descriptionImageView.masterip = masterip
|
descriptionImageView.masterip = masterip
|
||||||
return descriptionImageView.as_view()
|
return descriptionImageView.as_view()
|
||||||
|
|
||||||
|
<<<<<<< 3b17bd33a3fbe1246abdc45dcb5f08d927eae2dd
|
||||||
@app.route("/image/share/<image>/<masterip>/", methods=['GET'])
|
@app.route("/image/share/<image>/<masterip>/", methods=['GET'])
|
||||||
|
=======
|
||||||
|
@app.route("/image/share/<image>/<masterip>", methods=['GET'])
|
||||||
|
>>>>>>> monitor part of multiple master
|
||||||
@login_required
|
@login_required
|
||||||
def shareImage(image,masterip):
|
def shareImage(image,masterip):
|
||||||
shareImageView.image = image
|
shareImageView.image = image
|
||||||
shareImageView.masterip = masterip
|
shareImageView.masterip = masterip
|
||||||
return shareImageView.as_view()
|
return shareImageView.as_view()
|
||||||
|
|
||||||
|
<<<<<<< 3b17bd33a3fbe1246abdc45dcb5f08d927eae2dd
|
||||||
@app.route("/image/unshare/<image>/<masterip>/", methods=['GET'])
|
@app.route("/image/unshare/<image>/<masterip>/", methods=['GET'])
|
||||||
|
=======
|
||||||
|
@app.route("/image/unshare/<image>/<masterip>", methods=['GET'])
|
||||||
|
>>>>>>> monitor part of multiple master
|
||||||
@login_required
|
@login_required
|
||||||
def unshareImage(image,masterip):
|
def unshareImage(image,masterip):
|
||||||
unshareImageView.image = image
|
unshareImageView.image = image
|
||||||
unshareImageView.masterip = masterip
|
unshareImageView.masterip = masterip
|
||||||
return unshareImageView.as_view()
|
return unshareImageView.as_view()
|
||||||
|
|
||||||
|
<<<<<<< 3b17bd33a3fbe1246abdc45dcb5f08d927eae2dd
|
||||||
@app.route("/image/delete/<image>/<masterip>/", methods=['GET'])
|
@app.route("/image/delete/<image>/<masterip>/", methods=['GET'])
|
||||||
|
=======
|
||||||
|
@app.route("/image/delete/<image>/<masterip>", methods=['GET'])
|
||||||
|
>>>>>>> monitor part of multiple master
|
||||||
@login_required
|
@login_required
|
||||||
def deleteImage(image,masterip):
|
def deleteImage(image,masterip):
|
||||||
deleteImageView.image = image
|
deleteImageView.image = image
|
||||||
deleteImageView.masterip = masterip
|
deleteImageView.masterip = masterip
|
||||||
return deleteImageView.as_view()
|
return deleteImageView.as_view()
|
||||||
|
|
||||||
|
<<<<<<< 3b17bd33a3fbe1246abdc45dcb5f08d927eae2dd
|
||||||
@app.route("/image/updatebase/<image>/<masterip>/", methods=['GET'])
|
@app.route("/image/updatebase/<image>/<masterip>/", methods=['GET'])
|
||||||
|
=======
|
||||||
|
@app.route("/image/updatebase/<image>/<masterip>", methods=['GET'])
|
||||||
|
>>>>>>> monitor part of multiple master
|
||||||
@login_required
|
@login_required
|
||||||
def updatebaseImage(image,masterip):
|
def updatebaseImage(image,masterip):
|
||||||
updatebaseImageView.image = image
|
updatebaseImageView.image = image
|
||||||
|
@ -329,7 +345,10 @@ def monitor_request(comid,infotype,masterip):
|
||||||
path = path[:path.rfind("/")+1]
|
path = path[:path.rfind("/")+1]
|
||||||
logger.debug(path + "_____" + masterip)
|
logger.debug(path + "_____" + masterip)
|
||||||
result = dockletRequest.post(path, data, masterip)
|
result = dockletRequest.post(path, data, masterip)
|
||||||
|
<<<<<<< 3b17bd33a3fbe1246abdc45dcb5f08d927eae2dd
|
||||||
logger.debug("monitor" + str(type(result)))
|
logger.debug("monitor" + str(type(result)))
|
||||||
|
=======
|
||||||
|
>>>>>>> monitor part of multiple master
|
||||||
return json.dumps(result)
|
return json.dumps(result)
|
||||||
|
|
||||||
@app.route("/beans/application/", methods=['GET'])
|
@app.route("/beans/application/", methods=['GET'])
|
||||||
|
|
Loading…
Reference in New Issue