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'
|
api = 'servicevm'
|
||||||
resource = None
|
resource = None
|
||||||
log = None
|
log = None
|
||||||
|
remove_output_fields = []
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(CreateCommand, self).get_parser(prog_name)
|
parser = super(CreateCommand, self).get_parser(prog_name)
|
||||||
@ -442,6 +443,9 @@ class CreateCommand(TackerCommand, show.ShowOne):
|
|||||||
if info:
|
if info:
|
||||||
print(_('Created a new %s:') % self.resource,
|
print(_('Created a new %s:') % self.resource,
|
||||||
file=self.app.stdout)
|
file=self.app.stdout)
|
||||||
|
for f in self.remove_output_fields:
|
||||||
|
if f in info:
|
||||||
|
info.pop(f)
|
||||||
else:
|
else:
|
||||||
info = {'': ''}
|
info = {'': ''}
|
||||||
return zip(*sorted(info.iteritems()))
|
return zip(*sorted(info.iteritems()))
|
||||||
|
@ -42,6 +42,7 @@ class CreateVNF(tackerV10.CreateCommand):
|
|||||||
"""create a VNF."""
|
"""create a VNF."""
|
||||||
|
|
||||||
resource = _VNF
|
resource = _VNF
|
||||||
|
remove_output_fields = ["attributes"]
|
||||||
|
|
||||||
def add_known_arguments(self, parser):
|
def add_known_arguments(self, parser):
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
@ -42,6 +42,7 @@ class CreateVNFD(tackerV10.CreateCommand):
|
|||||||
"""create a VNFD."""
|
"""create a VNFD."""
|
||||||
|
|
||||||
resource = _VNFD
|
resource = _VNFD
|
||||||
|
remove_output_fields = ["attributes"]
|
||||||
|
|
||||||
def add_known_arguments(self, parser):
|
def add_known_arguments(self, parser):
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user