SOL002 VNF LCM Coordination - Implementation of deltas between v4.5.1 and v4.4.1

This merge request refers to the implementation of deltas between v4.5.1 and v4.4.1 of SOL002 VNF LCM Coordination Interface.

Deadline for review: Wed 25th Sept 2024 @noon CEST

Merge request reports

Loading
+4 −0
Changes for SOL002/VNFLCMCoordination-API/environment/variables.txt: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@ ${EM-VNF_PORT} 8081 # Listening port of the NFVO
${EM-VNF_SCHEMA}    https
${CONTENT_TYPE_JSON}    application/json
${ACCEPT_JSON}         application/json
${LCMCOORDINATION_SCOPE}    lcmcoord:v1:all
${NEG_SCOPE}    lcmcoord:v1:invalid
${OAUTH_Encryption_ALGORITHM}   HS256
${API_VERSION}      1.12.0

${SYNCHRONOUS_MODE_SUPPORT}      1  #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode.

+31 −7
Changes for SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot: 31 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ POST Cancellation of an Ongoing Individual Coordination Action
    ...    Test title: POST Cancellation of an Ongoing Individual Coordination Action
    ...    Test Objective: The objective is to test that POST request for cancellation of an ongoing individual coordination Action has accepted for processing.
    ...    pre-condition: The status of the related LCM operation occurance is "PROCESSING"
    ...    Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: When there is an Ongoing individual LCM operation coordination action.
    ...    Post-Condition: none
@@ -28,7 +28,7 @@ POST Cancellation of an Ongoing Individual Coordination Action - Conflict
    ...    Test title: POST Cancellation of an Ongoing Individual Coordination Action - Conflict
    ...    Test Objective: The objective is to test that POST request for cancellation of an ongoing individual coordination Action is not successfull due to a conflict with the state of the "Individual coordination action" resource. 
    ...    pre-condition: none
    ...    Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: Processing of Individual Coordination Action has 'Finished'.
    ...    Post-Condition: none
@@ -41,7 +41,7 @@ Request a cancellation of an ongoing coordination action without authentication
    ...    Test title: Request a cancellation of an ongoing coordination action without 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 Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -53,7 +53,7 @@ GET Cancellation of an Ongoing Individual Coordination Action - Method not Imple
    ...    Test title: GET Cancellation of an Ongoing Individual Coordination Action
    ...    Test Objective: The objective is to test that GET method for cancellation of an ongoing individual coordination Action is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: ongoing individual coordination
    ...    Post-Condition: none
@@ -65,7 +65,7 @@ PUT Cancellation of an Ongoing Individual Coordination Action - Method not Imple
    ...    Test title: PUT Cancellation of an Ongoing Individual Coordination Action
    ...    Test Objective: The objective is to test that PUT method for cancellation of an ongoing individual coordination Action is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
@@ -77,7 +77,7 @@ PATCH Cancellation of an Ongoing Individual Coordination Action - Method not Imp
    ...    Test title: PATCH Cancellation of an Ongoing Individual Coordination Action
    ...    Test Objective: The objective is to test that PATCH method for cancellation of an ongoing individual coordination Action is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
@@ -89,9 +89,33 @@ DELETE Cancellation of an Ongoing Individual Coordination Action - Method not Im
    ...    Test title: DELETE Cancellation of an Ongoing Individual Coordination Action
    ...    Test Objective: The objective is to test that DELETE method for cancellation of an ongoing individual coordination Action is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
    DELETE Cancellation of an Ongoing Individual Coordination Action
    Check HTTP Response Status Code Is    405
POST Cancellation of an Ongoing Individual Coordination Action with permitted authorization scope
    [Documentation]    Test ID: 6.3.6.4.8
    ...    Test title: POST Cancellation of an Ongoing Individual Coordination Action with permitted authorization scope
    ...    Test Objective: The objective is to test that POST request for cancellation of an ongoing individual coordination Action has accepted for processing with permitted authorization scope.
    ...    pre-condition: The status of the related LCM operation occurance is "PROCESSING"
    ...    Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: When there is an Ongoing individual LCM operation coordination action.
    ...    Post-Condition: none
    POST Cancellation of an Ongoing Individual Coordination Action with permitted authorization scope
    Check HTTP Response Status Code Is    202
    Check HTTP Response Body Should be Empty
POST Cancellation of an Ongoing Individual Coordination Action with not permitted authorization scope
    [Documentation]    Test ID: 6.3.6.4.9
    ...    Test title: POST Cancellation of an Ongoing Individual Coordination Action with not permitted authorization scope
    ...    Test Objective: The objective is to test that POST request for cancellation of an ongoing individual coordination Action has accepted for processing with not permitted authorization scope.
    ...    pre-condition: The status of the related LCM operation occurance is "PROCESSING"
    ...    Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: When there is an Ongoing individual LCM operation coordination action.
    ...    Post-Condition: none
    POST Cancellation of an Ongoing Individual Coordination Action with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is    ProblemDetails
 No newline at end of file
+36 −10
Changes for SOL002/VNFLCMCoordination-API/Coordinations.robot: 36 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ POST Coordination of LCM Operation Occurance and API Producer has Chosen the Syn
    ...    Test title: Post Coordination of an LCM operation occurrence
    ...    Test Objective: The objective is to test the creation of new Individual Coordination Action, and perform a JSON schema validation of the returned LCM coordination data structure.
    ...    pre-condition: LCM operation occurrence resource is in Processing state
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: API producer has chosen the synchronous mode   
    ...    Post-Condition: none
@@ -30,7 +30,7 @@ POST Coordination of LCM Operation Occurance and API Producer has Chosen the Asy
    ...    Test title: Post Coordination of an LCM operation occurrence
    ...    Test Objective: The objective is to test that the coordination of a LCM operation occurance request has been accepted for processing, and perform a JSON schema validation of the returned LCM coordination data structure.
    ...    pre-condition: LCM operation occurrence resource is in Processing state
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: API producer has chosen the asynchronous mode   
    ...    Post-Condition: none
@@ -44,7 +44,7 @@ POST Coordination of a LCM Operation Occurance Forbidden
    ...    Test title: Post Coordination of an LCM operation occurrence Forbidden
    ...    Test Objective: The objective is to test the failure of a request for the coordination of an LCM operation occurrence
    ...    pre-condition: The status of the related LCM opeation occurrence is "PROCESSING". The request is performed by a user that has not the grant to run this operation
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
@@ -57,7 +57,7 @@ POST Coordination of LCM Operation Occurance Conflict
    ...    Test title: Post Coordination of an LCM operation occurrence Conflict
    ...    Test Objective: The objective is to verify that no coordination actions can be executed currently, due to a conflict with the state of the "Coordinations" resource.
    ...    pre-condition: The status of the related LCM opeation occurrence is not "PROCESSING"
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: When there are many coordination actions exist, or conflicting ones, are in progress.
    ...    Post-Condition: none
@@ -70,7 +70,7 @@ POST Coordination of LCM Operation Occurance Service Unavailable
    ...    Test title: Post Coordination of an LCM operation occurrence Service Unavailable 
    ...    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 the request, but can perform it sometime in the future. 
    ...    pre-condition: The status of the related LCM opeation occurrence is "PROCESSING" but API producer cannot perform immediately the request
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: API producer has chosen the synchronous mode
    ...    Post-Condition: none
@@ -84,7 +84,7 @@ POST Coordination of an LCM operation occurrence without authentication
    ...    Test title:  Request a Coordination of an LCM operation occurrence without authentication
    ...    Test objective: The objective is to test the failure of the request for the coordination of an LCM operation occurrence without providing an authentication token
    ...    Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING"
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -96,7 +96,7 @@ GET Coordination of a LCM Operation Occurance - Method not implemented
    ...    Test title: GET Coordination of a LCM Operation Occurance - Method not implemented
    ...    Test Objective: The objective is to test that GET method for Resource Coordinations is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
@@ -108,7 +108,7 @@ PUT Coordination of a LCM Operation Occurance - Method not implemented
    ...    Test title: PUT Coordination of a LCM Operation Occurance - Method not implemented
    ...    Test Objective: The objective is to test that PUT method for Resource Coordinations is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
