adding operational state to the vim-list
[osm/osmclient.git] / osmclient / sol005 / vim.py
index 3441161..fa17dfc 100644 (file)
@@ -228,10 +228,9 @@ class Vim(object):
         _, resp = self._http.get2_cmd('{}{}'.format(self._apiBase,filter_string))
         if not resp:
             return list()
-        vim_accounts = []
-        for datacenter in json.loads(resp):
-            vim_accounts.append({"name": datacenter['name'], "uuid": datacenter['_id']
-                        if '_id' in datacenter else None})
+        vim_accounts = json.loads(resp)
+        for datacenter in vim_accounts:
+            datacenter["uuid"] = datacenter.get('_id')  # backward compatibility?
         return vim_accounts
 
     def get(self, name):