Commit 8147bf29 authored by Sana Zulfiqar's avatar Sana Zulfiqar
Browse files

minor fixes

parent 1c4a4929
Loading
Loading
Loading
Loading
+5 −31
Original line number Diff line number Diff line
@@ -125,16 +125,9 @@ Send VNF Instance Resource Create Request
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    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}
    ${configurable_properties}=    Get Variable Value    ${topology_template.node_templates.${vnfKey}.properties.configurable_properties}
    ${flavour_id}=    Get Variable Value    ${topology_template.node_templates.${vnfKey}.properties.flavour_id}
    Run Keyword If    ${check_descriptors} == 1    PARSE the Descriptor File
    ${template}=    Get File    jsons/createVnfRequest.json
    ${body}=        Format String   ${template}     vnfdId=${descriptor_id}    vnfProvider=${provider}    vnfProductName=${product_name}    vnfSoftwareVersion=${software_version}    vnfdVersion= ${descriptor_version}    vnfConfigurableProperties=${configurable_properties}    flavourId=${flavour_id}
    ${body}=        Format String   ${template}     vnfdId=${Descriptor_ID}    vnfProvider=${Provider}    vnfProductName=${Product_Name}    vnfSoftwareVersion=${Software_Version}    vnfdVersion= ${Descriptor_Version}    vnfConfigurableProperties=${configurable_properties}    flavourId=${Flavour_ID}
    ${response}=    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances    ${body}

Send VNF Instance Resource Delete Request
@@ -1347,29 +1340,10 @@ Check Individual VNF LCM Operation Occurence Content
    
Match the VNF LCM Operation Occurence Response Attributes with Descriptors
    #Checking Response attributes with VNF Descriptors
    Should Be Equal As Strings    ${response['body']['vnfdId']}    ${Descriptor_ID}
    Should Be Equal As Strings    ${response['body']['vnfdVersion']}    ${Descriptor_Version}
    Should Be Equal As Strings    ${response['body']['changedInfo']['vnfdId']}    ${Descriptor_ID}
    Should Be Equal As Strings    ${response['body']['changedInfo']['vnfdVersion']}    ${Descriptor_Version}
    List Should Contain Value    ${VDU_IDs}    ${response['body']['resourceChanges']['AffectedVnfc']['vduId']}
    List Should Contain value    ${Storage_IDs}    ${response['body']['resourceChanges']['affectedVirtualStorages']['virtualStorageDescId']}
    List Should Contain Value    ${VirtualLink_IDs}    ${response['body']['resourceChanges']['affectedVirtualLinks']['vnfVirtualLinkDescId']}
    
    
    List Should Contain Value    ${VirtualLink_IDs}    ${response['body']['resourceChanges']['affectedVirtualLinks']['virtualStorageDescId']}
    
Add VNF Descriptor Content to VNF Instance
    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} 
    
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -5,7 +5,8 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fals
Library    OperatingSystem
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Variables    descriptors/SOL001/vnf-b-1_VNF.yaml
Variables    descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml
Variables    descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml
Documentation    This resource represents grants. The client can use this resource to obtain permission
...     from the NFVO to perform a particular VNF lifecycle operation.

+4 −4
Original line number Diff line number Diff line
@@ -291,10 +291,10 @@ Get Instantiation Levels
    Set Global Variable    ${InstantiationLevel_IDs}    ${Instantiation_Levels}
    
Match the grant Response Attributes with Descriptors
    Run Keyword If  '${descriptorType}'=='SOL006'    List Should Contain Value    ${externalCP_IDs}    ${response['body']['Grant']['extVirtualLinks']['extCps']['cpdId']}
    Run Keyword If  '${descriptorType}'=='SOL001'    List Should Contain Value    @{CP_IDs}    ${response['body']['Grant']['extVirtualLinks']['extCps']['cpdId']}
    List Should Contain Value    ${VirtualLink_IDs}    ${response['body']['Grant']['ExtManagedVirtualLinkData']['vnfVirtualLinkDescId']}
    List Should Contain value    ${Compute_IDs}    ${response['body']['Grant']['vimAssets']['computeResourceFlavours']['vnfdVirtualComputeDescId']}
    Run Keyword If  '${descriptorType}'=='SOL006'    List Should Contain Value    ${externalCP_IDs}    ${response['body']['extVirtualLinks']['extCps']['cpdId']}
    Run Keyword If  '${descriptorType}'=='SOL001'    List Should Contain Value    @{CP_IDs}    ${response['body']['extVirtualLinks']['extCps']['cpdId']}
    List Should Contain Value    ${VirtualLink_IDs}    ${response['body']['ExtManagedVirtualLinkData']['vnfVirtualLinkDescId']}
    List Should Contain value    ${Compute_IDs}    ${response['body']['vimAssets']['computeResourceFlavours']['vnfdVirtualComputeDescId']}