Commit a2b23593 authored by Mudassar Khan's avatar Mudassar Khan Committed by Giacomo Bernini
Browse files

implement test case to get Paged Response with nextpage_opauque_marker parameter

parent 961362d6
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -213,3 +213,28 @@ GET information about multiple VNF instances - Bad Request Response too big
    GET multiple vnfInstances
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails

GET information about multiple VNF instances to get Paged Response
    [Documentation]    Test ID: 6.3.5.1.17
    ...    Test title: GET information about multiple VNF instances to get Paged Response
    ...    Test objective: The objective is to query information about multiple VNF instances to get Paged Response.
    ...    Pre-conditions:  none
    ...    Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.1.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: The VNFM supports response paging for the subscriptions resources
    ...    Post-Conditions: none
    GET multiple vnfInstances
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Contain Link to next page

GET information about multiple VNF instances as a Paged Response with nextpage_opauque_marker parameter 
    [Documentation]    Test ID: 6.3.5.1.17a
    ...    Test title: GET information about multiple VNF instances as a Paged Response with nextpage_opauque_marker parameter 
    ...    Test objective: The objective is to query information about multiple VNF instances as a Paged Response and retrieve the next page using the nextpage_opaque_marker parameter
    ...    Pre-conditions: A request for retrieving multiple VNF instances as a paged response has been successfully issued (Test ID 6.3.5.1.17)
    ...    Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.1.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: The VNFM supports response paging for the VNF instance resources
    ...    Post-Conditions: none 
    Get multiple vnfInstances with nextpage_opaque_marker parameter 
    Check HTTP Response Status Code Is    200
 No newline at end of file
+23 −1
Original line number Diff line number Diff line
@@ -2493,3 +2493,25 @@ Check operation resource state is ROLLED_BACK
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} 
    String    response body instantiationState    ROLLED_BACK   

Check HTTP Response Header Contain Link to next page
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}
    Log    Check that Link header contains rel set to next
    Should Contain    ${linkURL}    rel="next"
    Log    Check that Link header contains URI to next page between <>
    ${linkHeaderUri}=    Get Regexp Matches    ${linkURL}    (?<=\<)(.*?)(?=\>)
    ${length}=    Get Length    ${linkHeaderUri}    
    Should Be Equal As Integers    ${length}   0
    Set Global Variable    ${nextPageUri}    ${linkHeaderUri[0]} 

Get multiple vnfInstances with nextpage_opaque_marker parameter
    Log    Get next page of subscriptions
    Set Headers  {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query using the URI provided in the previous GET request and validate response
    Get    ${nextPageUri}
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}