Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
api-tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Miguel Angel Reina Ortega
api-tests
Commits
dd8fc108
Commit
dd8fc108
authored
6 years ago
by
mengxuan.zhao
Browse files
Options
Downloads
Patches
Plain Diff
LCM scale high level keywords
parent
e66ace92
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SOL003/VNFLifecycleManagement-API_egm/ScaleVNFTaskHighLevel.robot
+65
-0
65 additions, 0 deletions
...NFLifecycleManagement-API_egm/ScaleVNFTaskHighLevel.robot
with
65 additions
and
0 deletions
SOL003/VNFLifecycleManagement-API_egm/ScaleVNFTaskHighLevel.robot
0 → 100644
+
65
−
0
View file @
dd8fc108
*** Settings ***
Resource
variables.txt
Library
REST
http://
${VNFM_HOST}
:
${VNFM_PORT}
spec=SOL003-VNFLifecycleManagement-API.yaml
Library
OperatingSystem
Library
BuiltIn
Library
JSONLibrary
*** Variables ***
${GRANT_POLLING_TOT}
2
${GRANT_POLLING_INTERVAL}
5s
${SCALE_POLLING_TOT}
10
${SCALE_POLLING_INTERVAL}
15s
*** Test Cases ***
Scale Out a vnfInstance
[
Documentation
]
Test ID: 5.x.y.x
...
Test title: Scale out VNF operation
...
Test objective: The objective is to test a scale out of an existing VNF instance
...
Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.a.b.c)
...
Reference: section 5.4.5 - SOL003 v2.4.1
...
Config ID: Config_prod_VNFM
...
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
${headers}
=
Send VNFScaleOut request
Check Response Status
202
${headers}
${vnfLcmOpOccId}
=
Get VnfLcmOpOccId
${headers}
Check Operation Status Transition
${vnfLcmOpOccId}
STARTING
PROCESSING
${GRANT_POLLING_TOT}
${GRANT_POLLING_INTERVAL}
Check Operation Status Transition
${vnfLcmOpOccId}
PROCESSING
COMPLETED
${SCALE_POLLING_TOT}
${SCALE_POLLING_INTERVAL}
*** Keywords ***
Check Response Status
[
Arguments
]
${expected_status}
${headers}
${status}
=
Get Value From Json
${headers}
$..status
Should Be Equal
${expected_status}
${status}
Send VNFscaleOut Request
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}
"}
${body}
=
Get File
json/scaleVnfOutRequest.json
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances/
${vnfInstanceId}
/scale
${body}
${headers}
=
Output
response headers
${json}
=
evaluate
json.loads('''
${headers}
''')
json
[
Return
]
${json}
Get VnfLcmOpOccId
[
Arguments
]
${headers}
${vnfLcmOpOccId}
=
Get Value From Json
${headers}
$..Location
Should Not Be Empty
${vnfLcmOpOccId}
[
Return
]
${vnfLcmOpOccId}
Check Operation Status Transition
[
Arguments
]
${vnfLcmOpOccId}
${initial_status}
${final_status}
${POLLING_TOT}
${POLLING_INTERVAL}
${INDEX}
=
1
: FOR
${INDEX}
IN RANGE
1
${POLLING_TOT}
\
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/
${vnfLcmOpOccId}
\
Check Response Status
200
response code
\
${body}
=
Output
response body
\
${json}
=
evaluate
json.loads('''
${body}
''')
json
\
${operationState}
=
Get Value From Json
${json}
$..operationState
\
Run Keyword If
Should Not Be Equal
${initial_status}
${operationState}
Exit For Loop
\
Sleep
${POLLING_INTERVAL}
Should Be Equal
${final_status}
${operationState}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment