Commit 67acbdbf authored by zafar's avatar zafar
Browse files

SOL006 descriptors added for Test ID: 5.3.2.2.2

parent 6d4a5d58
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ GET Information about an individual NS Instance
    GET IndividualNSInstance
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    NsInstance
    Check HTTP Response Body NsInstance content against VNF Descriptor
    
PUT Individual NSInstance - Method not implemented 
    [Documentation]    Test ID: 5.3.2.2.3
+52 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ Library OperatingSystem
Library    MockServerLibrary
Library    Collections
Library    String
Variables  descriptors/SOL001/vnf-b-1_VNF.yaml


*** Keywords ***
Initialize System
@@ -221,6 +223,56 @@ POST New nsInstance
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}     

Check HTTP Response Body NsInstance content against VNF Descriptor
    #${check_descriptors} flag, 1 to check descriptors
    Run Keyword If    ${check_descriptors} == 1    Check Individual NsInstance Content

Check Individual NsInstance 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']['vnfInstance']['vnfdId']}    ${descriptor_id}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['vnfProvider']}    ${provider}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['vnfProductName']}    ${product_name}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['vnfSoftwareVesion']}    ${software_version}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['vnfdVersion']}    ${descriptor_version}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['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}
     ${virtual_storage}=    Get Variable Value    ${nfv.vnfd[0].vdu[0].virtual-storage-desc}
     
    Should Be Equal As Strings    ${response['body']['vnfInstance']['vnfdId']}    ${descriptor_id}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['vnfProvider']}    ${provider}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['vnfProductName']}    ${product_name}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['vnfSoftwareVesion']}    ${software_version}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['vnfdVersion']}    ${descriptor_version}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['instantiatedVnfInfo']['extCpInfo']['cpdId']}    ${external_cp}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']}    ${vdu_id}
    Should Be Equal As Strings    ${response['body']['vnfInstance']['instantiatedVnfInfo']['virtualStorageResourceInfo']['virtualStorageDescId']}    ${virtual_storage}

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

POST New nsInstance with DISABLED nsd
    Log    Create NS instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances
    Set Headers  {"Accept":"${ACCEPT}"}  
+12 −1
Original line number Diff line number Diff line
@@ -77,3 +77,14 @@ ${NEG_SELECTOR} fields=wrong_field
${json}    {"notificationStatus": ""}

${callbackResp}    127.0.0.1

${descriptorType}    SOL001
${vnfKey}    {}
${check_descriptors}	1

${descriptor_id}	
${provider}	
${product_name}    
${software_version}    
${descriptor_version}
${flavour_id}
 No newline at end of file
+1 −1

File changed.

Contains only whitespace changes.