Merge "The vnf-create and vnfd-create output is hard to read"

This commit is contained in:
Jenkins 2015-07-22 13:39:51 +00:00 committed by Gerrit Code Review
commit 2fd66f81f5
3 changed files with 6 additions and 0 deletions

View File

@ -412,6 +412,7 @@ class CreateCommand(TackerCommand, show.ShowOne):
api = 'servicevm'
resource = None
log = None
remove_output_fields = []
def get_parser(self, prog_name):
parser = super(CreateCommand, self).get_parser(prog_name)
@ -442,6 +443,9 @@ class CreateCommand(TackerCommand, show.ShowOne):
if info:
print(_('Created a new %s:') % self.resource,
file=self.app.stdout)
for f in self.remove_output_fields:
if f in info:
info.pop(f)
else:
info = {'': ''}
return zip(*sorted(info.iteritems()))

View File

@ -42,6 +42,7 @@ class CreateVNF(tackerV10.CreateCommand):
"""create a VNF."""
resource = _VNF
remove_output_fields = ["attributes"]
def add_known_arguments(self, parser):
parser.add_argument(

View File

@ -42,6 +42,7 @@ class CreateVNFD(tackerV10.CreateCommand):
"""create a VNFD."""
resource = _VNFD
remove_output_fields = ["attributes"]
def add_known_arguments(self, parser):
parser.add_argument(