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

Adding schemas and json body requests

parent b34553ca
Loading
Loading
Loading
Loading
+88 −45
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
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
@@ -8,94 +8,137 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_veri
Library           OperatingSystem

*** Test Cases ***
Request a cancellation of an ongoing coordination action 
Request a Coordination of an LCM operation occurrence synchronously 
    [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
    ...    Test title:  Request a Coordination of an LCM operation occurrence synchronously
    ...    Test objective: The objective is to test the synchronous request for the coordination of an LCM operation occurrence and perform the JSON schema validation of the returned structure
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: A Individual coordination action resource is successfully created on the NFVO
    Send Post Request for coordination of an LCM operation occurrence
    Check HTTP Response Status Code Is    201
    Check HTTP Response Header Contains    Location
    Check HTTP Response Body Json Schema Is   LcmCoord
    Check Postcondition LcmCoord Exists


Request a Coordination of an LCM operation occurrence asynchronously 
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request a Coordination of an LCM operation occurrence asynchronously
    ...    Test objective: The objective is to test the asynchronous request for the coordination of an LCM operation occurrence and perform the validation of the headers returned
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.2.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
    Send Post Request for coordination of an LCM operation occurrence 
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location


Request a cancellation of a finished coordination action 
Request a Coordination of an LCM operation occurrence - CONFLICT # TO BE COMPLETED
    [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
    ...    Test title:  Request a Coordination of an LCM operation occurrence synchronously ... 
    ...    Test objective: The objective is to test the failure of a request for the coordination of an LCM operation occurrence ...
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.2.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
    Send Post Request for coordination of an LCM operation occurrence - conflict
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails
    

Request a Coordination of an LCM operation occurrence synchronously - Service Unavailable # TO BE COMPLETED
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request a Coordination of an LCM operation occurrence synchronously with the NFVO that is not able to perform the request immediately
    ...    Test objective: The objective is to test the request for the coordination of an LCM operation occurrence and the verify that the NFVO cannot perform immediately teh request, but can perform it sometime in the future.
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.2.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 coordination of an LCM operation occurrence synchronously - service unavailable
    Check HTTP Response Status Code Is    503
    Check HTTP Response Header Contains    Retry-After
    

Request a cancellation of an ongoing coordination action without authentication
Request a Coordination of an LCM operation occurrence 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
    ...    Test title:  Reques a Coordination of an LCM operation occurrence without using authentication
    ...    Test objective: The objective is to test teh failure of the request for the coordination of an LCM operation occurrence without providing an authentication token
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Reference: Clause 12.4.2.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
    Send Post Request for coordination of an LCM operation occurrence without authorization token
    Check HTTP Response Status Code Is    401
    

GET information about a cancellation of an ongoing coordination action - method not implemented
Request a Coordination of an LCM operation occurrence with malformed request
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Reques a Coordination of an LCM operation occurrence with malformed request
    ...    Test objective: The objective is to test the failure of the request for the coordination of an LCM operation occurrence providing a malformed LcmCoordRequest body
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.2.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 coordination of an LCM operation occurrence with malformed request
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails

GET all Coordinations of an LCM operation occurrence - 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
    ...    Test title: GET all Coordinations of an LCM operation occurrence
    ...    Test objective: The objective is to test that the GET method is not allowed to retrieve coordination requests information
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.2.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
    GET all Coordinations of an LCM operation occurrence
    Check HTTP Response Status Code Is    405


PUT information about a cancellation of an ongoing coordination action - method not implemented
PUT all Coordinations of an LCM operation occurrence - 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
    ...    Test title: PUT all Coordinations of an LCM operation occurrence
    ...    Test objective: The objective is to test that the PUT method is not allowed to modify coordination requests information
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.2.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
    PUT all Coordinations of an LCM operation occurrence
    Check HTTP Response Status Code Is    405


PATCH information about a cancellation of an ongoing coordination action - method not implemented
PATCH all Coordinations of an LCM operation occurrence - 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
    ...    Test title: PATCH all Coordinations of an LCM operation occurrence
    ...    Test objective: The objective is to test that the PATCH method is not allowed to modify coordination requests information
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.2.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
    PATCH all Coordinations of an LCM operation occurrence
    Check HTTP Response Status Code Is    405


DELETE information about a cancellation of an ongoing coordination action - method not implemented
DELETE all Coordinations of an LCM operation occurrence - 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
    ...    Test title: DELETE all Coordinations of an LCM operation occurrence
    ...    Test objective: The objective is to test that the DELETE method is not allowed to remove coordination requests information
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.2.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
    DELETE all Coordinations of an LCM operation occurrence
    Check HTTP Response Status Code Is    405
 No newline at end of file
+45 −88
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.
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
@@ -8,137 +8,94 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_veri
Library           OperatingSystem

*** Test Cases ***
Request a Coordination of an LCM operation occurrence synchronously 
Request a cancellation of an ongoing coordination action 
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request a Coordination of an LCM operation occurrence synchronously
    ...    Test objective: The objective is to test the synchronous request for the coordination of an LCM operation occurrence and perform the JSON schema validation of the returned structure
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: A Individual coordination action resource is successfully created on the NFVO
    Send Post Request for coordination of an LCM operation occurrence
    Check HTTP Response Status Code Is    201
    Check HTTP Response Header Contains    Location
    Check HTTP Response Body Json Schema Is   LcmCoord
    Check Postcondition LcmCoord Exists


Request a Coordination of an LCM operation occurrence asynchronously 
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request a Coordination of an LCM operation occurrence asynchronously
    ...    Test objective: The objective is to test the asynchronous request for the coordination of an LCM operation occurrence and perform the validation of the headers returned
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    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 coordination of an LCM operation occurrence 
    Send Post Request for cancellation of an ongoing coordination action
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location


Request a Coordination of an LCM operation occurrence - CONFLICT # TO BE COMPLETED
Request a cancellation of a finished coordination action 
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request a Coordination of an LCM operation occurrence synchronously ... 
    ...    Test objective: The objective is to test the failure of a request for the coordination of an LCM operation occurrence ...
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    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 coordination of an LCM operation occurrence - conflict
    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 Coordination of an LCM operation occurrence synchronously - Service Unavailable # TO BE COMPLETED
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Request a Coordination of an LCM operation occurrence synchronously with the NFVO that is not able to perform the request immediately
    ...    Test objective: The objective is to test the request for the coordination of an LCM operation occurrence and the verify that the NFVO cannot perform immediately teh request, but can perform it sometime in the future.
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.2.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 coordination of an LCM operation occurrence synchronously - service unavailable
    Check HTTP Response Status Code Is    503
    Check HTTP Response Header Contains    Retry-After
    

Request a Coordination of an LCM operation occurrence without authentication
Request a cancellation of an ongoing coordination action without authentication
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Reques a Coordination of an LCM operation occurrence without using authentication
    ...    Test objective: The objective is to test teh failure of the request for the coordination of an LCM operation occurrence without providing an authentication token
    ...    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.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    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 coordination of an LCM operation occurrence without authorization token
    Send Post Request for cancellation of an ongoing coordination action without authorization token
    Check HTTP Response Status Code Is    401
    

Request a Coordination of an LCM operation occurrence with malformed request
    [Documentation]    # Test ID: 5.3.1.1.11
    ...    Test title:  Reques a Coordination of an LCM operation occurrence with malformed request
    ...    Test objective: The objective is to test the failure of the request for the coordination of an LCM operation occurrence providing a malformed LcmCoordRequest body
    ...    Pre-conditions: none
    ...    Reference: Clause 12.4.2.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 coordination of an LCM operation occurrence with malformed request
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails

GET all Coordinations of an LCM operation occurrence - method not implemented
GET information about a cancellation of an ongoing coordination action - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: GET all Coordinations of an LCM operation occurrence
    ...    Test objective: The objective is to test that the GET method is not allowed to retrieve coordination requests information
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.5.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 all Coordinations of an LCM operation occurrence
    GET information about a cancellation of an ongoing coordination action
    Check HTTP Response Status Code Is    405


PUT all Coordinations of an LCM operation occurrence - method not implemented
PUT information about a cancellation of an ongoing coordination action - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: PUT all Coordinations of an LCM operation occurrence
    ...    Test objective: The objective is to test that the PUT method is not allowed to modify coordination requests information
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v3.5.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 all Coordinations of an LCM operation occurrence
    PUT information about a cancellation of an ongoing coordination action
    Check HTTP Response Status Code Is    405


PATCH all Coordinations of an LCM operation occurrence - method not implemented
PATCH information about a cancellation of an ongoing coordination action - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: PATCH all Coordinations of an LCM operation occurrence
    ...    Test objective: The objective is to test that the PATCH method is not allowed to modify coordination requests information
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v3.5.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 all Coordinations of an LCM operation occurrence
    PATCH information about a cancellation of an ongoing coordination action
    Check HTTP Response Status Code Is    405


DELETE all Coordinations of an LCM operation occurrence - method not implemented
DELETE information about a cancellation of an ongoing coordination action - method not implemented
    [Documentation]    # Test ID: 5.3.1.1.1
    ...    Test title: DELETE all Coordinations of an LCM operation occurrence
    ...    Test objective: The objective is to test that the DELETE method is not allowed to remove coordination requests information
    ...    Pre-conditions: One or more LCM Coordinations have been requested
    ...    Reference: Clause 12.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v3.5.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 all Coordinations of an LCM operation occurrence
    DELETE information about a cancellation of an ongoing coordination action
    Check HTTP Response Status Code Is    405
 No newline at end of file
+15 −1
Original line number Diff line number Diff line
{}
 No newline at end of file
{
  "nsInstanceId": "string",
  "nsLcmOpOccId": "string",
  "lcmOperationType": "INSTANTIATE",
  "coordinationActionName": "string",
  "inputParams": {},
  "_links": {
    "nsLcmOpOcc": {
      "href": "string"
    },
    "nsInstance": {
      "href": "string"
    }
  }
}
 No newline at end of file
+15 −0
Original line number Diff line number Diff line
{
  "nsInstance": "string",
  "nsLcmOpOccId": "string",
  "lcmOperationType": "INSTANTIATE",
  "coordinationActionName": "string",
  "inputParams": {},
  "_links": {
    "nsLcmOpOcc": {
      "href": "string"
    },
    "nsInstance": {
      "href": "string"
    }
  }
}
 No newline at end of file
+143 −0

File changed.

Preview size limit exceeded, changes collapsed.