@@ -120,7 +120,7 @@ PACTH Coordination of a LCM Operation Occurance - Method not implemented
    ...    Test title: PATCH Coordination of a LCM Operation Occurance - Method not implemented
    ...    Test Objective: The objective is to test that PATCH method for Resource Coordinations is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
@@ -132,9 +132,35 @@ DELETE Coordination of a LCM Operation Occurance - Method not implemented
    ...    Test title: DELETE Coordination of a LCM Operation Occurance - Method not implemented
    ...    Test Objective: The objective is to test that DELETE method for Resource Coordinations is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
    DELETE coordination of LCM operation Occurance
    Check HTTP Response Status Code Is    405
POST Coordination of LCM Operation Occurance and API Producer has Chosen the Synchronous Mode with permitted authorization scope
    [Documentation]    Test ID: 6.3.6.2.11
    ...    Test title: Post Coordination of an LCM operation occurrence with permitted authorization scope
    ...    Test Objective: The objective is to test the creation of new Individual Coordination Action, and perform a JSON schema validation of the returned LCM coordination data structure with permitted authorization scope.
    ...    pre-condition: LCM operation occurrence resource is in Processing state
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: API producer has chosen the synchronous mode   
    ...    Post-Condition: none
    Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode with permitted authorization scope
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    LcmCoord
    Check HTTP Response Header Contains    Location
    Check Postcondition LcmCoord Exists
POST Coordination of LCM Operation Occurance and API Producer has Chosen the Synchronous Mode with not permitted authorization scope
    [Documentation]    Test ID: 6.3.6.2.12
    ...    Test title: Post Coordination of an LCM operation occurrence with not permitted authorization scope
    ...    Test Objective: The objective is to test the creation of new Individual Coordination Action, and perform a JSON schema validation of the returned LCM coordination data structure with not permitted authorization scope.
    ...    pre-condition: LCM operation occurrence resource is in Processing state
    ...    Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: API producer has chosen the synchronous mode   
    ...    Post-Condition: none
    Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is    ProblemDetails
 No newline at end of file
+31 −7
Changes for SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot: 31 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ POST Individual LCM Operation Coordination Results - Method not implemented
    ...    Test title: POST Individual LCM Operation Coordination Results - Method not implemented
    ...    Test Objective: The objective is to test that POST method for individual LCM operation coordination results is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
@@ -26,7 +26,7 @@ GET Individual LCM Operation Coordination Results - Coordination is Finished
    ...    Test title: GET Individual LCM Operation Coordination Results
    ...    Test Objective: The objective is to test that coordination is finished and GET method reads individual LCM operation coordination results successfully, and perform a JSON schema validation of the returned LCM coordination data structure.
    ...    pre-condition: LCM operation occurrence resource is in Processing state
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: When the Individual LCM Operation Coordination is finished
    ...    Post-Condition: none
@@ -39,7 +39,7 @@ GET Individual LCM Operation Coordination Results - Coordination is Not Finished
    ...    Test title: GET Individual LCM Operation Coordination Results
    ...    Test Objective: The objective is to test that GET method checks that whether Individual LCM Operation Coordination is still ongoing or in the process of being cancelled.
    ...    pre-condition: LCM operation occurrence resource is in Processing state
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: When the Individual LCM Operation Coordination is still ongoing or in the process of being cancelled.
    ...    Post-Condition: none
@@ -52,7 +52,7 @@ Get Individual LCM Operation Coordination Results without authentication
    ...    Test title:  Get information about 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 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -64,7 +64,7 @@ PUT Individual LCM Operation Coordination Results - Method not implemented
    ...    Test title: PUT Individual LCM Operation Coordination Results - Method not implemented
    ...    Test Objective: The objective is to test that PUT method for individual LCM operation coordination results is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
@@ -76,7 +76,7 @@ PATCH Individual LCM Operation Coordination Results - Method not implemented
    ...    Test title: PATCH Individual LCM Operation Coordination Results - Method not implemented
    ...    Test Objective: The objective is to test that PATCH method for individual LCM operation coordination results is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
