Fix drop of config values supplied by end user

This commit adds code to ensure that the values supplied by end
user for 'config' argument is not dropped in the create_vnf()
method. This scenario occurs in the case where end user supplies
values for both the 'config' and 'param-file' arguments.

Change-Id: Ied565217c2571283330f8f8cf62f76e2942826ba
Closes-Bug: #1493671
This commit is contained in:
Vishwanath Jayaraman 2015-09-09 01:10:08 -05:00
parent 0d21069505
commit 54c71bb9e3
1 changed files with 3 additions and 2 deletions

View File

@ -467,10 +467,11 @@ class Client(ClientBase):
for key in ('tenant_id', 'name'):
if key in arg:
arg_[key] = arg[key]
arg_['attributes'] = {}
if 'config' in arg:
arg_['attributes'] = {'config': arg['config']}
arg_['attributes']['config'] = arg['config']
if 'param_values' in arg:
arg_['attributes'] = {'param_values': arg['param_values']}
arg_['attributes']['param_values'] = arg['param_values']
body_ = {self._DEVICE: arg_}
ret = self.create_device(body_)
return {self._VNF: ret[self._DEVICE]}