diff options
author | Thomas Duval <thomas.duval@orange.com> | 2018-10-05 16:54:37 +0200 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2018-10-05 16:58:48 +0200 |
commit | 2e35a7e46f0929438c1c206e3116caa829f07dc6 (patch) | |
tree | 759a83b3dfefe70faeada1c3af7377f4cd89b8eb /moon_manager/moon_manager/api/slaves.py | |
parent | 2dbe655587ca98b67c1a3e3798c63fd47229adc0 (diff) |
Update code to 4.6 official version
Change-Id: Ibd0da0e476e24b2685f54693efc11f7a58d40a62
Diffstat (limited to 'moon_manager/moon_manager/api/slaves.py')
-rw-r--r-- | moon_manager/moon_manager/api/slaves.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/moon_manager/moon_manager/api/slaves.py b/moon_manager/moon_manager/api/slaves.py index 769b681f..e2928de0 100644 --- a/moon_manager/moon_manager/api/slaves.py +++ b/moon_manager/moon_manager/api/slaves.py @@ -16,7 +16,6 @@ from python_moonutilities.security_functions import check_auth from python_moonutilities import configuration from python_moonutilities.security_functions import validate_input - __version__ = "4.3.0" logger = logging.getLogger("moon.manager.api." + __name__) @@ -84,11 +83,11 @@ class Slaves(Resource): """ logger.info("Will made a request for {}".format(uuid)) if request.json.get("op") == "replace" \ - and request.json.get("variable") == "configured" \ + and request.json.get("variable") == "configured" \ and request.json.get("value"): req = requests.post("http://{}:{}/pods".format( self.orchestrator_hostname, self.orchestrator_port, - ), + ), json={"slave_name": uuid} ) if req.status_code != 200: @@ -97,7 +96,7 @@ class Slaves(Resource): )) return "Orchestrator: " + str(req.reason), req.status_code elif request.json.get("op") == "replace" \ - and request.json.get("variable") == "configured" \ + and request.json.get("variable") == "configured" \ and not request.json.get("value"): req = requests.delete("http://{}:{}/pods/{}".format( self.orchestrator_hostname, self.orchestrator_port, uuid |