Commit ee2f6677 authored by Elian Kraja's avatar Elian Kraja Committed by Giacomo Bernini
Browse files

Added NSLCM Coordination endpoint

parent 7f3ae91a
Loading
Loading
Loading
Loading
+213 −0
Original line number Diff line number Diff line
*** Settings ***

Resource    environment/variables.txt

Library    REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}     ssl_verify=false
Library    DependencyLibrary
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/

*** Test Cases ***
POST API Version - Method not implemented
    [Documentation]    Test ID: 5.3.1.10.1
    ...    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 v3.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
    POST API Version
	Check HTTP Response Status Code Is    405
    
GET API Version
    [Documentation]    Test ID: 5.3.1.10.2
    ...    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 v3.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET API Version
	Check HTTP Response Status Code Is    200
	Check HTTP Response Body Json Schema Is    ApiVersionInformation

PUT API Version - Method not implemented
    [Documentation]    Test ID: 5.3.1.10.3
    ...    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 v3.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT API Version
	Check HTTP Response Status Code Is    405

PATCH API Version - Method not implemented
    [Documentation]    Test ID: 5.3.1.10.4
    ...    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 v3.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH API Version
	Check HTTP Response Status Code Is    405
    
DELETE API Version - Method not implemented
    [Documentation]    Test ID: 5.3.1.10.5
    ...    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 v3.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE API Version
	Check HTTP Response Status Code Is    405
	
POST API Version with apiMajorVerion - Method not implemented
    [Documentation]    Test ID: 5.3.1.10.6
    ...    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 v3.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
    POST API Version
	Check HTTP Response Status Code Is    405
    
GET API Version with apiMajorVerion
    [Documentation]    Test ID: 5.3.1.10.7
    ...    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 v3.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET API Version
	Check HTTP Response Status Code Is    200
	Check HTTP Response Body Json Schema Is    ApiVersionInformation

PUT API Version with apiMajorVerion - Method not implemented
    [Documentation]    Test ID: 5.3.1.10.8
    ...    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 v3.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT API Version
	Check HTTP Response Status Code Is    405

PATCH API Version with apiMajorVerion - Method not implemented
    [Documentation]    Test ID: 5.3.1.10.9
    ...    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 v3.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH API Version
	Check HTTP Response Status Code Is    405
    
DELETE API Version with apiMajorVerion - Method not implemented
    [Documentation]    Test ID: 5.3.1.10.10
    ...    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 v3.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE API Version
	Check HTTP Response Status Code Is    405

*** Keywords ***
POST API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
GET API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PUT API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PATCH API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
DELETE API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
POST API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
GET API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PUT API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PATCH API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
DELETE API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
Check HTTP Response Status Code Is
    [Arguments]    ${expected_status}    
    Should Be Equal As Strings   ${response['status']}    ${expected_status}
    Log    Status code validated 

Check HTTP Response Body Json Schema Is
    [Arguments]    ${input}
    ${schema} =    Catenate    SEPARATOR=    ${input}    .schema.json
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
 No newline at end of file
+113 −0
Original line number Diff line number Diff line
*** Settings ***
Documentation     This Clause defines all the resources and methods provided by the NS LCM coordination interface.
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Resource          NSLCMCoordKeywords.robot
Library           JSONLibrary
Library           REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}    ssl_verify=false
Library           OperatingSystem

*** Test Cases ***
POST an individual coordination action of an LCM operation occurrence - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: POST an individual coordination action of an LCM operation occurrence
    ...    Test objective: The objective is to test that the POST method is not allowed to submit a new individuaal coordination requests information
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    POST an individual Coordination of an LCM operation occurrence
    Check HTTP Response Status Code Is    405
    

Get information about a finished coordination task 
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request information related to a terminated coordination task
    ...    Test objective: The objective is to retrieve information about an individual coordination task and perform a JSON schema validation.
    ...    Pre-conditions: Individual coordination task is terminated
    ...    Reference: Clause 12.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Retrieve information about a finished coordination task
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   LcmCoord


Get information about an ongoing coordination task 
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request information related to an ongoing coordination task
    ...    Test objective: The objective is to retrieve information about an individual coordination task that is still in running or is in the process of being cancelled
    ...    Pre-conditions: Individual coordination task is still ongoing or is in the process of being cancelled
    ...    Reference: Clause 12.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Retrieve information about an ongoing coordination task
    Check HTTP Response Status Code Is    202


Get information about an invalid coordination task 
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request information related to an invalid coordination task
    ...    Test objective: The objective is to try to read an individual coordination task
    ...    Pre-conditions: Individual coordination task is not present
    ...    Reference: Clause 12.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Retrieve information about an ongoing coordination task
    Check HTTP Response Status Code Is    404


Get information about a finished coordination task without authentication
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request information related to a finished coordination task without authentication
    ...    Test objective: The objective is to try to read an individual coordination task without using authentication
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Retrieve information about an ongoing coordination task
    Check HTTP Response Status Code Is    401


PUT an individual coordination action of an LCM operation occurrence - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: PUT an individual coordination action of an LCM operation occurrence
    ...    Test objective: The objective is to test that the PUT method is not allowed to modify an individual coordination action
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    PUT an individual coordination action of an LCM operation occurrence
    Check HTTP Response Status Code Is    405


PATCH an individual coordination action of an LCM operation occurrence - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: PATCH an individual coordination action of an LCM operation occurrence
    ...    Test objective: The objective is to test that the PATCH method is not allowed to modify an individual coordination action
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    PATCH an individual coordination action of an LCM operation occurrence
    Check HTTP Response Status Code Is    405


DELETE an individual coordination action of an LCM operation occurrence - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: DELETE an individual coordination action of an LCM operation occurrence
    ...    Test objective: The objective is to test that the DELETE method is not allowed to remove an individual coordination action
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    DELETE an individual coordination action of an LCM operation occurrence
    Check HTTP Response Status Code Is    405
+101 −0
Original line number Diff line number Diff line
*** Settings ***
Documentation     This Clause defines the "cancel" operation related to an individual coordination action for the NS LCM Coordination interface
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Resource          NSLCMCoordKeywords.robot
Library           JSONLibrary
Library           REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}    ssl_verify=false
Library           OperatingSystem

*** Test Cases ***
Request a cancellation of an ongoing coordination action 
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request a cancellation of an ongoing coordination action
    ...    Test objective: The objective is to test the request for teh cancellation of an ongoing coordination task
    ...    Pre-conditions: An ongoing coordination action is available
    ...    Reference: Clause 12.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none 
    Send Post Request for cancellation of an ongoing coordination action
    Check HTTP Response Status Code Is    202


Request a cancellation of a finished coordination action 
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request a cancellation of aterminated coordination action
    ...    Test objective: The objective is to test the request for the cancellation of a finished coordination action
    ...    Pre-conditions: A finished coordination action is available
    ...    Reference: Clause 12.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none 
    Send Post Request for cancellation of a finished coordination action
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails

  

Request a cancellation of an ongoing coordination action without authentication
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Reques a cancellation of an ongoing coordination action without using authentication
    ...    Test objective: The objective is to test the failure of the request for a cancellation of a coordination task when no authentication is used
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send Post Request for cancellation of an ongoing coordination action without authorization token
    Check HTTP Response Status Code Is    401
    

GET information about a cancellation of an ongoing coordination action - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: GET information about a cancellation of an ongoing coordination action
    ...    Test objective: The objective is to test that the GET method is not allowed to retrieve cancellation details of an ongoing coordination action
    ...    Pre-conditions: A cancellation task has been activated
    ...    Reference: Clause 12.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET information about a cancellation of an ongoing coordination action
    Check HTTP Response Status Code Is    405


PUT information about a cancellation of an ongoing coordination action - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: PUT information about a cancellation of an ongoing coordination action
    ...    Test objective: The objective is to test that the PUT method is not allowed to modify cancellation details of an ongoing coordination action
    ...    Pre-conditions: A cancellation task has been activated
    ...    Reference: Clause 12.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    PUT information about a cancellation of an ongoing coordination action
    Check HTTP Response Status Code Is    405


PATCH information about a cancellation of an ongoing coordination action - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: PATCH information about a cancellation of an ongoing coordination action
    ...    Test objective: he objective is to test that the PATCH method is not allowed to modify cancellation details of an ongoing coordination action
    ...    Pre-conditions: A cancellation task has been activated
    ...    Reference: Clause 12.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    PATCH information about a cancellation of an ongoing coordination action
    Check HTTP Response Status Code Is    405


DELETE information about a cancellation of an ongoing coordination action - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: DELETE information about a cancellation of an ongoing coordination action
    ...    Test objective: The objective is to test that the DELETE method is not allowed to remove cancellation details of an ongoing coordination action
    ...    Pre-conditions: A cancellation task has been activated
    ...    Reference: Clause 12.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    DELETE information about a cancellation of an ongoing coordination action
    Check HTTP Response Status Code Is    405
 No newline at end of file
+144 −0

File added.

Preview size limit exceeded, changes collapsed.

+253 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading