Commit 4ab06e0a authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch 'SOL005-NFVICapacityInformation' into '4.5.1-dev'

SOL005 NFVI Capacity management - Implementation of deltas between v4.5.1 and v4.4.1

See merge request !330
parents 4f322189 0513cfa0
Loading
Loading
Loading
Loading
+35 −10
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ POST Create Capacity Threshold
    ...    Test title: POST Create Capacity Threshold
    ...    Test objective: The objective is to test that POST method creates a Capacity  Threshold
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -21,7 +21,7 @@ POST Create Capacity Threshold - Unprocessible Content
    ...    Test title: POST Create Capacity Threshold - Unprocessible Content
    ...    Test objective: The objective is to test that POST method creates a Capacity  Threshold
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -34,7 +34,7 @@ GET Capacity Thresholds
    ...    Test title: GET Capacity Thresholds
    ...    Test objective: The objective is to GET Capacity Thresholds objects
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -47,7 +47,7 @@ GET Capacity Thresholds - Filter
    ...    Test title: GET Capacity Thresholds - Filter
    ...    Test objective: The objective is to GET Capacity Thresholds objects using filter
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -60,7 +60,7 @@ GET Capacity Thresholds Bad Request Invalid attribute-based filtering parameters
    ...    Test title: GET Capacity Thresholds Bad Request Invalid attribute-based filtering parameters
    ...    Test objective: The objective is to get information about Capacity Thresholds with Invalid attribute-based filtering parameters
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -73,7 +73,7 @@ GET Capacity Thresholds - Bad Request Response too Big
    ...    Test title: GET Capacity Thresholds - Bad Request Response too Big
    ...    Test objective: The objective is test that the retrieval of existing Capacity Thresholds list fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response.
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: NFVO does not support paged response.
    ...    Post-Conditions: none 
@@ -86,7 +86,7 @@ GET Capacity Thresholds as Paged Response
    ...    Test title: GET Capacity Thresholds as Paged Response
    ...    Test objective: The objective is to test that GET method retrieves the list of existing Capacity Thresholds as paged response.
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: NFVO supports paged response.
    ...    Post-Conditions: none    
@@ -99,7 +99,7 @@ PUT Capacity Thresholds - Method not implemented
    ...    Test title: PUT Capacity Thresholds - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions:  none
    ...    Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -111,7 +111,7 @@ PATCH Capacity Thresholds - Method not implemented
    ...    Test title: PATCH Capacity Thresholds - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none 
    ...    Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -123,9 +123,34 @@ DELETE Capacity Thresholds - Method not implemented
    ...    Test title: DELETE Capacity Thresholds - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none 
    ...    Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    DELETE Capacity Thresholds
    Check HTTP Response Status Code Is    405

GET Capacity Thresholds with permitted authorization scope
    [Documentation]    Test ID: 5.3.6.5.11
    ...    Test title: GET Capacity Thresholds with permitted authorization scope
    ...    Test objective: The objective is to GET Capacity Thresholds objects with permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Capacity Thresholds with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    CapacityThresholds

GET Capacity Thresholds with not permitted authorization scope
    [Documentation]    Test ID: 5.3.6.5.12
    ...    Test title: GET Capacity Thresholds with not permitted authorization scope
    ...    Test objective: The objective is to test that GET Capacity Thresholds objects fails when using not permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Capacity Thresholds with not permitted authorization scope
    Check HTTP Response Status Code Is    401
 No newline at end of file
+34 −9
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ POST Individual Capacity Threshold
    ...    Test title: POST Individual Capacity Threshold
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -19,7 +19,7 @@ GET Individual Capacity Thresholds
    ...    Test title: GET Capacity Thresholds
    ...    Test objective: The objective is to test that GET method reads information about Individual Capacity Threshold
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -32,7 +32,7 @@ GET Individual Capacity Thresholds - NOT FOUND
    ...    Test title: GET Capacity Thresholds - NOT FOUND
    ...    Test objective: The objective is to test that GET method returns an error when using and invalid URI
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -45,7 +45,7 @@ PUT Individual Capacity Threshold - Method not implemented
    ...    Test title: PUT Capacity Thresholds - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions:  none
    ...    Reference: Clause 10.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -57,7 +57,7 @@ PATCH Individual Capacity Threshold - Success
    ...    Test title: PATCH Individual Capacity Threshold - Success
    ...    Test objective: The objective is to test that PATCH method successfully modifies an individual Capacity Threshold resource
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: Capacity Threshold modified
@@ -70,7 +70,7 @@ PATCH Individual Capacity Threshold - Precondition Failed
    ...    Test title: PATCH Individual Capacity Threshold - Precondition Failed
    ...    Test objective: The objective is to that the modification of individual Capacity Threshold fails because precondition given in an HTTP request header is not fulfilled due to an ETag mismatch.
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -83,7 +83,7 @@ PATCH Individual Capacity Threshold - Precondition Failed HTTP Conditional Reque
    ...    Test title: PATCH Individual Capacity Threshold - Precondition Failed HTTP Conditional Request Not Supported
    ...    Test objective: The objective is to that the modification of individual Capacity Threshold fails because the API Producer does not support "Last-Modified" and "ETag" HTTP Headers
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.4, 4.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.5.3.4, 4.5 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: API Producer does not support "Last-Modified" and "ETag" HTTP Headers
    ...    Post-Conditions: none
