SOL002 VNF Fault Management - Implementation of deltas between v4.5.1 and v4.4.1

This merge request refers to the implementation of deltas between v4.4.1 and v4.3.1 of SOL002 VNF Fault Management Interface.

Deadline for review: Wed 25th Sept 2024 @noon CEST

Merge request reports

Loading
+8 −0
Changes for SOL002/VNFFaultManagement-API/environment/variables.txt: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -15,6 +15,14 @@ ${apiName} vnffm
${apiMajorVersion}     v1
${CONTENT_TYPE}    application/json

${ALARMS_SCOPE}    vnffm:v1:alarms:with_vnfc
${ALARMS_READONLY_SCOPE}    vnffm:v1:alarms:with_vnfc:readonly
${ESCALATE_SCOPE}   vnffm:v1:escalate
${SUBSCRIPTIONS_SCOPE}  vnffm:v1:subscriptions
${NEG_SCOPE}    vnffm:v1:invalid
${OAUTH_Encryption_ALGORITHM}    HS256
${API_VERSION}      1.12.0

${HEADER_TEST_SUPPORTED}    0

${origResponse}=    httpresponse
+88 −19
Changes for SOL002/VNFFaultManagement-API/Alarms.robot: 88 added lines, 19 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ Library JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    OperatingSystem
Library     Collections
Library    jwt

*** Test Cases ***
POST Alarms - Method not implemented
@@ -13,7 +14,7 @@ POST Alarms - Method not implemented
    ...    Test title: POST Alarms - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -25,7 +26,7 @@ GET information about multiple alarms
    ...    Test title: GET information about multiple alarms
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: none 
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -38,7 +39,7 @@ GET information about multiple alarms with attribute-based filter
    ...    Test title: GET information about multiple alarms with attribute-based filter
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute-based filter
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -51,7 +52,7 @@ GET information about multiple alarms with invalid attribute-based filter
    ...    Test title: GET information about multiple alarms with invalid attribute-based filter
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -64,7 +65,7 @@ GET information about multiple alarms with "all_fields" attribute selector
    ...    Test title: GET information about multiple alarms with "all_fields" attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -77,7 +78,7 @@ GET information about multiple alarms with exclude_default attribute selector
    ...    Test title: GET information about multiple alarms with "exclude_default" attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -90,7 +91,7 @@ GET information about multiple alarms with fields attribute selector
    ...    Test title: GET information about multiple alarms with fields attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: none 
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -103,7 +104,7 @@ GET information about multiple alarms with "exclude_fields" attribute selector
    ...    Test title: GET information about multiple alarms with "exclude_fields" attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -116,7 +117,7 @@ PUT Alarms - Method not implemented
    ...    Test title: PUT Alarms - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -128,7 +129,7 @@ PATCH Alarms - Method not implemented
    ...    Test title: PATCH Alarms - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -140,7 +141,7 @@ DELETE Alarms - Method not implemented
    ...    Test title: DELETE Alarms - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -152,7 +153,7 @@ GET information about multiple alarms to get Paged Response
    ...    Test title: GET information about multiple alarms to get Paged Response
    ...    Test objective: The objective is to retrieve information about the alarms to get paged response
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions:  none
@@ -165,7 +166,7 @@ GET information about multiple alarms for Bad Request Response too big
    ...    Test title: GET information about multiple alarms for Bad Request Response too big
    ...    Test objective: The objective is to test that GET method fail retrieving status information about Alarms when Response is too big, and perform the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -178,7 +179,7 @@ GET information about alarms with attribute-based filter "id"
    ...    Test title: GET information about alarms with attribute-based filter "id"
    ...    Test objective: The objective is to retrieve information about the alarm list with alarm filter "id"
    ...    Pre-conditions: none 
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -192,7 +193,7 @@ GET information about multiple alarms with attribute-based filter "vnfcInstanceI
    ...    Test title: GET information about multiple alarms with attribute-based filter "vnfcInstanceIds"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "vnfcInstanceIds"
    ...    Pre-conditions: none 
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -206,7 +207,7 @@ GET information about multiple alarms with attribute-based filter "rootCauseFaul
    ...    Test title: GET information about multiple alarms with attribute-based filter "rootCauseFaultyResource.faultyResourceType"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "rootCauseFaultyResource.faultyResourceType"
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -220,7 +221,7 @@ GET information about multiple alarms with attribute-based filter "eventType"
    ...    Test title: GET information about multiple alarms with attribute-based filter "eventType"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "eventType"
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -234,7 +235,7 @@ GET information about multiple alarms with attribute-based filter "perceivedSeve
    ...    Test title: GET information about multiple alarms with attribute-based filter "perceivedSeverity"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "perceivedSeverity"
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -248,7 +249,7 @@ GET information about multiple alarms with attribute-based filter "probableCause
    ...    Test title: GET information about multiple alarms with attribute-based filter "probableCause"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "probableCause"
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -256,11 +257,36 @@ GET information about multiple alarms with attribute-based filter "probableCause
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms 
    Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "probableCause"
