Add VNF Package ID
to output of SHOW VNFLCM
Tacker API add VNF Package ID to the Tacker V1 VNFLCM API. This patch adds `VNF Package ID` to the output of `openstack vnflcm show` command. Fixes-bug: #2078757 Change-Id: I6edd3b5c080aff350cc6e1c8cab4f25bafe02890
This commit is contained in:
@@ -31,7 +31,8 @@ _attr_map = (
|
||||
('vnfProvider', 'VNF Provider', tacker_osc_utils.LIST_BOTH),
|
||||
('vnfSoftwareVersion', 'VNF Software Version', tacker_osc_utils.LIST_BOTH),
|
||||
('vnfProductName', 'VNF Product Name', tacker_osc_utils.LIST_BOTH),
|
||||
('vnfdId', 'VNFD ID', tacker_osc_utils.LIST_BOTH)
|
||||
('vnfdId', 'VNFD ID', tacker_osc_utils.LIST_BOTH),
|
||||
('vnfPkgId', 'VNF Package ID', tacker_osc_utils.LIST_BOTH)
|
||||
)
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@@ -40,7 +41,7 @@ _mixed_case_fields = ('vnfInstanceName', 'vnfInstanceDescription', 'vnfdId',
|
||||
'vnfProvider', 'vnfProductName', 'vnfSoftwareVersion',
|
||||
'vnfdVersion', 'instantiationState',
|
||||
'vimConnectionInfo', 'instantiatedVnfInfo',
|
||||
'vnfConfigurableProperties')
|
||||
'vnfConfigurableProperties', 'vnfPkgId')
|
||||
|
||||
_VNF_INSTANCE = 'vnf_instance'
|
||||
|
||||
@@ -68,6 +69,7 @@ def _get_columns(vnflcm_obj, action=None):
|
||||
'instantiationState': 'Instantiation State',
|
||||
'_links': 'Links',
|
||||
'vnfConfigurableProperties': 'VNF Configurable Properties',
|
||||
'vnfPkgId': 'VNF Package ID',
|
||||
}
|
||||
if action == 'show':
|
||||
if vnflcm_obj['instantiationState'] == 'INSTANTIATED':
|
||||
|
@@ -50,7 +50,7 @@ def _get_columns_vnflcm(action='create'):
|
||||
columns = ['ID', 'Instantiation State', 'VNF Instance Description',
|
||||
'VNF Instance Name', 'VNF Product Name', 'VNF Provider',
|
||||
'VNF Software Version', 'VNFD ID', 'VNFD Version', 'Links',
|
||||
'VNF Configurable Properties']
|
||||
'VNF Configurable Properties', 'VNF Package ID']
|
||||
if action == 'show':
|
||||
columns.extend(['Instantiated Vnf Info', 'VIM Connection Info'])
|
||||
if action == 'list':
|
||||
|
@@ -39,6 +39,7 @@ def vnf_instance_response(attrs=None, instantiation_state='NOT_INSTANTIATED'):
|
||||
"vnfProductName": "Sample VNF",
|
||||
"vnfSoftwareVersion": "1.0",
|
||||
"vnfdVersion": "1.0",
|
||||
"vnfPkgId": uuidsentinel.uuid,
|
||||
"_links": "vnflcm/v1/vnf_instances/" + uuidsentinel.vnf_instance_id +
|
||||
"/instantiate",
|
||||
"instantiationState": instantiation_state,
|
||||
|
Reference in New Issue
Block a user