diff options
author | Liang Ke <lokyse@163.com> | 2018-03-05 07:36:05 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-05 07:36:05 +0000 |
commit | e677a3c5218e7dc277c21d17784cdfb210e0a7f2 (patch) | |
tree | c10de9ece1f7605f707bc264eb22dae719d2dd2c | |
parent | 9c2cef670b21c84dc431c00d127767155ddeb715 (diff) | |
parent | a6daf9883756492264e298f6da81b68f056a80b1 (diff) |
Merge "Revise vim_types API"
-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 |