Fix for vnfd-delete with vnfd-name as arg
When deleting a vnfd using vnfd-name as argument it returns 'descripton' string, if db has multiple entries with same name. This patch fix this problem by checking the existence of key 'description' in 'vnfd' dict. Change-Id: I3c350ec1b563b1933df93106717f373afc368146 Closes-Bug: #1508174
This commit is contained in:
@@ -417,7 +417,8 @@ class Client(ClientBase):
|
||||
retrieve_all,
|
||||
**_params)
|
||||
for vnfd in vnfds_dict['vnfds']:
|
||||
if len(vnfd['description']) > DEFAULT_DESC_LENGTH:
|
||||
if 'description' in vnfd.keys() and \
|
||||
len(vnfd['description']) > DEFAULT_DESC_LENGTH:
|
||||
vnfd['description'] = vnfd['description'][:DEFAULT_DESC_LENGTH]
|
||||
vnfd['description'] += '...'
|
||||
return vnfds_dict
|
||||
|
Reference in New Issue
Block a user