diff options
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 |