Merge "The vnf-create and vnfd-create output is hard to read"
This commit is contained in:
commit
2fd66f81f5
@ -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()))
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user