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

Adopting template model to coordination request

parent 27565682
Loading
Loading
Loading
Loading
+13 −26
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ Request a Coordination of an LCM operation occurrence synchronously
    [Documentation]    Test ID: 5.3.8.2.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
    ...    Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING"
    ...    Reference: Clause 12.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_OSS/BSS
    ...    Applicability: none
@@ -28,7 +28,7 @@ Request a Coordination of an LCM operation occurrence asynchronously
    [Documentation]    Test ID: 5.3.8.2.2
    ...    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
    ...    Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING"
    ...    Reference: Clause 12.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_OSS/BSS
    ...    Applicability: none
@@ -42,7 +42,7 @@ Request a Coordination of an LCM operation occurrence - CONFLICT # TO BE COMPLET
    [Documentation]    Test ID: 5.3.8.2.3
    ...    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
    ...    Pre-conditions: The status of the related LCM opeation occurrence is not "PROCESSING"
    ...    Reference: Clause 12.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_OSS/BSS
    ...    Applicability: none
@@ -56,7 +56,7 @@ Request a Coordination of an LCM operation occurrence synchronously - Service Un
    [Documentation]    Test ID: 5.3.8.2.4
    ...    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
    ...    Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING" but API producer cannot 
    ...    Reference: Clause 12.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_OSS/BSS
    ...    Applicability: none
@@ -70,7 +70,7 @@ Request a Coordination of an LCM operation occurrence without authentication
    [Documentation]    Test ID: 5.3.8.2.5
    ...    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
    ...    Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING"
    ...    Reference: Clause 12.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_OSS/BSS
    ...    Applicability: none
@@ -79,24 +79,11 @@ Request a Coordination of an LCM operation occurrence without authentication
    Check HTTP Response Status Code Is    401
    

Request a Coordination of an LCM operation occurrence with malformed request
    [Documentation]    Test ID: 5.3.8.2.6
    ...    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_OSS/BSS
    ...    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.8.2.7
    [Documentation]    Test ID: 5.3.8.2.6
    ...    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
    ...    Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING"
    ...    Reference: Clause 12.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_OSS/BSS
    ...    Applicability: none
@@ -106,10 +93,10 @@ GET all Coordinations of an LCM operation occurrence - method not implemented


PUT all Coordinations of an LCM operation occurrence - method not implemented
    [Documentation]    Test ID: 5.3.8.2.8
    [Documentation]    Test ID: 5.3.8.2.7
    ...    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
    ...    Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING"
    ...    Reference: Clause 12.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_OSS/BSS
    ...    Applicability: none
@@ -119,10 +106,10 @@ PUT all Coordinations of an LCM operation occurrence - method not implemented


PATCH all Coordinations of an LCM operation occurrence - method not implemented
    [Documentation]    Test ID: 5.3.8.2.9
    [Documentation]    Test ID: 5.3.8.2.8
    ...    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
    ...    Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING"
    ...    Reference: Clause 12.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_OSS/BSS
    ...    Applicability: none
@@ -132,10 +119,10 @@ PATCH all Coordinations of an LCM operation occurrence - method not implemented


DELETE all Coordinations of an LCM operation occurrence - method not implemented
    [Documentation]    Test ID: 5.3.8.2.10
    [Documentation]    Test ID: 5.3.8.2.9
    ...    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
    ...    Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING"
    ...    Reference: Clause 12.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v3.5.1
    ...    Config ID: Config_prod_OSS/BSS
    ...    Applicability: none
+30 −21
Original line number Diff line number Diff line
@@ -16,7 +16,8 @@ Send Post Request for coordination of an LCM operation occurrence
    Log    Requesting a new coordination task for an LCM Operation occurrence
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${body}=    Get File    jsons/createLcmCoordRequest.json
    ${template}=    Get File    jsons/createLcmCoordRequest.json
    ${body}=        Format String    ${template}    nsInstanceId=${nsInstanceId}    nsLcmOpOccId=${nsLcmOpOccId}    lcmOperationType=${lcmOperationType}    coordinationActionName=${coordinationActionName}    nsLcmOpOccHref=${nsLcmOpOccHref}    nsInstanceHref=${nsInstanceHref}     
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations    ${body}
    ${output}=    Output    response
@@ -57,32 +58,40 @@ Check Postcondition LcmCoord Exists
    

Send Post Request for coordination of an LCM operation occurrence - conflict
    Log    To be done
    Log    Requesting a new coordination task for an LCM Operation occurrence not in PROCESSING state
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${template}=    Get File    jsons/createLcmCoordRequest.json
    ${body}=        Format String    ${template}    nsInstanceId=${nsInstanceId}    nsLcmOpOccId=${nsLcmOpOccIdNotProcessing}    lcmOperationType=${lcmOperationType}    coordinationActionName=${coordinationActionName}    nsLcmOpOccHref=${nsLcmOpOccHrefNotProcessing}    nsInstanceHref=${nsInstanceHref}     
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    

Send Post Request for coordination of an LCM operation occurrence synchronously - service unavailable
    Log    To be done


Send Post Request for coordination of an LCM operation occurrence without authorization token
    Log    Requesting a new coordination task for an LCM Operation occurrence without authorization token
    Log    Requesting a new coordination task for an LCM Operation occurrence when API producer
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${body}=    Get File    jsons/createLcmCoordRequest.json
    ${template}=    Get File    jsons/createLcmCoordRequest.json
    ${body}=        Format String    ${template}    nsInstanceId=${nsInstanceId}    nsLcmOpOccId=${nsLcmOpOccIdServiceUnavailable}    lcmOperationType=${lcmOperationType}    coordinationActionName=${coordinationActionName}    nsLcmOpOccHref=${nsLcmOpOccHrefServiceUnavailable}    nsInstanceHref=${nsInstanceHref}     
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
Send Post Request for coordination of an LCM operation occurrence with malformed request
    Log    Requesting a new coordination task for an LCM Operation occurrence


Send Post Request for coordination of an LCM operation occurrence without authorization token
    Log    Requesting a new coordination task for an LCM Operation occurrence without authorization token
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${body}=    Get File    jsons/createLcmCoordRequestMalformed.json
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${body}=    Get File    jsons/createLcmCoordRequest.json
    REST.POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 
    
   
GET all Coordinations of an LCM operation occurrence
    Log    Requesting the retrieve of all coordination tasks 
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -190,11 +199,11 @@ DELETE an individual coordination action of an LCM operation occurrence


Send Post Request for cancellation of an ongoing coordination action
    Log    Requesting the cancellatio9n of an ongoing coordination task
    Log    Requesting the cancellation of an ongoing coordination task
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/cancel
    REST.POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/${ongoingCoordinationId}/cancel
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

@@ -203,7 +212,7 @@ Send Post Request for cancellation of a finished coordination action
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/cancel
    REST.POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/${finishedCoordinationActionId}/cancel
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
@@ -212,7 +221,7 @@ Send Post Request for cancellation of an ongoing coordination action without aut
    Log    Requesting the cancellation of an ongoing coordination task without authorization
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    REST.POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/cancel
    REST.POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/${ongoingCoordinationId}/cancel
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
        
@@ -221,7 +230,7 @@ GET information about a cancellation of an ongoing coordination action
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.GET    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/cancel
    REST.GET    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/${ongoingCoordinationId}/cancel
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
@@ -230,7 +239,7 @@ PUT information about a cancellation of an ongoing coordination action
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.PUT    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/cancel
    REST.PUT    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/${ongoingCoordinationId}/cancel
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
@@ -239,7 +248,7 @@ PATCH information about a cancellation of an ongoing coordination action
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/cancel
    REST.PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/${ongoingCoordinationId}/cancel
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
@@ -248,6 +257,6 @@ DELETE information about a cancellation of an ongoing coordination action
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${NFVO_AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.DELETE    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/cancel
    REST.DELETE    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/${ongoingCoordinationId}/cancel
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
 No newline at end of file
+19 −1
Original line number Diff line number Diff line
@@ -12,9 +12,27 @@ ${apiRoot} /
${apiMajorVersion}     v1
${apiName}        lcmcoord


${response}    httpresponse

${coordinationId}    297b3460-dfbe-4c7f-80e6-7e7df8e11031
${ongoingCoordinationId}    afa7e711-dd83-4605-b426-57da720df71b
${erroneousCoordinationId}    ERRONEOUS_COORDINATION_ID
${finishedCoordinationActionId}    dfbe80e6-4605-dd83-b426-57da720df82c

### Template data for coordinationRequest 
${nsInstanceId}
${nsLcmOpOccId}
${lcmOperationType}
${coordinationActionName}
${nsLcmOpOccHref}
${nsInstanceHref}


### Template data for coordinationRequest for LCMOpp not in PROCESSING state
${nsLcmOpOccIdNotProcessing}
${nsLcmOpOccHrefNotProcessing}


### Template data for coordinationRequest for LCMOpp when API producer cannot execute immediately the request
${nsLcmOpOccIdServiceUnavailable}
${nsLcmOpOccHrefServiceUnavailable}
+14 −15
Original line number Diff line number Diff line
{
  "nsInstanceId": "string",
  "nsLcmOpOccId": "string",
  "lcmOperationType": "INSTANTIATE",
  "coordinationActionName": "string",
  "inputParams": {},
  "_links": {
    "nsLcmOpOcc": {
      "href": "string"
    },
    "nsInstance": {
      "href": "string"
    }
  }
}
 No newline at end of file
{{
  "nsInstanceId": "{nsInstanceId}",
  "nsLcmOpOccId": "{nsLcmOpOccId}",
  "lcmOperationType": "{lcmOperationType}",
  "coordinationActionName": "{coordinationActionName}",
  "_links": {{
    "nsLcmOpOcc": {{
      "href": "{nsLcmOpOccHref}"
    }},
    "nsInstance": {{
      "href": "{nsInstanceHref}"
    }}
  }}
}}
 No newline at end of file
+0 −15
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
Loading