GET information about multiple alarms with permitted authorization scope
    [Documentation]    Test ID: 6.3.4.1.20
    ...    Test title: GET information about multiple alarms with permitted authorization scope 
    ...    Test objective: The objective is to retrieve information about the alarm list with permitted authorization scope
    ...    Pre-conditions: none 
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Alarms Task with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms    
GET information about multiple alarms with not permitted authorization scope
    [Documentation]    Test ID: 6.3.4.1.21
    ...    Test title: GET information about multiple alarms with not permitted authorization scope
    ...    Test objective: The objective is to retrieve information about the alarm list with not permitted authorization scope
    ...    Pre-conditions: none 
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Alarms Task with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is    ProblemDetails

*** Keywords ***
POST Alarms Task
    log    Trying to perform a POST. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms
    ${outputResponse}=    Output    response
@@ -268,6 +294,7 @@ POST Alarms Task
PUT Alarms Task
    log    Trying to perform a PUT. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms
    ${outputResponse}=    Output    response
@@ -275,6 +302,7 @@ PUT Alarms Task
PATCH Alarms Task
    log    Trying to perform a PATCH. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms
    ${outputResponse}=    Output    response
@@ -282,6 +310,7 @@ PATCH Alarms Task
DELETE Alarms Task
    log    Trying to perform a DELETE. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms
    ${outputResponse}=    Output    response
@@ -289,6 +318,7 @@ DELETE Alarms Task
GET Alarms Task	
	Log    Query VNF The GET method queries information about multiple alarms.
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms
@@ -297,6 +327,7 @@ GET Alarms Task
GET Alarms Task with filter
	Log    Query VNF The GET method queries information about multiple alarms with filters.
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${managedObjectId} 
@@ -305,6 +336,7 @@ GET Alarms Task with filter
GET Alarms Task with invalid filter
	Log    Query VNF The GET method queries information about multiple alarms with filters.
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${managedObjectId} 
@@ -313,6 +345,7 @@ GET Alarms Task with invalid filter
GET Alarms Task with all_fields attribute selector
    Log    Query VNF The GET method queries information about multiple alarms, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default
    ${output}=    Output    response
@@ -320,6 +353,7 @@ GET Alarms Task with all_fields attribute selector
GET Alarms Task with exclude_default attribute selector
    Log    Query VNF The GET method queries information about multiple alarms, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default
    ${output}=    Output    response
@@ -327,6 +361,7 @@ GET Alarms Task with exclude_default attribute selector
GET Alarms Task with fields attribute selector
    Log    Query VNF The GET method queries information about multiple alarms, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?fields=${fields}
    ${output}=    Output    response
@@ -334,6 +369,7 @@ GET Alarms Task with fields attribute selector
GET Alarms Task with exclude_fields attribute selector
    Log    Query VNF The GET method queries information about multiple alarms, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_fields=${fields}
    ${output}=    Output    response
@@ -365,6 +401,7 @@ Check HTTP Response Header Contain Link
GET Alarms Task with filter "id"
	Log    Query VNF The GET method queries information about multiple alarms with filters "id".
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?id=${alarmId}
@@ -377,6 +414,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba
GET Alarms Task with filter "vnfcInstanceIds"
	Log    Query VNF The GET method queries information about multiple alarms with filters "vnfcInstanceIds".
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?vnfcInstanceIds=${vnfcInstanceIds}
@@ -391,6 +429,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba
GET Alarms Task with filter "rootCauseFaultyResource_faultyResourceType"
	Log    Query VNF The GET method queries information about multiple alarms with filters "rootCauseFaultyResource.faultyResourceType".
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyResource.faultyResourceType=${faultyResourceType}
@@ -405,6 +444,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba
GET Alarms Task with filter "eventType"
	Log    Query VNF The GET method queries information about multiple alarms with filters "eventType".
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?eventType=${eventType}
@@ -419,6 +459,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba
GET Alarms Task with filter "perceivedSeverity"
	Log    Query VNF The GET method queries information about multiple alarms with filters "perceivedSeverity".
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?perceivedSeverity=${perceivedSeverity}
@@ -433,6 +474,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba
GET Alarms Task with filter "probableCause"
	Log    Query VNF The GET method queries information about multiple alarms with filters "probableCause".
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?probableCause=${probableCause}
@@ -443,3 +485,30 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba
    FOR   ${item}   IN  @{response['body']}
    Should Be Equal As Strings    ${item['probableCause']}   ${probableCause}
    END
JWT Encode
    [Arguments]    ${payload}    ${key}    ${algorithm}
    ${encoded}=    Evaluate    jwt.encode(${payload}, ${key}, ${algorithm})
    [Return]    ${encoded}
GET Alarms Task with permitted authorization scope
	Log    Query VNF The GET method queries information about multiple alarms with permitted authorization scope.
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    ${scope_value}=    Create Dictionary    scopeValue=${ALARMS_READONLY_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}

GET Alarms Task with not permitted authorization scope
	Log    Query VNF The GET method queries information about multiple alarms with not permitted authorization scope.
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    ${scope_value}=    Create Dictionary    scopeValue=${NEG_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}
 No newline at end of file
+10 −0
Changes for SOL002/VNFFaultManagement-API/ApiVersion.robot: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -133,6 +133,7 @@ DELETE API Version with apiMajorVerion - Method not implemented
*** Keywords ***
POST API Version
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
@@ -140,6 +141,7 @@ POST API Version
	
GET API Version
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
@@ -147,6 +149,7 @@ GET API Version
	
PUT API Version
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
@@ -154,6 +157,7 @@ PUT API Version
	
PATCH API Version
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
@@ -161,6 +165,7 @@ PATCH API Version
	
DELETE API Version
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
@@ -168,6 +173,7 @@ DELETE API Version
	
POST API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
@@ -175,6 +181,7 @@ POST API Version with apiMajorVersion
	
GET API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
@@ -182,6 +189,7 @@ GET API Version with apiMajorVersion
	
PUT API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
@@ -189,6 +197,7 @@ PUT API Version with apiMajorVersion
	
PATCH API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
@@ -196,6 +205,7 @@ PATCH API Version with apiMajorVersion
	
DELETE API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
+60 −5
Changes for SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot: 60 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ Resource environment/variables.txt
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
Library    JSONSchemaLibrary
Library    OperatingSystem
Library    jwt
Library    String
Suite Setup    Check resource existence

@@ -12,7 +13,7 @@ Escalate the perceived severity
    ...    Test title: Escalate the perceived severity
    ...    Test objective: To enable the consumer to escalate the perceived severity of an alarm that is represented by an individual alarm resource.
    ...    Pre-conditions: The resource representing the individual alarm has been created
    ...    Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -24,7 +25,7 @@ GET Escalate the perceived severity - Method not implemented
    ...    Test title: GET Escalate the perceived severity - Method not implemented
    ...    Test objective: The objective is to test that the GET HTTP method not implemented for escalate perceived severity
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions:   none
@@ -36,7 +37,7 @@ PUT Escalate the perceived severity - Method not implemented
    ...    Test title: PUT Escalate the perceived severity - Method not implemented
    ...    Test objective: The objective is to test that the PUT HTTP method not implemented for escalate perceived severity
    ...    Pre-conditions: none 
    ...    Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -48,7 +49,7 @@ PATCH Escalate the perceived severity - Method not implemented
    ...    Test title: PATCH Escalate the perceived severity - Method not implemented
    ...    Test objective: The objective is to test that the PATCH HTTP method not implemented for escalate perceived severity
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -60,16 +61,39 @@ DELETE Escalate the perceived severity - Method not implemented
    ...    Test title: DELETE Escalate the perceived severity - Method not implemented
    ...    Test objective: The objective is to test that the DELETE HTTP method not implemented for escalate perceived severity
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Delete escalate severity
    Check HTTP Response Status Code Is    405
Escalate the perceived severity with permitted authorization scope
    [Documentation]    Test ID: 6.3.4.3.6
    ...    Test title: Escalate the perceived severity with permitted authorization scope
    ...    Test objective: To enable the consumer to escalate the perceived severity of an alarm that is represented by an individual alarm resource with permitted authorization scope.
    ...    Pre-conditions: The resource representing the individual alarm has been created
    ...    Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    POST escalate severity with permitted authorization scope
    Check HTTP Response Status Code Is    204
Escalate the perceived severity with NOT permitted authorization scope
    [Documentation]    Test ID: 6.3.4.3.7
    ...    Test title: Escalate the perceived severity with NOT permitted authorization scope
    ...    Test objective: To enable the consumer to escalate the perceived severity of an alarm that is represented by an individual alarm resource with NOT permitted authorization scope.
    ...    Pre-conditions: The resource representing the individual alarm has been created
    ...    Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    POST escalate severity with not permitted authorization scope
    Check HTTP Response Status Code Is    403

*** Keywords ***
Check resource existence
    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}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}
@@ -77,6 +101,7 @@ Check resource existence
POST escalate severity
    Log    escalate the perceived severity of an alarm with the VNFM
    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}"}
    ${template}=    Get File    jsons/EscalatePerceivedSeverity.json
@@ -121,3 +146,33 @@ Check HTTP Response Body Json Schema Is
    ${schema} =    Catenate    SEPARATOR=    ${input}	.schema.json
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
JWT Encode
    [Arguments]    ${payload}    ${key}    ${algorithm}
    ${encoded}=    Evaluate    jwt.encode(${payload}, ${key}, ${algorithm})
    [Return]    ${encoded}
POST escalate severity with permitted authorization scope
    Log    escalate the perceived severity of an alarm with the VNFM with permitted authorization scope
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    ${scope_value}=    Create Dictionary    scopeValue=${ESCALATE_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    ${template}=    Get File    jsons/EscalatePerceivedSeverity.json
    ${body}=    Format String    ${template}    perceivedSeverity=${PerceivedSeverity}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate    ${body}  
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}
POST escalate severity with not permitted authorization scope
    Log    escalate the perceived severity of an alarm with the VNFM with not permitted authorization scope
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    ${scope_value}=    Create Dictionary    scopeValue=${NEG_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    ${template}=    Get File    jsons/EscalatePerceivedSeverity.json
    ${body}=    Format String    ${template}    perceivedSeverity=${PerceivedSeverity}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate    ${body}  
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}
 No newline at end of file
+72 −8
Changes for SOL002/VNFFaultManagement-API/IndividualAlarm.robot: 72 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ Library OperatingSystem
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    DependencyLibrary
Library    jwt

*** Variables **
${original_etag}    1234
@@ -15,7 +16,7 @@ POST Alarm - Method not implemented
    ...    Test title: POST Alarm - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -27,7 +28,7 @@ GET information about an individual alarm
    ...    Test title: GET information about an individual alarm
    ...    Test objective: The objective is to read an individual alarm.
    ...    Pre-conditions: The related alarm exists
    ...    Reference: Clause 7.4.3.3.2  - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.3.3.2  - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none 
    ...    Post-Conditions: none
@@ -41,7 +42,7 @@ PUT Individual Alarm - Method not implemented
    ...    Test title: PUT Individual Alarm - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -53,7 +54,7 @@ PATCH Individual Alarm
    ...    Test title: PATCH Individual Alarm
    ...    Test objective: The objective is to Modify an individual alarm resource
    ...    Pre-conditions: The related alarm exists
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -67,7 +68,7 @@ PATCH Individual Alarm - Precondition failed
    ...    Test title: PATCH Individual Alarm - Precondition failed
    ...    Test objective: The objective is to attempt to Modify an individual alarm resource, where the precondition was not met
    ...    Pre-conditions: The related alarm exists
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The alarm resource is not modified
@@ -81,7 +82,7 @@ PATCH Individual Alarm - Conflict
    ...    Test title: PATCH Individual Alarm - Conflict
    ...    Test objective: The objective is to Modify an individual alarm resource
    ...    Pre-conditions: The related alarm exists
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The alarm resource is not modified
@@ -95,7 +96,7 @@ DELETE Individual Alarm - Method not implemented
    ...    Test title: DELETE Individual Alarm - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -107,18 +108,44 @@ GET information about an individual alarm - Not Found
    ...    Test title: GET information about an individual alarm - Not Found
    ...    Test objective: The objective is to test that GET method fail retrieving status information about individaual Alarms when alarm is not present.
    ...    Pre-conditions: The related alarm doesnot exists
    ...    Reference: Clause 7.4.3.3.2  - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 7.4.3.3.2  - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none   
    GET Alarm Task
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is     ProblemDetails
PATCH Individual Alarm with permitted authorization scope
    [Documentation]    Test ID: 6.3.4.2.9
    ...    Test title: PATCH Individual Alarm with permitted authorization scope
    ...    Test objective: The objective is to Modify an individual alarm resource with permitted authorization scope
    ...    Pre-conditions: The related alarm exists
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    PATCH Alarm Task with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Contains ETag and Last-Modified
    Check HTTP Response Body Json Schema Is     alarmModifications
PATCH Individual Alarm with NOT permitted authorization scope
    [Documentation]    Test ID: 6.3.4.2.10
    ...    Test title: PATCH Individual Alarm with NOT permitted authorization scope
    ...    Test objective: The objective is to Modify an individual alarm resource with NOT permitted authorization scope
    ...    Pre-conditions: The related alarm exists
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    PATCH Alarm Task with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is     ProblemDetails

*** Keywords ***
POST Alarm Task
    log    Trying to perform a POST. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}
    ${outputResponse}=    Output    response
@@ -126,6 +153,7 @@ POST Alarm Task
PUT Alarm Task
    log    Trying to perform a PUT. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${body}=    Get File    jsons/alarmModifications.json
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}     ${body}
@@ -134,6 +162,7 @@ PUT Alarm Task
PATCH Alarm Task
    log    Trying to perform a PATCH. This method modifies an individual alarm resource
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Set Headers  {"If-Match": "${original_etag[0]}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
@@ -144,6 +173,7 @@ PATCH Alarm Task
PATCH Alarm Task with wrong precondition
    log    Trying to perform a PATCH. This method modifies an individual alarm resource
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${body}=    Get File    jsons/alarmModifications.json
@@ -156,6 +186,7 @@ PATCH Alarm Task with wrong precondition
DELETE Alarm Task
    log    Trying to perform a DELETE. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}
    ${outputResponse}=    Output    response
@@ -163,6 +194,7 @@ DELETE Alarm Task
GET Alarm Task	
	Log    Query VNF The GET method queries information about individual alarm.
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}
@@ -180,6 +212,7 @@ Check HTTP Response Header Contains ETag and Last-Modified
GET Alarm Task with filter
	Log    Query VNF The GET method queries information about individual alarm with filters.
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${managedObjectId} 
@@ -188,6 +221,7 @@ GET Alarm Task with filter
GET Alarm Task with invalid filter
	Log    Query VNF The GET method queries information about individual alarm with filters.
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${managedObjectId} 
@@ -215,4 +249,34 @@ Check HTTP Response Header Contains
    [Arguments]    ${CONTENT_TYPE}
    Should Contain    ${response['headers']}    ${CONTENT_TYPE}
    Log    Header is present
JWT Encode
    [Arguments]    ${payload}    ${key}    ${algorithm}
    ${encoded}=    Evaluate    jwt.encode(${payload}, ${key}, ${algorithm})
    [Return]    ${encoded}
PATCH Alarm Task with permitted authorization scope
    log    Trying to perform a PATCH. This method modifies an individual alarm resource with permitted authorization scope
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Set Headers  {"If-Match": "${original_etag[0]}"}
    ${scope_value}=    Create Dictionary    scopeValue=${ALARMS_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    ${body}=    Get File    jsons/alarmModifications.json
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}    ${body}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}
PATCH Alarm Task with not permitted authorization scope
    log    Trying to perform a PATCH. This method modifies an individual alarm resource with not permitted authorization scope
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Set Headers  {"If-Match": "${original_etag[0]}"}
    ${scope_value}=    Create Dictionary    scopeValue=${NEG_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    ${body}=    Get File    jsons/alarmModifications.json
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}    ${body}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}
Loading
Loading