@@ -88,9 +88,33 @@ DELETE Individual LCM Operation Coordination Results - Method not implemented
    ...    Test title: PUT Individual LCM Operation Coordination Results - Method not implemented
    ...    Test Objective: The objective is to test that DELETE method for individual LCM operation coordination results is not implemented.
    ...    pre-condition: none
    ...    Reference: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none  
    ...    Post-Condition: none
    DELETE Individual LCM Operation Coordination Results
    Check HTTP Response Status Code Is    405
GET Individual LCM Operation Coordination Results - Coordination is Finished with permitted authorization scope
    [Documentation]    Test ID: 6.3.6.3.8
    ...    Test title: GET Individual LCM Operation Coordination Results - Coordination is Finished with permitted authorization scope
    ...    Test Objective: The objective is to test that coordination is finished and GET method reads individual LCM operation coordination results successfully, and perform a JSON schema validation of the returned LCM coordination data structure with permitted authorization scope.
    ...    pre-condition: LCM operation occurrence resource is in Processing state
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: When the Individual LCM Operation Coordination is finished
    ...    Post-Condition: none
    GET Individual LCM Operation Coordination Results with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    LcmCoord
GET Individual LCM Operation Coordination Results - Coordination is Finished with not permitted authorization scope
    [Documentation]    Test ID: 6.3.6.3.9
    ...    Test title: GET Individual LCM Operation Coordination Results - Coordination is Finished with not permitted authorization scope
    ...    Test Objective: The objective is to test that coordination is finished and GET method reads individual LCM operation coordination results successfully, and perform a JSON schema validation of the returned LCM coordination data structure with not permitted authorization scope.
    ...    pre-condition: LCM operation occurrence resource is in Processing state
    ...    Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: When the Individual LCM Operation Coordination is finished
    ...    Post-Condition: none
    GET Individual LCM Operation Coordination Results with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is    ProblemDetails
 No newline at end of file
+112 −0
Changes for SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot: 112 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ Library JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    OperatingSystem
Library    DependencyLibrary
Library    jwt

*** Keywords *** 

@@ -25,6 +26,7 @@ Check HTTP Response Body Json Schema Is
Check Postcondition LcmCoord Exists
    Log    Checking that individual lcm coordination exists
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/coordiations/${response['body']['id']}
    ${output}=    Output    response
@@ -38,6 +40,7 @@ Check HTTP Response Body Should be Empty
POST Individual LCM Operation Coordination Results
    Log    Trying to perform a POST. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    POST    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}
@@ -47,6 +50,7 @@ POST Individual LCM Operation Coordination Results
GET Individual LCM Operation Coordination Results
    Log    Requesting the retrieve of a finished coordination task 
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action}
@@ -56,6 +60,7 @@ GET Individual LCM Operation Coordination Results
GET Individual LCM Operation Coordination Results of Ongoing Coordination Action
    Log    Requesting the retrieve of an ongoing coordination task
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}
@@ -65,6 +70,7 @@ GET Individual LCM Operation Coordination Results of Ongoing Coordination Action
GET Individual LCM Operation Coordination Results - without authentication
    Log    Requesting to retrieve a finished coordination task without authentication
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    GET    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}
    ${outputResponse}=    Output    response
@@ -73,6 +79,7 @@ GET Individual LCM Operation Coordination Results - without authentication
PUT Individual LCM Operation Coordination Results
    Log    Trying to perform a PUT. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    PUT    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}
@@ -82,6 +89,7 @@ PUT Individual LCM Operation Coordination Results
PATCH Individual LCM Operation Coordination Results
    Log    Trying to perform a PATCH. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    PATCH    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}
@@ -91,6 +99,7 @@ PATCH Individual LCM Operation Coordination Results
DELETE Individual LCM Operation Coordination Results
    Log    Trying to perform a DELETE. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    DELETE    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}
