Commit b557b65c authored by AHMADABB's avatar AHMADABB
Browse files

SOL005 Added individual Subscription

parent 27e1d4f0
Loading
Loading
Loading
Loading
+74 −0
Original line number Original line Diff line number Diff line
*** Settings ***
Resource    environment/variables.txt
Resource   NSFMOperationKeywords.robot   
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    REST     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}   

Documentation    This resource represents an individual subscription for NFVO alarms. 
...    The client can use this resource to read and to terminate a subscription to notifications related to NFVO fault management.
Suite Setup    Check Individual Subscription existance

*** Test Cases ***
Post Individual Subscription - Method not implemented
    [Documentation]    Test ID: 8.4.5.1
    ...    Test title:POST Individual subscription - Method not implemented
    ...    Test objective: The objective is to POST an individual subscription 
    ...    Pre-conditions: 
    ...    Reference: section 8.4.5 - SOL005 v2.4.1
    ...    Config ID:
    ...    Applicability: 
    ...    Post-Conditions: 
    Do POST Individual Subscription
    Check HTTP Response Status Code Is    405

Get Information about an individual subscription
    [Documentation]    Test ID: 8.4.5.2
    ...    Test title: Retrieve the alarm subscription
    ...    Test objective: The objective is to read an individual subscription for NFVO alarms subscribed by the client
    ...    Pre-conditions: The subscription with the given id exists
    ...    Reference: section 8.4.5 - SOL005 v2.4.1
    ...    Config ID: 
    ...    Applicability:  
    ...    Post-Conditions: 
    Do GET Individual Subscription
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header ContentType is    ${CONTENT_TYPE}
    Check HTTP Response Body Json Schema Is    FmSubscription.schema.json

PUT an individual subscription - Method not implemented
    [Documentation]    Test ID: 8.4.5.3
    ...    Test title:PUT Individual subscription - Method not implemented
    ...    Test objective: The objective is to PUT an individual subscription 
    ...    Pre-conditions: 
    ...    Reference: section 8.4.5 - SOL005 v2.4.1
    ...    Config ID:
    ...    Applicability: 
    ...    Post-Conditions: 
    Do PUT Individual Subscription
    Check HTTP Response Status Code Is    405

PATCH an individual subscription - Method not implemented
    [Documentation]    Test ID: 8.4.5.4
    ...    Test title:PATCH Individual subscription - Method not implemented
    ...    Test objective: The objective is to PATCH an individual subscription 
    ...    Pre-conditions: 
    ...    Reference: section 8.4.5 - SOL005 v2.4.1
    ...    Config ID:
    ...    Applicability: 
    ...    Post-Conditions: 
    Do PATCH Individual Subscription
    Check HTTP Response Status Code Is    405
    
DELETE an individual subscription
    [Documentation]    Test ID: 8.4.5.5
    ...    Test title:DELETE an individual subscription
    ...    Test objective: The objective is to DELETE an individual subscription 
    ...    Pre-conditions: Subsbcription already exists
    ...    Reference: section 8.4.5 - SOL005 v2.4.1
    ...    Config ID:
    ...    Applicability: 
    ...    Post-Conditions: 
    Do DELETE Individual Subscription
    Check HTTP Response Status Code Is    204
    
 No newline at end of file
+49 −2
Original line number Original line Diff line number Diff line
@@ -7,6 +7,12 @@ Library OperatingSystem




*** Keywords ***
*** Keywords ***
Check Individual Subscription existance
    Set Headers    {"Accept":"${ACCEPT}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} 
    Integer    response status    200
    
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    
@@ -177,7 +183,8 @@ Do GET Subscriptions with filter
    Log    Get the list of active subscriptions using a filter
    Log    Get the list of active subscriptions using a filter
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Accept": "${ACCEPT}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter}${outputResponse}=    Output    response
    GET    ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter}
    ${outputResponse}=    Output    response
    Set Global Variable    @{response}    ${outputResponse}
    Set Global Variable    @{response}    ${outputResponse}
    
    
    
    
@@ -213,4 +220,44 @@ Do DELETE Subscriptions
    ${outputResponse}=    Output    response
    ${outputResponse}=    Output    response
    Set Global Variable    @{response}    ${outputResponse}
    Set Global Variable    @{response}    ${outputResponse}
    
    
Do POST Individual Subscription
    log    Trying to perform a POST. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Post    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}  
    ${outputResponse}=    Output    response
    Set Global Variable    @{response}    ${outputResponse}
    
    
Do GET Individual Subscription
    log    Trying to get information about an individual subscription
    Set Headers    {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
    ${outputResponse}=    Output    response
    Set Global Variable    @{response}    ${outputResponse}
    
    
    
Do PUT Individual Subscription
    log    Trying to perform a PUT. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Put    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}  
    ${outputResponse}=    Output    response
    Set Global Variable    @{response}    ${outputResponse}
    
Do PATCH Individual Subscription
    log    Trying to perform a PATCH. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Patch    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}  
    ${outputResponse}=    Output    response
    Set Global Variable    @{response}    ${outputResponse}

Do DELETE Individual Subscription
    log    Trying to perform a DELETE.
    Set Headers  {"Accept":"${ACCEPT}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Delete    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}  
    ${outputResponse}=    Output    response
    Set Global Variable    @{response}    ${outputResponse}
+3 −3

File changed.

Contains only whitespace changes.