Commit 73e16fb8 authored by Sana Zulfiqar's avatar Sana Zulfiqar
Browse files

Descriptor checks added in 7.3.3.7.1

parent 480667a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1327,7 +1327,7 @@ Match the VNF Instance Response Attributes with Descriptors
    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']['vnfSoftwareVersion']}    ${Software_Version}
    Should Be Equal As Strings    ${response['body']['vnfdVersion']}    ${Descriptor_Version}
    Should Be Equal As Strings    ${response['body']['instantiatedVnfInfo']['flavourId']}    ${Flavour_ID}
    List Should Contain Value    ${VDU_IDs}    ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']}        
+11 −33
Original line number Diff line number Diff line
@@ -1538,11 +1538,7 @@ PARSE the Descriptor File
    Run Keyword If  '${descriptorType}'=='SOL001'    Fetch Information from SOL001 descriptor file    ELSE    Fetch Information from SOL006 descriptor file    
    
Fetch Information from SOL001 descriptor file
    @{VDU_labels}=    Create List
    @{VNF_labels}=    Create List
    @{VirtualLink_labels}=    Create List
    @{CP_labels}=    Create List
    @{Storage_labels}=    Create List
    FOR    ${key}    IN    @{topology_template.node_templates.keys()} 
        ${key_type}=    Get Variable Value    ${topology_template.node_templates.${key}.type}

@@ -1587,7 +1583,7 @@ Match the VNF Package Response Attributes with Descriptors
    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']['vnfSoftwareVersion']}    ${Software_Version}
    Should Be Equal As Strings    ${response['body']['vnfdVersion']}    ${Descriptor_Version}

    
@@ -1595,32 +1591,14 @@ Check HTTP Response Body of Individual Subscription content against VNF Descript
    Run Keyword If    ${check_descriptors} == 1    Check Individual VNF Subscription Content
    
Check Individual VNF Subscription Content
    Run Keyword If  '${descriptorType}'=='SOL001'  Parse SOL001 Package Subscription    ELSE    Parse SOL006 Package Subscription
    
Parse SOL001 Package Subscription
    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}
    
    Should Be Equal As Strings    ${response['body']['filter']['vnfdId']}    ${descriptor_id}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProvider']}    ${provider}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['vnfProductName']}    ${product_name}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['versions']['vnfSoftwareVesion']}    ${software_version}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['versions']['vnfdVersion']}    ${descriptor_version}
    PARSE the Descriptor File
    Match the VNF subscription Response Attributes with Descriptors
    
Parse SOL006 Package Subscription
    ${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}
Match the VNF subscription Response Attributes with Descriptors
    #Checking Response attributes with VNF Descriptors
    Should Be Equal As Strings    ${response['body']['filter']['vnfdId']}    ${Descriptor_ID}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProvider']}    ${Provider}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['vnfProductName']}    ${Product_Name}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['versions']['vnfSoftwareVersion']}    ${Software_Version}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['versions']['vnfdVersion']}    ${Descriptor_Version}
    
 No newline at end of file
    Should Be Equal As Strings    ${response['body']['filter']['vnfdId']}    ${descriptor_id}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProvider']}    ${provider}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['vnfProductName']}    ${product_name}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['versions']['vnfSoftwareVesion']}    ${software_version}
    Should Be Equal As Strings    ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['versions']['vnfdVersion']}    ${descriptor_version}
 No newline at end of file