@@ -96,7 +96,7 @@ PATCH Individual Capacity Threshold - Unprocessable Content
    ...    Test title: PATCH Individual Capacity Threshold - Unprocessable Content
    ...    Test objective: The objective is to that the modification of individual Capacity Threshold fails because callbackUri provided in the request body is unreachable.
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -109,10 +109,35 @@ DELETE Individual Capacity Threshold
    ...    Test title: DELETE Individual Capacity Threshold
    ...    Test objective: The objective is to delete an Individual Capacity Threshold
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: Capacity threshold is deleted
    DELETE Individual Capacity Threshold
    Check HTTP Response Status Code Is    204
    Check Postcondition resource is deleted

GET Individual Capacity Thresholds with permitted authorization scope  
    [Documentation]    Test ID: 5.3.6.4.9
    ...    Test title: GET Capacity Thresholds with permitted authorization scope  
    ...    Test objective: The objective is to test that GET method reads information about Individual Capacity Threshold with permitted authorization scope  
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual Capacity Threshold with permitted authorization scope  
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    CapacityThresholds

GET Individual Capacity Thresholds with not permitted authorization scope  
    [Documentation]    Test ID: 5.3.6.4.10
    ...    Test title: GET Capacity Thresholds with not permitted authorization scope  
    ...    Test objective: The objective is to test that GET method fails to read information about Individual Capacity Threshold when using not permitted authorization scope  
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual Capacity Threshold with not permitted authorization scope  
    Check HTTP Response Status Code Is    401
 No newline at end of file
+33 −8
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ POST Individual VIMs NFVI Capacity Information - Method not implemented
    ...    Test title: POST Individual VIMs NFVI Capacity Information - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -19,7 +19,7 @@ GET Information about an Individual VIMs NFVI Capacity Information
    ...    Test title: GET Information about an Individual VIMs NFVI Capacity Information
    ...    Test objective: The objective is to retrieve information about Individual VIMs NFVI Capacity Information
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    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
@@ -32,7 +32,7 @@ GET Information about an Individual VIMs NFVI Capacity Information using filter
    ...    Test title: GET Information about an Individual VIMs NFVI Capacity Information using filter query parameter
    ...    Test objective: The objective is to retrieve information about Individual VIMs NFVI Capacity Information using filter query parameter
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    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
@@ -45,7 +45,7 @@ GET Information about an Individual VIMs NFVI Capacity Information - NOT FOUND
    ...    Test title: GET Information about an Individual VIMs NFVI Capacity Information - NOT FOUND
    ...    Test objective: The objective is to test that the retrieval of Individual VIMs NFVI Capacity Information fails when using an invalid resource identifier.
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -58,7 +58,7 @@ PUT Individual VIMs NFVI Capacity Information - Method not implemented
    ...    Test title: PUT Individual VIMs NFVI Capacity Information - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: VNF Snapshot Package not modified
@@ -70,7 +70,7 @@ PATCH Individual VIMs NFVI Capacity Information - Method Not implemented
    ...    Test title: PATCH Individual VIMs NFVI Capacity Information
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: VNF Snapshot Package modified
@@ -82,9 +82,34 @@ DELETE Individual VIMs NFVI Capacity Information - Method Not implemented
    ...    Test title: DELETE Individual VIMs NFVI Capacity Information - Method Not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    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
+40 −15

File changed.

Preview size limit exceeded, changes collapsed.

+104 −2
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ Library JSONLibrary
Library     JSONSchemaLibrary    schemas/
Library     OperatingSystem
Library     String
Library     jwt

*** Keywords ***
POST API Version
@@ -110,6 +111,30 @@ GET NFVI Capacity Information
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 	

GET NFVI Capacity Information with permitted authorization scope
    Log    The GET method queries information about 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 
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 	

GET NFVI Capacity Information with not permitted authorization scope
    Log    The GET method queries information about 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 
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

GET NFVI Capacity Information with filter
    Log    The GET method queries information about NFVI Capacity Information.
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
@@ -229,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}"}  
@@ -308,6 +357,30 @@ GET Capacity Thresholds
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}    

GET Capacity Thresholds with permitted authorization scope
    log    Trying to get information about multiple Capacity Thresholds
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${THRESHOLDS_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}/capacity_thresholds	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}    

GET Capacity Thresholds with not permitted authorization scope
    log    Trying to get information about multiple Capacity Thresholds
    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}/capacity_thresholds	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}  

GET Capacity Thresholds using filter
    log    Trying to get information about multiple Capacity Thresholds using filtering parameters
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
@@ -376,6 +449,30 @@ GET Individual Capacity Threshold
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}   

GET Individual Capacity Threshold with permitted authorization scope
    log    Trying to get information about an Individual Capacity Threshold
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${THRESHOLDS_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}/capacity_thresholds/${capacityThreshold}  		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}      

GET Individual Capacity Threshold with not permitted authorization scope
    log    Trying to get information about an Individual Capacity Threshold
    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}/capacity_thresholds/${capacityThreshold}  		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}   
	
GET Individual Capacity Threshold - Invalid URI
    log    Trying to get information about an Individual Capacity Threshold
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
@@ -512,3 +609,8 @@ DELETE notification endpoint
    Delete    ${callbackResp}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}

JWT Encode
    [Arguments]    ${payload}    ${key}    ${algorithm}
    ${encoded}=    Evaluate    jwt.encode(${payload}, ${key}, ${algorithm})
    [Return]    ${encoded} 
 No newline at end of file
Loading