Newer
Older
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
Get VNF LCM Operation occurrences with exclude_default and fields attribute selector
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=${fields}&exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
Get VNF LCM Operation occurrences with exclude_fields attribute selector
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_fields=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Header Contain Link
${linkURL}= Get Value From Json ${response['headers']} $..Link
Should Not Be Empty ${linkURL}
Get key for VNF Descriptor
FOR ${key} IN @{topology_template.node_templates.keys()}
Log ${key}
${check1}= Run Keyword And Return Status Should End With ${key} VNF
Run Keyword If ${check1} Set Global Variable ${vnfKey} ${key}
END
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
Check HTTP Response Body vnfInstance content against VNF Descriptor
#${check_descriptors} flag, 1 to check descriptors
Run Keyword If ${check_descriptors} == 1 Check Individual VNF Instance Content
Check Individual VNF Instance Content
Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 ELSE Parse SOL006
Parse SOL001
Get key for VNF Descriptor
${descriptor_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.descriptor_id}
${provider}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.provider}
${product_name}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.product_name}
${software_version}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.software_version}
${descriptor_version}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.descriptor_version}
${flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id}
Should Be Equal As Strings ${response['body']['vnfdId']} ${descriptor_id}
Should Be Equal As Strings ${response['body']['vnfProvider']} ${provider}
Should Be Equal As Strings ${response['body']['vnfProductName']} ${product_name}
Should Be Equal As Strings ${response['body']['vnfSoftwareVesion']} ${software_version}
Should Be Equal As Strings ${response['body']['vnfdVersion']} ${descriptor_version}
Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['flavourId']} ${flavour_id}
Parse SOL006
${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id}
${provider}= Get Variable Value ${nfv.vnfd[0].provider}
${product_name}= Get Variable Value ${nfv.vnfd[0].product-name}
${software_version}= Get Variable Value ${nfv.vnfd[0].software-version}
${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version}
${external_cp}= Get Variable Value ${nfv.vnfd[0].ext-cpd[0].id}
${vdu_id}= Get Variable Value ${nfv.vnfd[0].vdu[0].id}
${vdu_cpid}= Get Variable Value ${nfv.vnfd[0].vdu[0].int-cpd[2].id}
${virtual_storage}= Get Variable Value ${nfv.vnfd[0].virtual-storage-desc.id}
${virtual_link}= Get Variable Value ${nfv.vnfd[0].int-virtual-link-desc.id}
Should Be Equal As Strings ${response['body']['vnfdId']} ${descriptor_id}
Should Be Equal As Strings ${response['body']['vnfProvider']} ${provider}
Should Be Equal As Strings ${response['body']['vnfProductName']} ${product_name}
Should Be Equal As Strings ${response['body']['vnfSoftwareVesion']} ${software_version}
Should Be Equal As Strings ${response['body']['vnfdVersion']} ${descriptor_version}
Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['extCpInfo']['cpdId']} ${external_cp}
Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} ${vdu_id}
Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vnfcCpInfo']['cpdId']} ${vdu_cpid}
Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['virtualStorageResourceInfo']['virtualStorageDescId']} ${virtual_storage}
Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['extManagedVirtualLinkInfo']['vnfVirtualLinkDescId']} ${virtual_link}
Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 VNF Instance ELSE Parse SOL006 VNF Instance
Parse SOL001 VNF Instance
Get key for VNF Descriptor
${descriptor_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.descriptor_id}
${provider}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.provider}
${product_name}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.product_name}
${software_version}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.software_version}
${descriptor_version}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.descriptor_version}
Parse SOL006 VNF Instance
${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id}
${provider}= Get Variable Value ${nfv.vnfd[0].provider}
${product_name}= Get Variable Value ${nfv.vnfd[0].product-name}
${software_version}= Get Variable Value ${nfv.vnfd[0].software-version}
${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version}
Check HTTP Response Body vnf LCM OpOCC content against VNF Descriptor
Run Keyword If ${check_descriptors} == 1 Check Individual VNF LCM Operation Occurence Content
Check Individual VNF LCM Operation Occurence Content
Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 LCM Op Occ ELSE Parse SOL006 LCM Op Occ
Parse SOL001 LCM Op Occ
Get key for VNF Descriptor
${descriptor_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.descriptor_id}
${descriptor_version}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.descriptor_version}
Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${descriptor_id}
Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${descriptor_version}
Parse SOL006 LCM Op Occ
${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id}
${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version}
${vdu_id}= Get Variable Value ${nfv.vnfd[0].vdu[0].id}
${virtual_storage}= Get Variable Value ${nfv.vnfd[0].virtual-storage-desc.id}
${virtual_link}= Get Variable Value ${nfv.vnfd[0].int-virtual-link-desc.id}
Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${descriptor_id}
Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${descriptor_version}
Should Be Equal As Strings ${response['body']['resourceChanges']['affectedVirtualLinks']['vnfVirtualLinkDescId']} ${virtual_link}
Should Be Equal As Strings ${response['body']['resourceChanges']['affectedVnfcs']['vduId']} ${vdu_id}
Should Be Equal As Strings ${response['body']['resourceChanges']['affectedVirtualStorages']['virtualStorageDescId']} ${virtual_storage}