Commit 5c2db078 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

upd on Instrumentation platform hooks

parent 84f4854b
Loading
Loading
Loading
Loading
+59 −12
Original line number Original line Diff line number Diff line
@@ -52,11 +52,10 @@ NS Fault Alarm List Rebuilt Notification
    Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is    alarmListRebuiltNotification
    Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is    alarmListRebuiltNotification
    Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is    alarmListRebuiltNotification
    Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is    alarmListRebuiltNotification



NS Fault Alarm Notification with Instrumental Platform Hook
NS Fault Alarm Notification with Instrumental Platform Hook
    [Documentation]    Test ID: 5.3.3.5.4
    [Documentation]    Test ID: 5.3.3.5.4
    ...    Test title: NS Fault Alarm Notification with Instrumental Platform Hook
    ...    Test title: NS Fault Alarm Notification with Instrumental Platform Hook
    ...    Test objective: The objective is to test the dispatch of NS Fault Alarm Notification when a virtualised resource within an NS instance failure is automatically triggerd through an instrumenation platform, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
    ...    Test objective: The objective is to test the dispatch of NS Fault Alarm Notification when a virtualised resource failure within an NS instance is automatically triggered through an instrumenation platform, and perform a JSON schema and content validation of the delivered notification.
    ...    Pre-conditions: A NS instance is instantiated
    ...    Pre-conditions: A NS instance is instantiated
    ...    Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Config ID: Config_prod_NFVO
    ...    Config ID: Config_prod_NFVO
@@ -66,12 +65,51 @@ NS Fault Alarm Notification with Instrumental Platform Hook
    Check Instrumentation Platform Alarm Notification Http POST Request Body Json Schema Is    alarmNotification
    Check Instrumentation Platform Alarm Notification Http POST Request Body Json Schema Is    alarmNotification
    Check Instrumentation Platform Alarm Notification Http POST Request Body notificationType attribute Is    alarmNotification
    Check Instrumentation Platform Alarm Notification Http POST Request Body notificationType attribute Is    alarmNotification


NS Fault Alarm Cleared Notification with Instrumental Platform Hook
    [Documentation]    Test ID: 5.3.3.5.5
    ...    Test title: NS Fault Alarm Cleared Notification with Instrumental Platform Hook
    ...    Test objective: The objective is to test the dispatch of NS Fault Clear Alarm Notification when a virtualised resource failure within an NS instance is automatically cleared through an instrumenation platform, and perform a JSON schema and content validation of the delivered notification.
    ...    Pre-conditions: A NS instance is instantiated and a virtualised resource is in faulty state.
    ...    Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: An instrumentation platform is available to trigger the NS instance failure clear condition
    ...    Post-Conditions: none 
    Trigger the fault cleared of a virtualised resource in the NS instance
    Check Instrumentation Platform Alarm Cleared Notification Http POST Request Body Json Schema Is    alarmClearedNotification
    Check Instrumentation Platform Alarm Cleared Notification Http POST Request Body notificationType attribute Is    alarmClearedNotification

NS Fault Alarm List Rebuilt Notification with Instrumental Platform Hook
    [Documentation]    Test ID: 5.3.3.5.6
    ...    Test title: NS Fault Alarm List Rebuilt Notification with Instrumental Platform Hook
    ...    Test objective: The objective is to test the dispatch of NS Fault Alarm List Rebuilt Notification when the NFVO decision to rebuild the list of its NS alarms is automatically triggered through an instrumentation platform, and perform a JSON schema and content validation of the delivered notification.
    ...    Pre-conditions: A NS instance is instantiated and one or more virtualised resource are in faulty state
    ...    Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: An instrumentation platform is available to trigger the NS instance alarm list rebuilt condition
    ...    Post-Conditions: none 
    Trigger the NS fault alarm list rebuild in the NFVO
    Check Instrumentation Platform Alarm List Rebuilt Notification Http POST Request Body Json Schema Is    alarmListRebuiltNotification
    Check Instrumentation Platform Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is    alarmListRebuiltNotification

*** Keywords ***
*** Keywords ***
Trigger the fault of a virtualised resource in the NS instance
Trigger the fault of a virtualised resource in the NS instance
    Pass Execution If   ${instrumentationPlatformSkip}  Skip Test step -- Instrumentation platform not supported 
    Create Alarm Subscription    AlarmNotification
    Create Alarm Subscription    AlarmNotification
    &{keyvalues}    Create Dictionary    eventType=COMMUNICATIONS_ALARM    delay=10s
    &{keyvalues}    Create Dictionary    eventType=COMMUNICATIONS_ALARM    delay=10s
    Trigger instrumentation platform    ${upperTesterUrlForAlarmNotifications}    ${nsInstanceIdForNotifications}    nsInstance    AlarmNotification    null    &{keyvalues}
    Trigger instrumentation platform    ${upperTesterUrlForAlarmNotifications}    ${nsInstanceIdForNotifications}    nsInstance    AlarmNotification    null    &{keyvalues}


Trigger the fault cleared of a virtualised resource in the NS instance
    Pass Execution If   ${instrumentationPlatformSkip}  Skip Test step -- Instrumentation platform not supported 
    Create Alarm Subscription    AlarmClearedNotification
    &{keyvalues}    Create Dictionary    eventType=COMMUNICATIONS_ALARM    delay=10s
    Trigger instrumentation platform    ${upperTesterUrlForAlarmNotifications}    ${nsInstanceIdForNotifications}    nsInstance    AlarmClearedNotification    null    &{keyvalues}

