projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added --filter option to command vim-show
[osm/osmclient.git]
/
osmclient
/
sol005
/
vnfd.py
diff --git
a/osmclient/sol005/vnfd.py
b/osmclient/sol005/vnfd.py
index
8307088
..
ac44495
100644
(file)
--- a/
osmclient/sol005/vnfd.py
+++ b/
osmclient/sol005/vnfd.py
@@
-204,7
+204,8
@@
class Vnfd(object):
for k in vnfd:
# Get only the first descriptor in case there are many in the yaml file
# k can be vnfd:vnfd-catalog or vnfd-catalog. This check is skipped
for k in vnfd:
# Get only the first descriptor in case there are many in the yaml file
# k can be vnfd:vnfd-catalog or vnfd-catalog. This check is skipped
- vdu_list = vnfd[k]['vnfd'][0]['vdu']
+ first_vnfd = vnfd[k]['vnfd'][0]
+ vdu_list = first_vnfd.get('vdu',[])
break;
for vdu_number, vdu in enumerate(vdu_list):
if override_epa:
break;
for vdu_number, vdu in enumerate(vdu_list):
if override_epa:
@@
-253,7
+254,7
@@
class Vnfd(object):
if resp:
resp = json.loads(resp)
if not resp or 'id' not in resp:
if resp:
resp = json.loads(resp)
if not resp or 'id' not in resp:
- raise ClientException('unexpected response from server: '.format(resp))
+ raise ClientException('unexpected response from server:
{}
'.format(resp))
print(resp['id'])
elif http_code == 204:
print('Updated')
print(resp['id'])
elif http_code == 204:
print('Updated')