@@ -100,6 +109,7 @@ DELETE Individual LCM Operation Coordination Results
POST Cancellation of an Ongoing Individual Coordination Action
    Log    Trying to initiates the cancellation of an ongoing coordination action.
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    POST    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}/cancel
@@ -109,6 +119,7 @@ POST Cancellation of an Ongoing Individual Coordination Action
POST Cancellation of an Ongoing Individual Coordination Action - Conflict
    Log    Trying to initiates the cancellation of an ongoing coordination action.
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    POST    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action}/cancel
@@ -118,6 +129,7 @@ POST Cancellation of an Ongoing Individual Coordination Action - Conflict
POST Cancellation of an Ongoing Individual Coordination Action without authorization token
    Log    Requesting the cancellation of an ongoing coordination task without authorization
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}/cancel
    ${output}=    Output    response
@@ -126,6 +138,7 @@ POST Cancellation of an Ongoing Individual Coordination Action without authoriza
GET Cancellation of an Ongoing Individual Coordination Action
    Log    Trying to perform a GET. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel
@@ -135,6 +148,7 @@ GET Cancellation of an Ongoing Individual Coordination Action
PUT Cancellation of an Ongoing Individual Coordination Action
    Log    Trying to perform a PUT. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    PUT    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel
@@ -144,6 +158,7 @@ PUT Cancellation of an Ongoing Individual Coordination Action
PATCH Cancellation of an Ongoing Individual Coordination Action
    Log    Trying to perform a PATCH. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    PATCH    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel
@@ -153,6 +168,7 @@ PATCH Cancellation of an Ongoing Individual Coordination Action
DELETE Cancellation of an Ongoing Individual Coordination Action
    Log    Trying to perform a DELETE. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    DELETE    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel
@@ -172,6 +188,7 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Synchro
    Pass Execution If    ${SYNCHRONOUS_MODE_SUPPORT} == 0    The API producer is in Asynchronous Mode. Skipping the test.
    Log    Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template} =    Get File    jsons/LcmCoordRequest.json
@@ -184,6 +201,7 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Asynchr
    Pass Execution If    ${SYNCHRONOUS_MODE_SUPPORT} == 1    The API producer is in Synchronous Mode. Skipping the test.
    Log    Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template} =    Get File    jsons/LcmCoordRequest.json
@@ -196,6 +214,7 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Synchro
    Pass Execution If    ${SYNCHRONOUS_MODE_SUPPORT} == 0    The API producer is in Asynchronous Mode. Skipping the test.
    Log    Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template} =    Get File    jsons/LcmCoordRequest.json
