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

Update LCM

parent 3a19f5f0
No related branches found
No related tags found
No related merge requests found
*** Settings ***
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
......@@ -7,13 +8,9 @@ Library OperatingSystem
Library BuiltIn
Library Collections
Library JSONLibrary
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
*** variables ***
${LccnSubscriptions}
${scaleInfo}
${element}
${aspectId}
*** Test Cases ***
Scale out a VnFInstance
......@@ -26,11 +23,10 @@ Scale out a VnFInstance
... Applicability: Scale operation is supported for the VNF (as capability in the VNFD)
... NFVO is not subscribed for
... Post-Conditions: VNF instance still in INSTANTIATED state and VNF was scaled
Precondition Checks
${response} ${aspectId}= Send VNFScaleOut request ${vnfInstanceId}
Check Response Status 202 ${response.status}
Check HTTP Response Header Contains Location ${response.headers}
${vnfLcmOpOccId}= Get VnfLcmOpOccId ${response.headers}
Send VNFScaleOut request ${vnfInstanceId}
Check Response Status Is 202
Check Scale HTTP Response Header Contains Location
${vnfLcmOpOccId}= Get VnfLcmOpOccId ${scaleOutResponse.headers}
Check Operation Notification STARTING ${notification_ep} ${vnfLcmOpOccId}
Create a new Grant - Sync - Scale
Check Operation Notification PROCESSING ${notification_ep} ${vnfLcmOpOccId}
......@@ -39,6 +35,9 @@ Scale out a VnFInstance
*** Keywords ***
Initialize System
${scaleInfo}= Get Vnf Scale Info ${vnfInstanceId}
Precondition Checks
Check resource instantiated
${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE
......@@ -64,4 +63,12 @@ Compare ScaleInfos
Create a new Grant - Sync - Scale
Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} SCALE
Check Response Status Is
[Arguments] ${expected_status}
Check Response Status ${expected_status} ${scaleOutResponse.status}
Check Scale HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE}
Check HTTP Response Header Contains ${scaleOutResponse.headers} ${CONTENT_TYPE}
\ No newline at end of file
*** Settings ***
Resource environment/variables.txt
Resource environment/scaleVariables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} spec=SOL003-VNFLifecycleManagement-API.yaml
Library OperatingSystem
Library BuiltIn
......@@ -18,7 +19,7 @@ Get Vnf Instance
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
${body}= Output response body
${json}= evaluate json.loads('''${body}''') json
[Return] ${json} ${body.aspectId}
[Return] ${json}
Check resource Instantiated
Set Headers {"Accept":"${ACCEPT}"}
......@@ -40,7 +41,7 @@ Check Response Status
Log Status code validated
Check HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE} ${headers}
[Arguments] ${headers} ${CONTENT_TYPE}
Should Contain ${headers} ${CONTENT_TYPE}
Log Header is present
......@@ -50,9 +51,11 @@ Send VNFscaleOut Request
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File json/scaleVnfOutRequest.json
${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body}
[Return] ${response}
${body}= Get File json/scaleVnfOutRequest.json
${json}= evaluate json.loads('''${body}''') json
${aspectId}= Set Variable ${json.aspectId}
${scaleOutResponse}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body}
[Return] ${scaleOutResponse}
Get VnfLcmOpOccId
[Arguments] ${headers}
......
*** variables ***
${LccnSubscriptions}
${scaleInfo}
${element}
${aspectId}
${scaleOutResponse}
${vnfLcmOpOccId}
\ No newline at end of file
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