X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fscripts%2Fosm.py;fp=osmclient%2Fscripts%2Fosm.py;h=3af70c696c1ec1cdf4077296e5b106ccc8a9fbff;hb=4b30b876b197d05b09f34d1ae4b57e331165d0fa;hp=c97f98401606db427e1da26543d35b4d45a328e6;hpb=0438395c63edebf5f34688906decc06935f037e6;p=osm%2Fosmclient.git diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index c97f984..3af70c6 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -543,7 +543,7 @@ def vnfd_list(ctx, nf_type, filter, long): table = PrettyTable(['nfpkg name', 'id', 'desc type']) for vnfd in resp: name = vnfd.get('id', vnfd.get('name','-')) - descriptor_type = 'sol005' if 'product-name' in vnfd else 'rel8' + descriptor_type = 'sol006' if 'product-name' in vnfd else 'rel8' if long: onb_state = vnfd['_admin'].get('onboardingState','-') op_state = vnfd['_admin'].get('operationalState','-') @@ -4312,7 +4312,7 @@ def package_create(ctx, # exit(1) @cli_osm.command(name='package-validate', - short_help='Validate a package descriptor') + short_help='Validate a package descriptor') @click.argument('base-directory', default=".", required=False) @@ -4320,10 +4320,15 @@ def package_create(ctx, default=True, help='The activated recursive option will validate the yaml files' ' within the indicated directory and in its subdirectories') +@click.option('--old', + is_flag=True, + default=False, + help='Validates also the descriptors using the previous OSM format (pre SOL006)') @click.pass_context def package_validate(ctx, base_directory, - recursive): + recursive, + old): """ Validate descriptors given a base directory. @@ -4332,7 +4337,7 @@ def package_validate(ctx, """ # try: check_client_version(ctx.obj, ctx.command.name) - results = ctx.obj.package_tool.validate(base_directory, recursive) + results = ctx.obj.package_tool.validate(base_directory, recursive, old) table = PrettyTable() table.field_names = ["TYPE", "PATH", "VALID", "ERROR"] # Print the dictionary generated by the validation function