X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fvim.py;fp=osmclient%2Fsol005%2Fvim.py;h=fa17dfc7db2c20bbb54a8f364720ec42cb639d65;hb=092a31f2a5f27b1ba83a547876bd10d68fea3bcf;hp=34411610a28a047f14c8d5103e9450b5df2ed2ca;hpb=7b6400a05cddf680f4ba80df157ecedfd3fc3b88;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/vim.py b/osmclient/sol005/vim.py index 3441161..fa17dfc 100644 --- a/osmclient/sol005/vim.py +++ b/osmclient/sol005/vim.py @@ -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):