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
4ef10a07
Commit
4ef10a07
authored
Dec 12, 2018
by
Giacomo Bernini
Browse files
updated HL code example
parent
d1eb274c
Changes
1
Hide whitespace changes
Inline
Side-by-side
SOL003/VNFLifecycleManagement-API_egm/InstantiateVNFTaskWithCheckAndNotifications.robot
View file @
4ef10a07
...
@@ -22,24 +22,24 @@ ${vnfInstanceId}
...
@@ -22,24 +22,24 @@ ${vnfInstanceId}
*** Test Cases ***
*** Test Cases ***
VNF Instantiation
VNF Instantiation
[Documentation]
Test ID: 5.x.y.x
...
Test title: VNF Instantiation
...
Test objective: The objective is to test the instantiation of a VNF instance
...
Pre-conditions: VNF instance resources is created (Test ID: 5.a.b.c)
...
Reference: section 5.x.y - SOL003 v2.4.1
...
Config ID: Config_prod_VNFM
...
Applicability: VNFM is in direct mode
...
Post-Conditions: VNF instance in INSTANTIATED state
Send VNF Instantiation Request
Send VNF Instantiation Request
Check HTTP Response Status Code Is
202
Check HTTP Response Status Code Is
202
Check HTTP Response Header Contains
Location
Check HTTP Response Header Contains
Location
Check Operation Occurrence Id
Check Operation Occurrence Id
Check Operation Notification STARTING
Check Operation Notification
STARTING
Check Operation Notification PROCESSING
Check Operation Notification
PROCESSING
Check Operation Notification COMPLETED
Check Operation Notification
COMPLETED
Check Postcondition
Check Postcondition
*** Keywords ***
*** Keywords ***
Create VNF Resource
Log
Create VNF instance by POST to
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${body}
=
Get File
json/createVnfRequest.json
${response}
=
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances
${body}
Send VNF Instantiation Request
Send VNF Instantiation Request
Log
Instantiate a VNF Instance
Log
Instantiate a VNF Instance
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Accept":"
${ACCEPT}
"}
...
@@ -108,6 +108,14 @@ Verify Notification COMPLETED
...
@@ -108,6 +108,14 @@ Verify Notification COMPLETED
[
Arguments
]
${status}
[
Arguments
]
${status}
Verify Mock Expectation
${notification_request}
Verify Mock Expectation
${notification_request}
Create VNF Resource
Log
Create VNF instance by POST to
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${body}
=
Get File
json/createVnfRequest.json
${response}
=
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances
${body}
Initialize System
Initialize System
Create Sessions
Create Sessions
Configure Notification Handler
VnfIdentifierCreationNotification
${callback_endpoint}
Configure Notification Handler
VnfIdentifierCreationNotification
${callback_endpoint}
...
@@ -125,4 +133,4 @@ Check Postcondition
...
@@ -125,4 +133,4 @@ Check Postcondition
Should Be Equal
${response.body.id}
${vnfInstanceId}
Should Be Equal
${response.body.id}
${vnfInstanceId}
Check HTTP Response Header Contains
Content-Type
Check HTTP Response Header Contains
Content-Type
Check HTTP Response Json Schema
${response.body}
vnfInstance.schema.json
Check HTTP Response Json Schema
${response.body}
vnfInstance.schema.json
Check VNF Status
${response.body.instantiationState}
INSTANTIATED
Check VNF Status
${response.body.instantiationState}
INSTANTIATED
\ No newline at end of file
\ No newline at end of file
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