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

VNF LCM progress

parent 457cab7f
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@ Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Documentation This resource represents an individual VNF instance. The client can use this resource to modify and delete the
... underlying VNF instance, and to read information about the VNF instance.
Suite setup Check resource existance
*** Test Cases ***
Post Individual VNFInstance - Method not implemented
......@@ -27,7 +29,7 @@ Get Information about an individual VNF Instance
Output response
Integer response status 200
PUT Individual VNFInstance - Method not implemented
PUT Individual VNFInstance - Method not implemented
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
......@@ -56,6 +58,7 @@ PATCH Individual VNFInstance 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 another LCM operation is ongoing. The response body shall contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error.
[Setup] Launch another LCM operation
log Trying to modify an individual VNF instance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
......@@ -64,6 +67,7 @@ PATCH Individual VNFInstance Conflict
Log Validate Status code
Output response
Integer response status 409
[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
PATCH Individual VNFInstance Precondition failed
# TODO: Need to set the pre-condition of the test
......@@ -97,6 +101,7 @@ DELETE Individual VNFInstance 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 in INSTANTIATED state.
... The response body shall contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error.
[Setup] Check resource instantiated
log Trying to delete an individual VNF instance Conflict
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
......@@ -104,4 +109,26 @@ DELETE Individual VNFInstance Conflict
Output response
Integer response status 409
\ No newline at end of file
*** Key words ***
Check resource existance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Integer response status 200
Check resource instantiated
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
String response body instantiationState INSTANTIATED
Launch another LCM operation
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${Scale_Vnf_REQUEST}
Integer response status 202
......@@ -2,6 +2,9 @@
Resource variables.txt
Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library DependencyLibrary
Suite setup Check resource existance
*** Test Cases ***
Instantiate a vnfInstance
......@@ -21,6 +24,7 @@ Instantiate a vnfInstance 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 in INSTANTIATED state.
... The response body shall contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error.
[Setup] Check resource instantiated
Log Trying to Instantiate a vnf Instance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
......@@ -60,4 +64,19 @@ DELETE Instantiate VNFInstance - Method not implemented
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate
Log Validate Status code
Output response
Integer response status 405
\ No newline at end of file
Integer response status 405
*** Key words ***
Check resource existance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Integer response status 200
Check resource instantiated
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
String response body instantiationState INSTANTIATED
\ No newline at end of file
*** Settings ***
Resource variables.txt
Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library DependencyLibrary
Suite setup Check resource existance
*** Test Cases ***
Scale a vnfInstance
[Documentation] Instantiate VNF The POST method instantiates a VNF instance.
Log Trying to Instantiate a vnf Instance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${Scale_Vnf_REQUEST}
Integer response status 202
Log Status code validated
Scale a vnfInstance Conflict (Not-Instantiated)
# TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
[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 in NOT-INSTANTIATED state, or that another lifecycle management operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error.
[Setup] Check resource not instantiated
Log Trying to Scale a vnf Instance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${Scale_Vnf_REQUEST}
Output response
Integer response status 409
Log Status code validated
Scale a vnfInstance 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 in NOT-INSTANTIATED state, or that another lifecycle management operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error.
[Setup] Launch another LCM operation
log Trying to Scale a vnf Instance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${Scale_Vnf_REQUEST}
Log Validate Status code
Output response
Integer response status 409
[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
Scale a vnfInstance Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
[Documentation] Not Found
... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists.
... Specifically in case of this task resource, the response code 404 shall also returned if the task is not supported for the VNF instance represented by the parent resource, which means that the task resource consequently does not exist.
... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the “detail” attribute shall convey more information about the error.
[Setup] Check scale not supported
Log Trying to scale a vnf Instance, not exist
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${Scale_Vnf_REQUEST}
Integer response status 404
Log Status code validated
GET Instantiate VNFInstance - Method not implemented
log Trying to perform a GET. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale
Log Validate Status code
Output response
Integer response status 405
PUT Instantiate VNFInstance - Method not implemented
log Trying to perform a PUT. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale
Log Validate Status code
Output response
Integer response status 405
PATCH Instantiate VNFInstance - Method not implemented
log Trying to perform a PATCH. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale
Log Validate Status code
Output response
Integer response status 405
DELETE Instantiate VNFInstance - Method not implemented
log Trying to perform a DELETE. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale
Log Validate Status code
Output response
Integer response status 405
*** Key words ***
Check resource existance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Integer response status 200
Check resource not instantiated
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
String response body instantiationState NOT_INSTANTIATED
Check scale not supported
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Missing response body instantiatedVnfInfo scaleStatus
Launch another LCM operation
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${Scale_Vnf_REQUEST}
Integer response status 202
\ No newline at end of file
*** Settings ***
Resource variables.txt
Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library DependencyLibrary
Suite setup Check resource existance
*** Test Cases ***
Scale a vnfInstance to level
[Documentation] Instantiate VNF The POST method instantiates a VNF instance.
Log Trying to Instantiate a vnf Instance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${Scale_Vnf_to_Level_REQUEST}
Integer response status 202
Log Status code validated
Scale a vnfInstance to level Conflict (Not-Instantiated)
# TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
[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 in NOT-INSTANTIATED state, or that another lifecycle management operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error.
[Setup] Check resource not instantiated
Log Trying to Scale a vnf Instance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${Scale_Vnf_REQUEST}
Output response
Integer response status 409
Log Status code validated
Scale a vnfInstance to level 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 in NOT-INSTANTIATED state, or that another lifecycle management operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error.
[Setup] Launch another LCM operation
log Trying to Scale a vnf Instance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${Scale_Vnf_REQUEST}
Log Validate Status code
Output response
Integer response status 409
[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
Scale a vnfInstance Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
[Documentation] Not Found
... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists.
... Specifically in case of this task resource, the response code 404 shall also returned if the task is not supported for the VNF instance represented by the parent resource, which means that the task resource consequently does not exist.
... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the “detail” attribute shall convey more information about the error.
[Setup] Check scale to level not supported
Log Trying to scale a vnf Instance, not exist
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${Scale_Vnf_REQUEST}
Integer response status 404
Log Status code validated
GET Scale to level VNFInstance - Method not implemented
log Trying to perform a GET. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level
Log Validate Status code
Output response
Integer response status 405
PUT Scale to level VNFInstance - Method not implemented
log Trying to perform a PUT. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level
Log Validate Status code
Output response
Integer response status 405
PATCH Scale to level VNFInstance - Method not implemented
log Trying to perform a PATCH. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level
Log Validate Status code
Output response
Integer response status 405
DELETE Scale to level VNFInstance - Method not implemented
log Trying to perform a DELETE. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level
Log Validate Status code
Output response
Integer response status 405
*** Key words ***
Check resource existance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Integer response status 200
Check resource not instantiated
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
String response body instantiationState NOT_INSTANTIATED
Check scale to level not supported
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Missing response body instantiatedVnfInfo scaleStatus
Launch another LCM operation
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${Scale_Vnf_REQUEST}
Integer response status 202
\ No newline at end of file
......@@ -7,6 +7,7 @@ Library REST http://${VNFM_HOST}:${VNFM_PORT}
*** Test cases ***
Create a new vnfInstance
[Setup] #make sure the vnfInstand ${vnfInstanceId} doesn't exist
Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/vnf_instances
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
......@@ -126,6 +127,4 @@ DELETE VNFInstances - Method not implemented
Log Validate Status code
Output response
Integer response status 405
*** Keywords ***
......@@ -9,7 +9,8 @@ ${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE} application/json
${CONTENT_TYPE_PATCH} application/merge-patch+json
${PATCH_BODY_REQUEST} {}
${PATCH_BODY_REQUEST_CONFLICT} {}
${PATCH_BODY_REQUEST_CONFLICT} {}
${INSTANTIATE_VNF_REQUEST} {}
${ACCEPT} application/json
${apiRoot} /
${apiName} vnflcm
......@@ -26,4 +27,6 @@ ${ACCEPT_ZIP} application/zip
${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
${ARTIFACT_TYPE} application/octet-stream
${ARTIFACT_ID} artifactId
${WRONG_ACCEPT} application/json
\ No newline at end of file
${WRONG_ACCEPT} application/json
${Scale_Vnf_REQUEST} {}
${Scale_Vnf_to_Level_REQUEST} {}
\ No newline at end of file
......@@ -16,7 +16,27 @@ SOL003
- VNFIndicatorNotification-API_nxw ------------------------> [NOT STARTED]
- VNFLifecycleManagement-API_egm
- VNFLifecycleManagement-API_egm ----------------------------> [ONGOING]
* VNFInstances --------------------------------------> [DONE]
* IndividualVNFInstance --------------------------------------> [DONE]
* InstantiateVNFTask --------------------------------------> [DONE]
* ScaleVNFTask --------------------------------------> [DONE]
* ScaleVNFToLevelTask --------------------------------------> [DONE]
* ChangeExternalVNFConnectivityTask ----------------------------> [ONGOING]
* TerminateVNFTask ----------------------------> [ONGOING]
* HealVNFTask ----------------------------> [ONGOING]
* OperateVNFTask ----------------------------> [ONGOING]
* ChangeExternalVNFConnectivityTask ----------------------------> [ONGOING]
* VnfLcmOperationOccurences ----------------------------> [ONGOING]
* IndividualVnfLcmOperationOccurence ----------------------------> [ONGOING]
* RetryOperationTask ----------------------------> [ONGOING]
* RollbackOperationTask ----------------------------> [ONGOING]
* FailOperationTask ----------------------------> [ONGOING]
* CancelOperationTask ----------------------------> [ONGOING]
* Subscriptions ----------------------------> [ONGOING]
* IndividualSubscription ----------------------------> [ONGOING]
* NotificationEndpoint ----------------------------> [ONGOING]
- VNFLifecycleOperationGranting-API_egm
......
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