Skip to content
Snippets Groups Projects
Commit 76b85a6f authored by mengxuan.zhao's avatar mengxuan.zhao
Browse files

SOL 003 LCM workflow completed

parent 7ec8d395
No related branches found
Tags 2.6.1
No related merge requests found
......@@ -13,7 +13,7 @@ Suite Setup Check resource existance
Post Cancel operation task
[Documentation] The POST method initiates cancelling an ongoing VNF lifecycle operation while it is being executed or rolled back, i.e.
... the related "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state.
Log Cancel a VNF lifecycle operation if that operation has experienced a temporary failure
Log Cancel an ongoing VNF lifecycle operation
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Log Cancel a VNF lifecycle operation
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode}
......@@ -23,15 +23,14 @@ Post Cancel operation task
Should Contain ${headers} Location
Log Validation OK
Post Cancel operation task Conflict (Not-FAILED_TEMP)
# TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
Post Cancel operation task Conflict
[Documentation] Conflict.
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state,
... Typically, this is due to the fact that the VNF instance resource is not in STARTING, PROCESSING or ROLLING_BACK state,
... or another error handling action is starting, such as retry or rollback.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
Depends on test failure Check resource FAILED_TEMP
Log Final Fail an operation
Depends on test Check resource FAILED_TEMP
Log Cancel an operation
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail
Integer response status 409
......@@ -41,25 +40,6 @@ Post Cancel operation task Conflict (Not-FAILED_TEMP)
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
Post Cancel operation task Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state,
... or another error handling action is starting, such as retry or rollback.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another error handling action
log Final Fail an operation
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished
Post Cancel operation task Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
[Documentation] Not Found
......
*** Settings ***
Resource environment/configuration.txt
Resource environment/variables.txt
Resource environment/scaleVariables.txt
Resource VnfLcmMntOperationKeywords.robot
Resource SubscriptionKeywords.robot
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library OperatingSystem
Library BuiltIn
Library Collections
Library JSONLibrary
Library Process
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
*** Test Cases ***
Cancel a VNF LCM Operation - STARTING
[Documentation] Test ID: 5.x.x.x
... Test title: Cancel a VNF LCM Operation
... Test objective: The objective is to test the workflow for Cancelling a VNF LCM Operation
... Pre-conditions: The VNF lifecycle management operation occurrence is in STARTING state. NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID: 5.4.20.1)
... Reference: section 5.3.10 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: NFVO is able to receive notifications from VNFM
... Post-Conditions: The VNF lifecycle management operation occurrence is in ROLLED_BACK state
Send Cancel Operation Request
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
Check Operation Notification For Cancel ROLLED_BACK
Check Postcondition VNF Cancel - STARTING
Cancel a VNF LCM Operation - PROCESSING - ROLLING_BACK
[Documentation] Test ID: 5.x.x.x
... Test title: Cancel a VNF LCM Operation
... Test objective: The objective is to test the workflow for Cancelling a VNF LCM Operation
... Pre-conditions: The VNF lifecycle management operation occurrence is in PROCESSING or ROLLING_BACK state. NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID: 5.4.20.1)
... Reference: section 5.3.10 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: NFVO is able to receive notifications from VNFM
... Post-Conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state
Send Cancel Operation Request
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
Check Operation Notification For Cancel FAILED_TEMP
Check Postcondition VNF Cancel - PROCESSING - ROLLING_BACK
*** Keywords ***
Initialize System
Create Sessions
Precondition Checks - STARTING
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState STARTING
Precondition Checks - PROCESSING - ROLLING_BACK
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState PROCESSING
Check Postcondition VNF Cancel - STARTING
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState ROLLED_BACK
Check Postcondition VNF Cancel - PROCESSING - ROLLING_BACK
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState FAILED_TEMP
Check Operation Notification For Cancel
[Arguments] ${status}
Check Operation Notification VnfLcmOperationOccurrenceNotification ${status}
\ No newline at end of file
......@@ -21,9 +21,7 @@ Post Fail operation task
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail
Output response
Log Validate Status code
Integer response status 202
${headers}= Output response headers
Should Contain ${headers} Location
Integer response status 200
Log Validation OK
Post Fail operation task Conflict (Not-FAILED_TEMP)
......
*** Settings ***
Resource environment/configuration.txt
Resource environment/variables.txt
Resource environment/scaleVariables.txt
Resource VnfLcmMntOperationKeywords.robot
Resource SubscriptionKeywords.robot
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library OperatingSystem
Library BuiltIn
Library Collections
Library JSONLibrary
Library Process
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
*** Test Cases ***
Fail VNF LCM Operation
[Documentation] Test ID: 5.x.x.x
... Test title: Fail a VNF LCM Operation
... Test objective: The objective is to test the workflow for a Fail VNF LCM Operation
... Pre-conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state. NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID: 5.4.20.1)
... Reference: section 5.3.10 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: NFVO is able to receive notifications from VNFM
... Post-Conditions: The VNF lifecycle management operation occurrence is in FAILED state
Send Fail Operation Request
Check Operation Notification For Fail FAILED
Check HTTP Response Status Code Is 200 #the order of notification and the response code is not defined. How to implement this?
Check Postcondition VNF Fail
*** Keywords ***
Initialize System
Create Sessions
Precondition Checks
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState FAILED_TEMP
Check Postcondition VNF Fail
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState FAILED
Check Operation Notification For Fail
[Arguments] ${status}
Check Operation Notification VnfLcmOperationOccurrenceNotification ${status}
\ No newline at end of file
......@@ -47,7 +47,7 @@ Retry VNF LCM Operation - Unsuccessful
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
Check Operation Notification For Retry PROCESSING
Check Operation Notification For Retry COMPLETED
Check Operation Notification For Retry FAILED_TEMP
Check Postcondition VNF Retry Unsuccessful
*** Keywords ***
......
*** Settings ***
Resource environment/configuration.txt
Resource environment/variables.txt
Resource environment/scaleVariables.txt
Resource VnfLcmMntOperationKeywords.robot
Resource SubscriptionKeywords.robot
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library OperatingSystem
Library BuiltIn
Library Collections
Library JSONLibrary
Library Process
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
*** Test Cases ***
Roll back a VNF LCM Operation - Successful
[Documentation] Test ID: 5.x.x.x
... Test title: Roll back VNF LCM Operation - Successful
... Test objective: The objective is to test the workflow for a Rolling Back a VNF LCM Operation and the operation is successful
... Pre-conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state. NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID: 5.4.20.1)
... Reference: section 5.3.11 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: NFVO is able to receive notifications from VNFM
... Post-Conditions: The VNF lifecycle management operation occurrence is in ROLLED_BACK state
Send Roll back Operation Request
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
Check Operation Notification For Roll Back ROLLING_BACK
Check Operation Notification For Roll Back ROLLED_BACK
Check Postcondition VNF Roll Back Successful
Retry VNF LCM Operation - Unsuccessful
[Documentation] Test ID: 5.x.x.x
... Test title: Retry VNF LCM Operation - Unsuccessful
... Test objective: The objective is to test the workflow for a Retry VNF LCM Operation and the operation is not successful
... Pre-conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state. NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID: 5.4.20.1)
... Reference: section 5.3.10 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: NFVO is able to receive notifications from VNFM
... Post-Conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state
Send Roll back Operation Request
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
Check Operation Notification For Roll Back ROLLING_BACK
Check Operation Notification For Roll Back FAILED_TEMP
Check Postcondition VNF Roll Back UnSuccessful
*** Keywords ***
Initialize System
Create Sessions
Precondition Checks
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState FAILED_TEMP
Check Postcondition VNF Roll Back Successful
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState ROLLED_BACK
Check Postcondition VNF Roll Back Unsuccessful
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState FAILED_TEMP
Check Operation Notification For Roll Back
[Arguments] ${status}
Check Operation Notification VnfLcmOperationOccurrenceNotification ${status}
\ No newline at end of file
......@@ -174,6 +174,21 @@ Send Retry Operation Request
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry
Send Roll back Operation Request
Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback
Send Fail Operation Request
Log Fail a VNF lifecycle operation if that operation has experienced a temporary failure
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail
Send Cancel Operation Request
Log Cancel an ongoing VNF lifecycle operation
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode}
Create a new Grant - Synchronous mode
[Arguments] ${vnfInstanceId} ${vnfLcmOpOccId} ${operation}
Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment