Commit 526af3c7 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch '5.3.1-dev-SOL009' into '5.3.1-dev'

Merge 5.3.1-dev-SOL009 in 5.3.1-dev

See merge request !454
parents c644bb00 12ba108e
Loading
Loading
Loading
Loading
+19 −19
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ POST Alarms - Method not implemented
    ...    Test title: POST Alarms - Method not implemented 
    ...    Test objective: The objective is to test that Post method is not allowed to create fault management alarms on NFV-MANO
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions:  none
@@ -19,7 +19,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 and perform a JSON schema of the returned alarms data structure
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -32,7 +32,7 @@ Get information about multiple alarms with filter
    ...    Test title: Get information about multiple alarms with filter
    ...    Test objective: The objective is to retrieve information about the alarm list and perform a JSON schema validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters 
    ...    Pre-conditions: none 
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -45,7 +45,7 @@ Get information about multiple alarms with invalid attribute-based filtering par
    ...    Test title:  Get information about multiple alarms with invalid attribute-based filtering parameters
    ...    Test objective: The objective is to try to retrieve information about the alarm list with invalid filters and perform a JSON schema validation of the returned problem details data structure
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -58,7 +58,7 @@ Get information about multiple alarms as a Paged Response
    ...    Test title: Get information about multiple alarms as a Paged Response
    ...    Test objective: The objective is to retrieve information about the alarm list as a Paged Response.
    ...    Pre-conditions: none
    ...    Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -71,7 +71,7 @@ Get information about multiple alarms - Bad Request Response too Big
    ...    Test title:  Get information about multiple alarms - Bad Request Response too Big
    ...    Test objective: The objective is to try to retrieve information about the alarm list because response is too big and perform a JSON schema validation of the returned problem details data structure
    ...    Pre-conditions: none
    ...    Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -84,7 +84,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.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -98,7 +98,7 @@ GET information about multiple alarms with attribute-based filter "managedObject
    ...    Test title: GET information about multiple alarms with attribute-based filter "managedObjectId"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "managedObjectId"
    ...    Pre-conditions: none
    ...    Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -112,7 +112,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.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -126,7 +126,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.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -140,7 +140,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.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -154,7 +154,7 @@ Get information about multiple alarms with malformed authorization token
    ...    Test title: Get information about multiple alarms with malformed authorization token
    ...    Test objective: The objective is to test that the retrieval of information about the alarm list fails when using malformed authorization token
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests.
    ...    Post-Conditions: none
@@ -166,7 +166,7 @@ Get information about multiple alarms without authorization token
    ...    Test title: Get information about multiple alarms without authorization token
    ...    Test objective: The objective is to test that the retrieval of information about the alarm list fails when omitting the authorization token
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests.
    ...    Post-Conditions: none
@@ -178,7 +178,7 @@ GET information about multiple alarms with expired or revoked authorization toke
    ...    Test title: GET information about multiple alarms with expired or revoked authorization token
    ...    Test objective: The objective is to test that the retrieval of information about the alarm list fails when using expired or revoked authorization token
    ...    Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests.
    ...    Post-Conditions: none
@@ -190,7 +190,7 @@ PUT Alarms - Method not implemented
    ...    Test title: PUT Alarms - Method not implemented 
    ...    Test objective: The objective is to test that PUT method is not allowed to modify fault management alarms on NFV-MANO.
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.3 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.3 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions:  none
@@ -202,7 +202,7 @@ PATCH Alarms - Method not implemented
    ...    Test title: PATCH Alarms - Method not implemented 
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify fault management alarms on NFV-MANO.
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.4 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.4 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions:  none
@@ -214,7 +214,7 @@ DELETE Alarms - Method not implemented
    ...    Test title: POST Alarms - Method not implemented 
    ...    Test objective: The objective is to test that DELETE method is not allowed for fault management alarms on NFV-MANO
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.5 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.5 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions:  none
@@ -226,7 +226,7 @@ Get information about multiple alarms with permitted authorization scope
    ...    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.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -239,7 +239,7 @@ Get information about multiple alarms with not permitted authorization scope
    ...    Test title: Get information about multiple alarms with not permitted authorization scope
    ...    Test objective: The objective is to test that retrieve information about the alarm list fails with not permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
+10 −10
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ POST API Version - Method not implemented
    ...    Test title: POST API version - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none    
@@ -19,7 +19,7 @@ GET API Version
    ...    Test title: GET API Version
    ...    Test objective: The objective is to test that GET method successfully return ApiVersionInformation
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -32,7 +32,7 @@ PUT API Version - Method not implemented
    ...    Test title: PUT API Version - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -44,7 +44,7 @@ PATCH API Version - Method not implemented
    ...    Test title: PATCH API Version - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -56,7 +56,7 @@ DELETE API Version - Method not implemented
    ...    Test title: DELETE API Version - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -68,7 +68,7 @@ POST API Version with apiMajorVerion - Method not implemented
    ...    Test title: POST API version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none    
@@ -80,7 +80,7 @@ GET API Version with apiMajorVerion
    ...    Test title: GET API Version with apiMajorVerion
    ...    Test objective: The objective is to test that GET method successfully return ApiVersionInformation
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -93,7 +93,7 @@ PUT API Version with apiMajorVerion - Method not implemented
    ...    Test title: PUT API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -105,7 +105,7 @@ PATCH API Version with apiMajorVerion - Method not implemented
    ...    Test title: PATCH API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -117,7 +117,7 @@ DELETE API Version with apiMajorVerion - Method not implemented
    ...    Test title: DELETE API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
+116 −7
Original line number Diff line number Diff line
@@ -659,8 +659,8 @@ Check Alarm List Rebuilt Notification Http POST Request Body notificationType at
    [Arguments]    ${type}
    Configure Notification Alarm List Rebuilt Handler    ${callback_endpoint_fwd}    ${type}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${notification_request}
    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint_fwd}
    #Clear Requests    ${callback_endpoint}
    #Clear Requests    ${callback_endpoint_fwd}

Check Alarm Notification Http POST Request Body Json Schema Is    
    [Arguments]    ${element}
@@ -671,8 +671,8 @@ Check Alarm Notification Http POST Request Body notificationType attribute Is
    [Arguments]    ${type}
    Configure Notification Alarm Handler    ${callback_endpoint_fwd}    ${type}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${notification_request}
    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint_fwd}
    #Clear Requests    ${callback_endpoint}
    #Clear Requests    ${callback_endpoint_fwd}

Check Alarm cleared Notification Http POST Request Body Json Schema Is    
    [Arguments]    ${element}
@@ -684,8 +684,8 @@ Check Alarm cleared Notification Http POST Request Body notificationType attribu
    [Arguments]    ${type}
    Configure Notification Alarm Cleareance Handler    ${callback_endpoint_fwd}    ${type}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${notification_request}
    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint_fwd}
    #Clear Requests    ${callback_endpoint}
    #Clear Requests    ${callback_endpoint_fwd}
    
    
Check Alarm Clerance Notification Http POST Request Body changeType attribute Is
@@ -734,6 +734,115 @@ Configure Notification Forward
    &{notification_fwd}=  Create Mock Http Forward	${endpoint_fwd}
    Create Mock Expectation With Http Forward  ${notification_tmp}  ${notification_fwd}

Check Alarm Notification Validation
    [Arguments]    ${expected_notification_type}=alarmNotification
    ${requests}=    Retrieve Requests    ${callback_endpoint_fwd}
    Should Not Be Empty    ${requests}    msg=No notification received at callback endpoint!

    ${request_type}=    Evaluate    type(${requests})
    Log    Request type: ${request_type}

    ${last_request}=    Run Keyword If    "${request_type}" == "<class 'list'>"
    ...    Get From List    ${requests}    -1
    ...    ELSE
    ...    Set Variable    ${requests}

    ${body}=    Get From Dictionary    ${last_request}    body
    ${body_text}=    Get From Dictionary    ${body}    string

    ${notification}=    Evaluate    json.loads(r'''${body_text}''')    json
    Log    Parsed notification: ${notification}

    Should Be Equal As Strings    ${notification['notificationType']}    ${expected_notification_type}

    ${alarm}=    Get From Dictionary    ${notification}    alarm

    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1
    ...    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}

    # Validate entity exists
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarm['id']}
    Integer    response status    200
    ${output}=    Output    response
    Should Be Equal    ${output['body']['id']}    ${alarm['id']} 

    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint_fwd}

Check Alarm cleared Notification Validation
    [Arguments]    ${expected_notification_type}=PerformanceInformationAvailableNotification
    ${requests}=    Retrieve Requests    ${callback_endpoint_fwd}
    Should Not Be Empty    ${requests}    msg=No notification received at callback endpoint!

    ${request_type}=    Evaluate    type(${requests})
    Log    Request type: ${request_type}

    ${last_request}=    Run Keyword If    "${request_type}" == "<class 'list'>"
    ...    Get From List    ${requests}    -1
    ...    ELSE
    ...    Set Variable    ${requests}

    ${body}=    Get From Dictionary    ${last_request}    body
    ${body_text}=    Get From Dictionary    ${body}    string

    ${notification}=    Evaluate    json.loads(r'''${body_text}''')    json
    Log    Parsed notification: ${notification}

    Should Be Equal As Strings    ${notification['notificationType']}    ${expected_notification_type}

    ${alarmId}=    Get From Dictionary    ${notification}    alarmId

    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1
    ...    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}

    # Validate entity exists
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${alarmId}
    Integer    response status    200
    ${output}=    Output    response
    Should Be Equal    ${output['body']['id']}    ${alarmId} 

    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint_fwd}

