From ba372bfcfdc8e3324e1ff93e49db4209538adda9 Mon Sep 17 00:00:00 2001 From: Cong Phuoc Hoang Date: Thu, 28 Jun 2018 11:57:40 +0900 Subject: [PATCH] Updates in NS and VNFFG list commands This patch will do 2 things: 1. Add 'vnf_ids' and 'vnffg_ids' fields as outputs from network service list command. Users can know which VNFs or VNFFG, that belongs to specific NS. 2. Add 'ns_id' fields to VNFFG list command, that shows which network service the current VNFFG belongs to it. Partially-implements: blueprint vnffg-ns Change-Id: If6c5550f94e676fb2062e32ddc069acd5dfb6490 --- tackerclient/osc/v1/nfvo/ns.py | 5 +++-- tackerclient/osc/v1/nfvo/vnffg.py | 1 + tackerclient/tacker/v1_0/nfvo/ns.py | 3 ++- tackerclient/tacker/v1_0/nfvo/vnffg.py | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tackerclient/osc/v1/nfvo/ns.py b/tackerclient/osc/v1/nfvo/ns.py index 647137de..80c7b86e 100644 --- a/tackerclient/osc/v1/nfvo/ns.py +++ b/tackerclient/osc/v1/nfvo/ns.py @@ -28,8 +28,9 @@ from tackerclient.tacker import v1_0 as tackerV10 _attr_map = ( ('id', 'ID', tacker_osc_utils.LIST_BOTH), ('name', 'Name', tacker_osc_utils.LIST_BOTH), - ('nsd_id', 'NSD ID', - tacker_osc_utils.LIST_BOTH), + ('nsd_id', 'NSD ID', tacker_osc_utils.LIST_BOTH), + ('vnf_ids', 'VNF IDs', tacker_osc_utils.LIST_BOTH), + ('vnffg_ids', 'VNFFG IDs', tacker_osc_utils.LIST_BOTH), ('mgmt_urls', 'Mgmt Urls', tacker_osc_utils.LIST_BOTH), ('status', 'Status', tacker_osc_utils.LIST_BOTH), ) diff --git a/tackerclient/osc/v1/nfvo/vnffg.py b/tackerclient/osc/v1/nfvo/vnffg.py index 536b5357..0957d010 100644 --- a/tackerclient/osc/v1/nfvo/vnffg.py +++ b/tackerclient/osc/v1/nfvo/vnffg.py @@ -39,6 +39,7 @@ DEFAULT_ERROR_REASON_LENGTH = 100 _attr_map_vnffg = ( ('id', 'ID', tacker_osc_utils.LIST_BOTH), ('name', 'Name', tacker_osc_utils.LIST_BOTH), + ('ns_id', 'NS ID', tacker_osc_utils.LIST_BOTH), ('vnffgd_id', 'VNFFGD ID', tacker_osc_utils.LIST_BOTH), ('status', 'Status', tacker_osc_utils.LIST_BOTH), ('description', 'Description', tacker_osc_utils.LIST_LONG_ONLY), diff --git a/tackerclient/tacker/v1_0/nfvo/ns.py b/tackerclient/tacker/v1_0/nfvo/ns.py index a3bc65da..a179907c 100644 --- a/tackerclient/tacker/v1_0/nfvo/ns.py +++ b/tackerclient/tacker/v1_0/nfvo/ns.py @@ -25,7 +25,8 @@ class ListNS(tackerV10.ListCommand): """List NS that belong to a given tenant.""" resource = _NS - list_columns = ['id', 'name', 'nsd_id', 'mgmt_urls', 'status'] + list_columns = ['id', 'name', 'nsd_id', 'vnf_ids', 'vnffg_ids', + 'mgmt_urls', 'status'] class ShowNS(tackerV10.ShowCommand): diff --git a/tackerclient/tacker/v1_0/nfvo/vnffg.py b/tackerclient/tacker/v1_0/nfvo/vnffg.py index 6cb7224b..b07f9de9 100644 --- a/tackerclient/tacker/v1_0/nfvo/vnffg.py +++ b/tackerclient/tacker/v1_0/nfvo/vnffg.py @@ -78,7 +78,8 @@ class ListVNFFG(tackerV10.ListCommand): """List VNFFGs that belong to a given tenant.""" resource = _VNFFG - list_columns = ['id', 'name', 'description', 'status', 'vnffgd_id'] + list_columns = ['id', 'name', 'ns_id', + 'description', 'status', 'vnffgd_id'] class ShowVNFFG(tackerV10.ShowCommand):