vnfd_list(ctx,filter)
+@cli.command(name='nfpkg-list')
+@click.option('--filter', default=None,
+ help='restricts the list to the xNFpkg matching the filter')
+@click.pass_context
+def nfpkg_list(ctx, filter):
+ '''list all NFpkg (VNFpkg, PNFpkg, HNFpkg) in the system'''
+ vnfd_list(ctx,filter)
+
+
@cli.command(name='vnf-list')
@click.option('--ns', default=None, help='NS instance id or name to restrict the VNF list')
@click.option('--filter', default=None,
vnfd_show(ctx, name, literal)
+@cli.command(name='nfpkg-show', short_help='shows the content of a NF Descriptor')
+@click.option('--literal', is_flag=True,
+ help='print literally, no pretty table')
+@click.argument('name')
+@click.pass_context
+def nfpkg_show(ctx, name, literal):
+ '''shows the content of a NF Descriptor
+
+ NAME: name or ID of the NFpkg
+ '''
+ vnfd_show(ctx, name, literal)
+
+
@cli.command(name='ns-show', short_help='shows the info of a NS instance')
@click.argument('name')
@click.option('--literal', is_flag=True,
vnfd_create(ctx, filename, overwrite)
+@cli.command(name='nfpkg-create', short_help='creates a new NFpkg')
+@click.argument('filename')
+@click.option('--overwrite', default=None,
+ help='overwrites some fields in NFD')
+@click.pass_context
+def nfpkg_create(ctx, filename, overwrite):
+ '''creates a new NFpkg
+
+ FILENAME: NF Descriptor yaml file or NFpkg tar.gz file
+ '''
+ vnfd_create(ctx, filename, overwrite)
+
+
@cli.command(name='ns-create', short_help='creates a new Network Service instance')
@click.option('--ns_name',
prompt=True, help='name of the NS instance')
vnfd_update(ctx, name, content)
+@cli.command(name='nfpkg-update', short_help='updates a NFpkg')
+@click.argument('name')
+@click.option('--content', default=None,
+ help='filename with the NFpkg replacing the current one')
+@click.pass_context
+def nfpkg_update(ctx, name, content):
+ '''updates a NFpkg
+
+ NAME: NF Descriptor yaml file or NFpkg tar.gz file
+ '''
+ vnfd_update(ctx, name, content)
+
+
def nst_update(ctx, name, content):
try:
check_client_version(ctx.obj, ctx.command.name)
vnfd_delete(ctx, name, force)
+@cli.command(name='nfpkg-delete', short_help='deletes a NFpkg')
+@click.argument('name')
+@click.option('--force', is_flag=True, help='forces the deletion bypassing pre-conditions')
+@click.pass_context
+def nfpkg_delete(ctx, name, force):
+ '''deletes a NFpkg
+
+ NAME: name or ID of the NFpkg to be deleted
+ '''
+ vnfd_delete(ctx, name, force)
+
+
@cli.command(name='ns-delete', short_help='deletes a NS instance')
@click.argument('name')
@click.option('--force', is_flag=True, help='forces the deletion bypassing pre-conditions')