X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=osmclient%2Fsol005%2Fvim.py;h=fa17dfc7db2c20bbb54a8f364720ec42cb639d65;hb=c391f296f052a1a924f12d76fc6b2f5ba61e28bf;hp=34411610a28a047f14c8d5103e9450b5df2ed2ca;hpb=bea7283d41dfaeb0eac8f940234dff9ae39e653b;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):