3131 ('vnfProvider' , 'VNF Provider' , tacker_osc_utils .LIST_BOTH ),
3232 ('vnfSoftwareVersion' , 'VNF Software Version' , tacker_osc_utils .LIST_BOTH ),
3333 ('vnfProductName' , 'VNF Product Name' , tacker_osc_utils .LIST_BOTH ),
34- ('vnfdId' , 'VNFD ID' , tacker_osc_utils .LIST_BOTH ),
35- ('vnfPkgId' , 'VNF Package ID' , tacker_osc_utils .LIST_BOTH )
34+ ('vnfdId' , 'VNFD ID' , tacker_osc_utils .LIST_BOTH )
3635)
3736
3837LOG = logging .getLogger (__name__ )
@@ -68,8 +67,7 @@ def _get_columns(vnflcm_obj, action=None):
6867 'vnfdVersion' : 'VNFD Version' ,
6968 'instantiationState' : 'Instantiation State' ,
7069 '_links' : 'Links' ,
71- 'vnfConfigurableProperties' : 'VNF Configurable Properties' ,
72- 'vnfPkgId' : 'VNF Package ID' ,
70+ 'vnfConfigurableProperties' : 'VNF Configurable Properties'
7371 }
7472 if action == 'show' :
7573 if vnflcm_obj ['instantiationState' ] == 'INSTANTIATED' :
@@ -80,6 +78,12 @@ def _get_columns(vnflcm_obj, action=None):
8078 {'vimConnectionInfo' : 'VIM Connection Info' ,
8179 '_links' : 'Links' }
8280 )
81+ # Note: To prevent it from appearing in the v2 API output,
82+ # the 'VNF Package ID' will be output only if the vnfPkgId exists.
83+ if 'vnfPkgId' in vnflcm_obj :
84+ column_map .update (
85+ {'vnfPkgId' : 'VNF Package ID' }
86+ )
8387 return sdk_utils .get_osc_show_columns_for_sdk_resource (vnflcm_obj ,
8488 column_map )
8589
0 commit comments