Added validation for vnfd-create

Modified vnfd.py

Change-Id: I9cf523beecc9ede93168bb370b48936cf2adca40
Closes-Bug: 1481446
This commit is contained in:
Shrinath Suresh
2015-08-07 09:14:05 +00:00
parent 2fd66f81f5
commit a3f34f83c6

View File

@@ -45,18 +45,15 @@ class CreateVNFD(tackerV10.CreateCommand):
remove_output_fields = ["attributes"]
def add_known_arguments(self, parser):
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('--vnfd-file', help='specify vnfd file')
group.add_argument('--vnfd', help='specify vnfd')
parser.add_argument(
'--name',
help='Set a name for the vnfd')
parser.add_argument(
'--description',
help='Set a description for the vnfd')
parser.add_argument(
'--vnfd-file',
help='specify vnfd file')
parser.add_argument(
'--vnfd',
help='specify vnfd')
def args2body(self, parsed_args):
body = {self.resource: {}}