Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NFV - Network Functions Virtualisation
api-tests
Commits
01a6bea9
Commit
01a6bea9
authored
Dec 11, 2020
by
Elian Kraja
Browse files
Fix issue
#71
parent
0d00a9b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot
View file @
01a6bea9
...
...
@@ -17,7 +17,7 @@ POST Scale a vnfInstance
...
Config ID: Config_prod_VE
...
Applicability: none
...
Post-Conditions: none
POST Scale vnfInstance
POST Scale vnfInstance
0
Check HTTP Response Status Code Is
202
Check Operation Occurrence Id
...
...
@@ -30,7 +30,7 @@ POST Scale a vnfInstance Conflict (Not-Instantiated)
...
Config ID: Config_prod_VE
...
Applicability: none
...
Post-Conditions: none
POST Scale vnfInstance
POST Scale vnfInstance
1
Check HTTP Response Status Code Is
409
Check HTTP Response Body Json Schema Is
ProblemDetails
...
...
@@ -43,7 +43,7 @@ POST Scale a vnfInstance Not Found
...
Config ID: Config_prod_VE
...
Applicability: none
...
Post-Conditions: none
POST Scale vnfInstance
POST Scale vnfInstance
2
Check HTTP Response Status Code Is
404
Check HTTP Response Body Json Schema Is
ProblemDetails
...
...
SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot
View file @
01a6bea9
...
...
@@ -252,16 +252,38 @@ DELETE instantiate individual vnfInstance
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
POST Scale vnfInstance
POST Scale vnfInstance
[
Arguments
]
${vnf_state}
[
Documentation
]
${vnf_state}
differentiate the VNF ID to be used in the different POST requests
...
${vnf_state}
=
= 0 -> VNF in instantiated state
...
${vnf_state}
=
= 1 -> VNF in not_instantiated state
...
${vnf_state}
=
= 2 -> VNF ID not stored
...
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}
"}
${template}
=
Get File
jsons/scaleVnfRequest.json
${body}
=
Format String
${template}
scaleVnfRequesttype=
${scaleVnfRequesttype}
scaleVnfRequestAspect=
${scaleVnfRequestAspect}
${body}
=
Get File
jsons/scaleVnfRequest.json
Run Keyword If
${vnf_state}
=
= 0
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/vnf_instances/
${instantiatedVnfInstanceId}
/scale
${body}
Run Keyword If
${vnf_state}
=
= 1
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/vnf_instances/
${notInstantiatedVnfInstanceId}
/scale
${body}
Run Keyword If
${vnf_state}
=
= 2
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/vnf_instances/
${NOT_EXISTANT_VNF_INSTANCE_ID}
/scale
${body}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/vnf_instances/
${vnfInstanceId}
/scale
${body}
${outputResponse}
=
Output
response
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/vnf_instances/
${vnfInstanceId}
/scale
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
# POST Scale vnfInstance
# 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}"}
# ${template}= Get File jsons/scaleVnfRequest.json
# ${body}= Format String ${template} scaleVnfRequesttype=${scaleVnfRequesttype} scaleVnfRequestAspect=${scaleVnfRequestAspect}
# Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body}
# ${outputResponse}= Output response
# Set Global Variable ${response} ${outputResponse}
GET Scale vnfInstance
Log
Trying to get a scale a vnf Instance
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
SOL002/VNFLifecycleManagement-API/environment/variables.txt
View file @
01a6bea9
...
...
@@ -38,7 +38,8 @@ ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${VnfLcmOperationOccurrenceNotification} {}
${VnfIdentifierCreationNotification} {}
${VnfIdentifierDeletionNotification} {}
${notInstantiatedVnfInstanceId} NOT_INSTANTIATED_VNF_INSTANCE_ID
${NOT_EXISTANT_VNF_INSTANCE_ID} NOT_EXISTANT_VNF_INSTANCE_ID
${SYNC_MODE} 0
${callback_uri} http://localhost
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment