diff options
author | Thomas Duval <thomas.duval@orange.com> | 2017-12-18 11:42:16 +0100 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2017-12-18 11:42:16 +0100 |
commit | 4894aee58df3e898c351f006d9d7648a7bb437ee (patch) | |
tree | 1bbb6336628c4794fd4d1ebf3dd16538c6778bae /moonv4/moon_orchestrator | |
parent | f9a5db2b063a1fbbb1c7f8172fc0167794aa7d2d (diff) |
Fix a bug in POST requests.
Change-Id: I3e44d3c5cf8367a5cb81240ab6eff338837e9b60
Diffstat (limited to 'moonv4/moon_orchestrator')
-rw-r--r-- | moonv4/moon_orchestrator/moon_orchestrator/api/pods.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/moonv4/moon_orchestrator/moon_orchestrator/api/pods.py b/moonv4/moon_orchestrator/moon_orchestrator/api/pods.py index c5c5b2c4..319788e5 100644 --- a/moonv4/moon_orchestrator/moon_orchestrator/api/pods.py +++ b/moonv4/moon_orchestrator/moon_orchestrator/api/pods.py @@ -81,7 +81,14 @@ class Pods(Resource): manager_data=request.json, active_context=None, active_context_name=None) - return {"pods": self.driver.get_pods(request.json.get("pdp_id"))} + pods = {} + for _pod_key, _pod_values in self.driver.get_pods().items(): + pods[_pod_key] = [] + for _pod_value in _pod_values: + if _pod_value['namespace'] != "moon": + continue + pods[_pod_key].append(_pod_value) + return {"pods": pods} @check_auth def delete(self, uuid=None, user_id=None): |