Merge "Fix the VNFFG update osc command"

This commit is contained in:
Zuul 2018-03-14 15:13:00 +00:00 committed by Gerrit Code Review
commit 9879a46f58
1 changed files with 8 additions and 3 deletions

View File

@ -229,6 +229,10 @@ class UpdateVNFFG(command.ShowOne):
def get_parser(self, prog_name):
parser = super(UpdateVNFFG, self).get_parser(prog_name)
parser.add_argument(
_VNFFG,
metavar="<VNFFG>",
help=_('VNFFG to update (name or ID)'))
parser.add_argument(
'--vnffgd-template',
help=_('VNFFGD file to update VNFFG'))
@ -286,13 +290,14 @@ class UpdateVNFFG(command.ShowOne):
raise exceptions.InvalidInput('The parameter file is empty')
body[_VNFFG]['attributes'] = {'param_values': param_yaml}
tackerV10.update_dict(parsed_args, body[self.resource],
['tenant_id', 'vnf_mapping',
'symmetrical', 'description'])
['vnf_mapping', 'symmetrical', 'description'])
return body
def take_action(self, parsed_args):
client = self.app.client_manager.tackerclient
vnffg = client.create_vnffg(self.args2body(parsed_args))
obj_id = tackerV10.find_resourceid_by_name_or_id(
client, _VNFFG, parsed_args.vnffg)
vnffg = client.update_vnffg(obj_id, self.args2body(parsed_args))
display_columns, columns = _get_columns(vnffg[_VNFFG])
data = utils.get_item_properties(
sdk_utils.DictModel(vnffg[_VNFFG]),