diff --git a/src/env.py b/src/env.py index 01d62c3..a847f79 100755 --- a/src/env.py +++ b/src/env.py @@ -24,11 +24,7 @@ def getenv(key): elif key == "MASTER_IP": return os.environ.get("MASTER_IP", "0.0.0.0") 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") ->>>>>>> multiple master elif key == "MASTER_PORT": return int(os.environ.get("MASTER_PORT", 9000)) elif key == "WORKER_PORT": diff --git a/src/httprest.py b/src/httprest.py index a1f435a..e2dbbb2 100755 --- a/src/httprest.py +++ b/src/httprest.py @@ -40,7 +40,6 @@ if (external_login == 'TRUE'): userpoint = "http://" + env.getenv('USER_IP') + ":" + str(env.getenv('USER_PORT')) G_userip = env.getenv("USER_IP") - def post_to_user(url = '/', data={}): return requests.post(userpoint+url,data=data).json() diff --git a/web/web.py b/web/web.py index 1a0574d..c7da4ab 100755 --- a/web/web.py +++ b/web/web.py @@ -246,28 +246,44 @@ def descriptionImage(image,masterip): descriptionImageView.masterip = masterip return descriptionImageView.as_view() +<<<<<<< 3b17bd33a3fbe1246abdc45dcb5f08d927eae2dd @app.route("/image/share///", methods=['GET']) +======= +@app.route("/image/share//", methods=['GET']) +>>>>>>> monitor part of multiple master @login_required def shareImage(image,masterip): shareImageView.image = image shareImageView.masterip = masterip return shareImageView.as_view() +<<<<<<< 3b17bd33a3fbe1246abdc45dcb5f08d927eae2dd @app.route("/image/unshare///", methods=['GET']) +======= +@app.route("/image/unshare//", methods=['GET']) +>>>>>>> monitor part of multiple master @login_required def unshareImage(image,masterip): unshareImageView.image = image unshareImageView.masterip = masterip return unshareImageView.as_view() +<<<<<<< 3b17bd33a3fbe1246abdc45dcb5f08d927eae2dd @app.route("/image/delete///", methods=['GET']) +======= +@app.route("/image/delete//", methods=['GET']) +>>>>>>> monitor part of multiple master @login_required def deleteImage(image,masterip): deleteImageView.image = image deleteImageView.masterip = masterip return deleteImageView.as_view() +<<<<<<< 3b17bd33a3fbe1246abdc45dcb5f08d927eae2dd @app.route("/image/updatebase///", methods=['GET']) +======= +@app.route("/image/updatebase//", methods=['GET']) +>>>>>>> monitor part of multiple master @login_required def updatebaseImage(image,masterip): updatebaseImageView.image = image @@ -329,7 +345,10 @@ def monitor_request(comid,infotype,masterip): path = path[:path.rfind("/")+1] logger.debug(path + "_____" + masterip) result = dockletRequest.post(path, data, masterip) +<<<<<<< 3b17bd33a3fbe1246abdc45dcb5f08d927eae2dd logger.debug("monitor" + str(type(result))) +======= +>>>>>>> monitor part of multiple master return json.dumps(result) @app.route("/beans/application/", methods=['GET'])