Check Alarm list rebuilt Notification Validation
    [Arguments]    ${expected_notification_type}=PerformanceInformationAvailableNotification
    ${requests}=    Retrieve Requests    ${callback_endpoint_fwd}
    Should Not Be Empty    ${requests}    msg=No notification received at callback endpoint!

    ${request_type}=    Evaluate    type(${requests})
    Log    Request type: ${request_type}

    ${last_request}=    Run Keyword If    "${request_type}" == "<class 'list'>"
    ...    Get From List    ${requests}    -1
    ...    ELSE
    ...    Set Variable    ${requests}

    ${body}=    Get From Dictionary    ${last_request}    body
    ${body_text}=    Get From Dictionary    ${body}    string

    ${notification}=    Evaluate    json.loads(r'''${body_text}''')    json
    Log    Parsed notification: ${notification}

    Should Be Equal As Strings    ${notification['notificationType']}    ${expected_notification_type}

    ${_links}=    Get From Dictionary    ${notification}    _links

    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1
    ...    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}

    # Validate entity exists
    GET    ${_links['alarms']}
    Integer    response status    200

    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint_fwd}

Create Sessions
    Start Process  java  -jar  ${MOCK_SERVER_JAR}  -serverPort  ${callback_port}  alias=mockInstance
    Wait For Process  handle=mockInstance  timeout=5s  on_timeout=continue
+10 −10

File changed.

Preview size limit exceeded, changes collapsed.

+8 −8
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ Post Individual Subscription - Method not implemented
    ...    Test title: Post Individual Subscription - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed for fault management subscription on NFV-MANO  
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability:  none
    ...    Post-Conditions:  none
@@ -19,7 +19,7 @@ Get Information about an individual subscription
    ...    Test title: Get Information about an individual subscription
    ...    Test objective: The objective is to read an individual subscription from NFV-MANO alarms subscribed by the client and perform a JSON schema and content validation of the returned fault management individual subscription data structure
    ...    Pre-conditions: The subscription with the given id exists
    ...   Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...   Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability:   none
    ...    Post-Conditions:  none
@@ -32,7 +32,7 @@ Get Information about an individual subscription - Not Found
    ...    Test title: Get Information about an individual subscription - Not Found
    ...    Test objective: The objective is to test the retrieval of individual subscription from NFV-MANO alarms fails when the resource is not present.
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -44,7 +44,7 @@ PUT an individual subscription - Method not implemented
    ...    Test title:PUT an individual subscription - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed for fault management individual subscription on VNF  
    ...    Pre-conditions:  none
    ...    Reference: clause 7.5.6.3.3 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.6.3.3 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability:  none
    ...    Post-Conditions:  none
@@ -56,7 +56,7 @@ PATCH an individual subscription - Method not implemented
    ...    Test title:PATCH an individual subscription - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed for fault management individual subscription on VNF  
    ...    Pre-conditions:  none
    ...    Reference: clause 7.5.6.3.4 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.6.3.4 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability:  none
    ...    Post-Conditions:  none
@@ -68,7 +68,7 @@ DELETE an individual subscription
    ...    Test title:DELETE an individual subscription
    ...    Test objective: The objective is to test that DELETE method removes individual subscription on VNF   
    ...    Pre-conditions: The Subsbcription already exists
    ...    Reference: clause 7.5.6.3.5 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...    Reference: clause 7.5.6.3.5 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability:  none
    ...    Post-Conditions:  subscription is deleted
@@ -81,7 +81,7 @@ Get Information about an individual subscription with permitted authorization sc
    ...    Test title: Get Information about an individual subscription with permitted authorization scope
    ...    Test objective: The objective is to read an individual subscription from NFV-MANO alarms subscribed by the client with permitted authorization scope
    ...    Pre-conditions: The subscription with the given id exists
    ...   Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...   Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability:   none
    ...    Post-Conditions:  none
@@ -94,7 +94,7 @@ Get Information about an individual subscription with not permitted authorizatio
    ...    Test title: Get Information about an individual subscription with not permitted authorization scope
    ...    Test objective: The objective is to test that reading an individual subscription from NFV-MANO alarms subscribed by the client fails with not permitted authorization scope
    ...    Pre-conditions: The subscription with the given id exists
    ...   Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v5.2.1
    ...   Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v5.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability:   none
    ...    Post-Conditions:  none
Loading