Commit 0f384c38 authored by AHMADABB's avatar AHMADABB
Browse files

SOL 3 Individual Subscription Fault management

parent c6320394
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -51,11 +51,11 @@ Get information about multiple alarms Bad Request Invalid attribute-based filter
    [Documentation]    Test ID: 7.3.5.1.4
    [Documentation]    Test ID: 7.3.5.1.4
    ...    Test title:  The objective is to try to retrieve information about the alarm list and perform a JSON schema and content validation of the returned problem details data structure, and verify that the retrieved information matches the issued attribute-based filters 
    ...    Test title:  The objective is to try to retrieve information about the alarm list and perform a JSON schema and content validation of the returned problem details data structure, and verify that the retrieved information matches the issued attribute-based filters 
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
    ...    Pre-conditions: none
    ...    Reference: section 7.4.2.3.2 - SOL003 v2.4.1
    ...    Reference: section 7.4.2.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Applicability: none
    ...    Post-Conditions: 
    ...    Post-Conditions: none
    GET Fault Management Alarms With Invalid Filters 
    GET Fault Management Alarms With Invalid Filters 
    Check HTTP Response Status Code Is    400
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails
    Check HTTP Response Body Json Schema Is    ProblemDetails
+7 −0
Original line number Original line Diff line number Diff line
@@ -12,6 +12,7 @@ Library Process
${original_etag}    1234
${original_etag}    1234


*** Keywords ***
*** Keywords ***

Check Postcondition VNF fault management alarms Exists
Check Postcondition VNF fault management alarms Exists
    Log    Checking that alarms exists
    Log    Checking that alarms exists
    GET Fault Management Alarms
    GET Fault Management Alarms
@@ -30,6 +31,12 @@ Check Individual Subscription existance
    Get    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} 
    Get    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} 
    Integer    response status    200
    Integer    response status    200
    
    
Check Individual Subscription deleted
    Set Headers    {"Accept":"${ACCEPT}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} 
    Integer    response status    404
    
Check HTTP Response Status Code Is
Check HTTP Response Status Code Is
    [Arguments]    ${expected_status}
    [Arguments]    ${expected_status}
    Log    Validate Status code    
    Log    Validate Status code    
+53 −52
Original line number Original line Diff line number Diff line
*** Settings ***
*** Settings ***
Resource    environment/variables.txt
Resource    environment/variables.txt
Resource    FaultManagement-APIKeyword.robot 
Library    JSONLibrary
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    JSONSchemaLibrary    schemas/
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    
Documentation    This resource represents an individual subscription for VNF alarms. 
Documentation    This resource represents an individual subscription for VNF alarms. 
...    The client can use this resource to read and to terminate a subscription to notifications related to VNF fault management.
...    The client can use this resource to read and to terminate a subscription to notifications related to VNF fault management.
Suite Setup    Check resource existance
Suite Setup    Check Individual Subscription existance


*** Test Cases ***
*** Test Cases ***
Post Individual Subscription - Method not implemented
Post Individual Subscription - Method not implemented
    log    Trying to perform a POST. This method should not be implemented
    [Documentation]    Test ID: 7.3.5.4.1
    Set Headers  {"Accept":"${ACCEPT}"}
    ...    Test title: Post Individual Subscription - Method not implemented
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test objective: The objective is to test that POST method is not allowed for Fault management subscription on VNF  
    Post    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}  
    ...    Pre-conditions: none
    Log    Validate Status code
    ...    Reference: section 7.4.5.3.1 - SOL003 v2.4.1
    Output    response
    ...    Config ID: Config_prod_VNFM
    Integer    response status    405
    ...    Applicability:  none
    ...    Post-Conditions:  none
    POST Individual Subscription
    Check HTTP Response Status Code Is    405


Get Information about an individual subscription
Get Information about an individual subscription
    [Documentation]    Test ID: 7.4.5.1
    [Documentation]    Test ID: 7.3.5.4.2
    ...    Test title: Retrieve the alarm subscriptions
    ...    Test title: Get Information about an individual subscription
    ...    Test objective: The objective is to read an individual subscription for VNF alarms subscribed by the client
    ...    Test objective: The objective is to read an individual subscription for NFVO 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
    ...    Pre-conditions: The subscription with the given id exists
    ...    Reference: section 7.4.5 - SOL003 v2.4.1
    ...   Reference: section 7.4.5.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability:  
    ...    Applicability:   none
    ...    Post-Conditions: 
    ...    Post-Conditions:  none
    log    Trying to get information about an individual subscription
    GET Individual Subscription
    Set Headers    {"Accept":"${ACCEPT}"}  
    Check HTTP Response Status Code Is    200
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Check HTTP Response Body Json Schema Is    FmSubscription
    Get    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
    Log    Validate Status code
    Integer    response status    200
    ${contentType}=    Output    response headers Content-Type
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    ${result}=    Output    response body
    Validate Json    FmSubscription.schema.json    ${result}
    Log    Validation OK


PUT an individual subscription - Method not implemented
PUT an individual subscription - Method not implemented
    log    Trying to perform a PUT. This method should not be implemented
    [Documentation]    Test ID: 7.3.5.4.3
    Set Headers  {"Accept":"${ACCEPT}"}
    ...    Test title:PUT an individual subscription - Method not implemented
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test objective: The objective is to test that PUT method is not allowed for Fault management individual subscription on VNF  
    Put    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}    
    ...    Pre-conditions:  none
    Log    Validate Status code
    ...    Reference: section 7.4.5.3.3 - SOL003 v2.4.1
    Integer    response status    405
    ...    Config ID: Config_prod_VNFM
    ...    Applicability:  none
    ...    Post-Conditions:  none
    PUT Individual Subscription
    Check HTTP Response Status Code Is    405


PATCH an individual subscription - Method not implemented
PATCH an individual subscription - Method not implemented
    log    Trying to perform a PATCH. This method should not be implemented
    [Documentation]    Test ID: 7.3.5.4.4
    Set Headers  {"Accept":"${ACCEPT}"}  
    ...    Test title:PATCH an individual subscription - Method not implemented
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    ...    Test objective: The objective is to test that PATCH method is not allowed for Fault management individual subscription on VNF  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Pre-conditions:  none
    Patch    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}    
    ...    Reference: section 7.4.5.3.4 - SOL003 v2.4.1
    Log    Validate Status code
    ...    Config ID: Config_prod_VNFM
    Integer    response status    405
    ...    Applicability:  none
    ...    Post-Conditions:  none
    PATCH Individual Subscription
    Check HTTP Response Status Code Is    405
    
    
DELETE an individual subscription
DELETE an individual subscription
    log    Try to delete an individual subscription
    [Documentation]    Test ID: 7.3.5.4.5
    Set Headers  {"Accept":"${ACCEPT}"}  
    ...    Test title:DELETE an individual subscription
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test objective: The objective is to test that DELETE method removes individual subscription on VNF   
    Delete    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}    
    ...    Pre-conditions: The Subsbcription already exists
    Log    Validate Status code
    ...    Reference: section 7.4.5.3.5 - SOL003 v2.4.1
    Integer    response status    204
    ...    Config ID: Config_prod_VNFM

    ...    Applicability:  none
*** Keywords ***
    ...    Post-Conditions:  none
Check resource existance
    DELETE Individual Subscription
    Set Headers    {"Accept":"${ACCEPT}"}
    Check HTTP Response Status Code Is    204
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Check Individual Subscription deleted
    Get    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} 
    Integer    response status    200
 No newline at end of file