diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-02-26 21:40:12 +0000 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-03-01 17:16:17 +0000 |
commit | a6daf9883756492264e298f6da81b68f056a80b1 (patch) | |
tree | 5487863c4beedb86caf10520617cd05842075573 /multivimbroker | |
parent | f61305bb807ed7d0231bc68d7b934ddbe0f7f6de (diff) |
Revise vim_types API
Change-Id: I0a5728655fc8eb894a11dac56192f724db2000b6
Issue-ID: MULTICLOUD-165
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'multivimbroker')
-rw-r--r-- | multivimbroker/multivimbroker/forwarder/views.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/multivimbroker/multivimbroker/forwarder/views.py b/multivimbroker/multivimbroker/forwarder/views.py index c2ea505..7935642 100644 --- a/multivimbroker/multivimbroker/forwarder/views.py +++ b/multivimbroker/multivimbroker/forwarder/views.py @@ -87,8 +87,13 @@ class VIMTypes(BaseServer): '../pub/config/provider-plugin.json') with open(json_file, "r") as f: plugins = json.load(f) - data = {"vim_types": plugins} - return Response(data=data, status=status.HTTP_200_OK) + ret = [] + for k, v in plugins.items(): + item = {} + item["vim_type"] = v.get("vim_type") + item["versions"] = [k for k in v.get('versions', {})] + ret.append(item) + return Response(data=ret, status=status.HTTP_200_OK) # forward handler |