@@ -208,6 +227,7 @@ Post coordination of LCM operation Occurance - conflict
    Log    Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations
    Log    Requesting a new coordination task for an LCM Operation occurrence not in PROCESSING state
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template} =    Get File    jsons/LcmCoordRequest.json
@@ -219,6 +239,7 @@ Post coordination of LCM operation Occurance - conflict
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    {"Version": "${API_VERSION}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${body}=    Get File    jsons/LcmCoordRequest.json
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations    ${body}
@@ -229,6 +250,7 @@ Post coordination of LCM operation Occurance is Forbidden
    Log    Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations
    Log    The coordination action request should be rejected	
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${INSUFFICIENT_AUTHORIZATION_TOKEN}"}
    ${template} =    Get File    jsons/LcmCoordRequest.json
@@ -240,6 +262,7 @@ Post coordination of LCM operation Occurance is Forbidden
GET coordination of LCM operation Occurance	
    Log    Trying to perform a GET. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations
@@ -249,6 +272,7 @@ GET coordination of LCM operation Occurance
PUT coordination of LCM operation Occurance	
    Log    Trying to perform a PUT. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    PUT    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations
@@ -258,6 +282,7 @@ PUT coordination of LCM operation Occurance
PATCH coordination of LCM operation Occurance	
    Log    Trying to perform a PATCH. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations
@@ -267,6 +292,7 @@ PATCH coordination of LCM operation Occurance
DELETE coordination of LCM operation Occurance	
    Log    Trying to perform a DELETE. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    DELETE    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations
@@ -275,6 +301,7 @@ DELETE coordination of LCM operation Occurance

POST API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
@@ -282,6 +309,7 @@ POST API Version
	
GET API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
@@ -289,6 +317,7 @@ GET API Version
	
PUT API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
@@ -296,6 +325,7 @@ PUT API Version
	
PATCH API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
@@ -303,6 +333,7 @@ PATCH API Version
	
DELETE API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
@@ -310,6 +341,7 @@ DELETE API Version
	
POST API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
@@ -317,6 +349,7 @@ POST API Version with apiMajorVersion
	
GET API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
@@ -324,6 +357,7 @@ GET API Version with apiMajorVersion
	
PUT API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
@@ -331,6 +365,7 @@ PUT API Version with apiMajorVersion
	
PATCH API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
@@ -338,7 +373,84 @@ PATCH API Version with apiMajorVersion
	
DELETE API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
JWT Encode
    [Arguments]    ${payload}    ${key}    ${algorithm}
    ${encoded}=    Evaluate    jwt.encode(${payload}, ${key}, ${algorithm})
    [Return]    ${encoded}
Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode with permitted authorization scope
    Pass Execution If    ${SYNCHRONOUS_MODE_SUPPORT} == 0    The API producer is in Asynchronous Mode. Skipping the test.
    Log    Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations with permitted authorization scope
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scope_value}=    Create Dictionary    scopeValue=${LCMCOORDINATION_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    ${template} =    Get File    jsons/LcmCoordRequest.json
    ${body}=    Format String    ${template}    vnfInstanceId=${vnfInstanceId}    vnfLcmOpOccId=${vnfLcmOpOccId}    lcmOperationType=${lcmOperationType}    coordinationActionName=${coordinationActionName}    vnfLcmOpOccHref=${vnfLcmOpOccHref}    vnfInstanceHref=${vnfInstanceHref}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations    ${body}
    ${outputResponse}=    Output    response
	Set Suite Variable    ${response}    ${outputResponse}
Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode with not permitted authorization scope
    Pass Execution If    ${SYNCHRONOUS_MODE_SUPPORT} == 0    The API producer is in Asynchronous Mode. Skipping the test.
    Log    Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations with not permitted authorization scope
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scope_value}=    Create Dictionary    scopeValue=${NEG_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    ${template} =    Get File    jsons/LcmCoordRequest.json
    ${body}=    Format String    ${template}    vnfInstanceId=${vnfInstanceId}    vnfLcmOpOccId=${vnfLcmOpOccId}    lcmOperationType=${lcmOperationType}    coordinationActionName=${coordinationActionName}    vnfLcmOpOccHref=${vnfLcmOpOccHref}    vnfInstanceHref=${vnfInstanceHref}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations    ${body}
    ${outputResponse}=    Output    response
	Set Suite Variable    ${response}    ${outputResponse}
GET Individual LCM Operation Coordination Results with permitted authorization scope
    Log    Requesting the retrieve of a finished coordination task with permitted authorization scope
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scope_value}=    Create Dictionary    scopeValue=${LCMCOORDINATION_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    GET    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action}
    ${outputResponse}=    Output    response
	Set Suite Variable    ${response}    ${outputResponse} 
GET Individual LCM Operation Coordination Results with not permitted authorization scope
    Log    Requesting the retrieve of a finished coordination task with not permitted authorization scope
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scope_value}=    Create Dictionary    scopeValue=${NEG_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    GET    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action}
    ${outputResponse}=    Output    response
	Set Suite Variable    ${response}    ${outputResponse} 
POST Cancellation of an Ongoing Individual Coordination Action with permitted authorization scope
    Log    Trying to initiates the cancellation of an ongoing coordination action with permitted authorization scope.
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scope_value}=    Create Dictionary    scopeValue=${LCMCOORDINATION_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    POST    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}/cancel
    ${outputResponse}=    Output    response
	Set Suite Variable    ${response}    ${outputResponse}
POST Cancellation of an Ongoing Individual Coordination Action with not permitted authorization scope
    Log    Trying to initiates the cancellation of an ongoing coordination action with not permitted authorization scope.
    Set Headers  {"Accept":"${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scope_value}=    Create Dictionary    scopeValue=${NEG_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    POST    ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}/cancel
    ${outputResponse}=    Output    response
	Set Suite Variable    ${response}    ${outputResponse}
 No newline at end of file
Loading