Commit 378a309f authored by Giacomo Bernini's avatar Giacomo Bernini Committed by Giacomo Bernini
Browse files

added oauth scope tests for NFVICI individuak information

parent 5a1d810f
Loading
Loading
Loading
Loading
+26 −1
Original line number Diff line number Diff line
@@ -88,3 +88,28 @@ DELETE Individual VIMs NFVI Capacity Information - Method Not implemented
    ...    Post-Conditions: VNF Snapshot Package deleted
    DELETE Individual VIMs NFVI Capacity Information
    Check HTTP Response Status Code Is    405

GET Information about an Individual VIMs NFVI Capacity Information with permitted authorization scope
    [Documentation]    Test ID: 5.3.6.3.8
    ...    Test title: GET Information about an Individual VIMs NFVI Capacity Information with permitted authorization scope
    ...    Test objective: The objective is to retrieve information about Individual VIMs NFVI Capacity Information with permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual VIMs NFVI Capacity Information with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    NfviCapacityInfo

GET Information about an Individual VIMs NFVI Capacity Information with not permitted authorization scope
    [Documentation]    Test ID: 5.3.6.3.9
    ...    Test title: GET Information about an Individual VIMs NFVI Capacity Information with not permitted authorization scope
    ...    Test objective: The objective is to test that retrieve information about Individual VIMs NFVI Capacity Information fails when using not permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual VIMs NFVI Capacity Information with not permitted authorization scope
    Check HTTP Response Status Code Is    401
 No newline at end of file
+25 −1
Original line number Diff line number Diff line
@@ -254,6 +254,30 @@ GET Individual VIMs NFVI Capacity Information
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}   

GET Individual VIMs NFVI Capacity Information with permitted authorization scope
    log    Trying to get information about an Individual VIMs NFVI Capacity Information
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${INFOS_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/${vimId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}  

GET Individual VIMs NFVI Capacity Information with not permitted authorization scope
    log    Trying to get information about an Individual VIMs NFVI Capacity Information
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${NOT_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/${vimId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}   

GET Individual VIMs NFVI Capacity Information using filter
    log    Trying to get information about an Individual VIMs NFVI Capacity Information
    Set Headers    {"Accept":"${ACCEPT_JSON}"}