Trigger the NS fault alarm list rebuild in the NFVO
    Pass Execution If   ${instrumentationPlatformSkip}  Skip Test step -- Instrumentation platform not supported 
    Create Alarm Subscription    AlarmListRebuiltNotification
    &{keyvalues}    Create Dictionary    eventType=COMMUNICATIONS_ALARM    delay=10s
    Trigger instrumentation platform    ${upperTesterUrlForAlarmNotifications}    ${nsInstanceIdForNotifications}    nsInstance    AlarmListRebuiltNotification    null    &{keyvalues}

Trigger the fault of a virtualised resource in the NS instance (external action)  
Trigger the fault of a virtualised resource in the NS instance (external action)  
    #do nothing
    #do nothing
    Log    do nothing
    Log    do nothing
@@ -96,6 +134,16 @@ Check Alarm List Rebuilt Notification Http POST Request Body notificationType at
    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint_fwd}
    Clear Requests    ${callback_endpoint_fwd}
    
    
Check Instrumentation Platform Alarm List Rebuilt Notification Http POST Request Body Json Schema Is
    [Arguments]    ${element}
    Pass Execution If   ${instrumentationPlatformSkip}  Skip Test step -- Instrumentation platform not supported 
    Check Alarm List Rebuilt Notification Http POST Request Body Json Schema Is   ${element}

Check Instrumentation Platform Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is
    [Arguments]    ${type}
    Pass Execution If   ${instrumentationPlatformSkip}  Skip Test step -- Instrumentation platform not supported 
    Check Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is   ${type}

Check Alarm Notification Http POST Request Body Json Schema Is    
Check Alarm Notification Http POST Request Body Json Schema Is    
    [Arguments]    ${element}
    [Arguments]    ${element}
    ${schema}=	Get File	schemas/${element}.schema.json
    ${schema}=	Get File	schemas/${element}.schema.json
@@ -106,7 +154,6 @@ Check Instrumentation Platform Alarm Notification Http POST Request Body Json Sc
    Pass Execution If   ${instrumentationPlatformSkip}  Skip Test step -- Instrumentation platform not supported 
    Pass Execution If   ${instrumentationPlatformSkip}  Skip Test step -- Instrumentation platform not supported 
    Check Alarm Notification Http POST Request Body Json Schema Is   ${element}
    Check Alarm Notification Http POST Request Body Json Schema Is   ${element}



Check Alarm Notification Http POST Request Body notificationType attribute Is
Check Alarm Notification Http POST Request Body notificationType attribute Is
    [Arguments]    ${type}
    [Arguments]    ${type}
    Configure Notification Alarm Handler    ${callback_endpoint_fwd}    ${type}
    Configure Notification Alarm Handler    ${callback_endpoint_fwd}    ${type}
@@ -124,6 +171,15 @@ Check Alarm cleared Notification Http POST Request Body Json Schema Is
    ${schema}=	Get File	schemas/${element}.schema.json
    ${schema}=	Get File	schemas/${element}.schema.json
    Configure Notification Forward    ${schema}    ${callback_endpoint}    ${callback_endpoint_fwd}
    Configure Notification Forward    ${schema}    ${callback_endpoint}    ${callback_endpoint_fwd}
    
    
Check Instrumentation Platform Alarm Cleared Notification Http POST Request Body Json Schema Is
    [Arguments]    ${element}
    Pass Execution If   ${instrumentationPlatformSkip}  Skip Test step -- Instrumentation platform not supported 
    Check Alarm cleared Notification Http POST Request Body Json Schema Is   ${element}

Check Instrumentation Platform Alarm Cleared Notification Http POST Request Body notificationType attribute Is
    [Arguments]    ${type}
    Pass Execution If   ${instrumentationPlatformSkip}  Skip Test step -- Instrumentation platform not supported 
    Check Alarm cleared Notification Http POST Request Body notificationType attribute Is   ${type}


Check Alarm cleared Notification Http POST Request Body notificationType attribute Is
Check Alarm cleared Notification Http POST Request Body notificationType attribute Is
    [Arguments]    ${type}
    [Arguments]    ${type}
@@ -132,13 +188,6 @@ Check Alarm cleared Notification Http POST Request Body notificationType attribu
    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint_fwd}
    Clear Requests    ${callback_endpoint_fwd}


    
Check Alarm Clerance Notification Http POST Request Body changeType attribute Is
    [Arguments]    ${type}
    #do nothing
    Log    do nothing 
    

Configure Notification Alarm List Rebuilt Handler
Configure Notification Alarm List Rebuilt Handler
    [Arguments]    ${endpoint}    ${type}
    [Arguments]    ${endpoint}    ${type}
    ${json}=    evaluate    {}
    ${json}=    evaluate    {}
@@ -182,8 +231,6 @@ Configure Notification Forward
    &{notification_fwd}=  Create Mock Http Forward	${endpoint_fwd}
    &{notification_fwd}=  Create Mock Http Forward	${endpoint_fwd}
    Create Mock Expectation With Http Forward  ${notification_tmp}  ${notification_fwd}
    Create Mock Expectation With Http Forward  ${notification_tmp}  ${notification_fwd}
    
    


Create Alarm Subscription
Create Alarm Subscription
    [Arguments]    ${notificationType}
    [Arguments]    ${notificationType}
    Log    Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions
    Log    Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions