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
Container Registry
Model registry
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
NFV - Network Functions Virtualisation
api-tests
Commits
2ca647df
Commit
2ca647df
authored
6 years ago
by
mengxuan.zhao
Browse files
Options
Downloads
Patches
Plain Diff
VNF LCM MNGT update
parent
6e9403a4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SOL003/VNFLifecycleManagement-API_egm/SOL003-VNFLifecycleManagement.robot
+35
-12
35 additions, 12 deletions
...cleManagement-API_egm/SOL003-VNFLifecycleManagement.robot
SOL003/VNFLifecycleManagement-API_egm/variables.txt
+21
-0
21 additions, 0 deletions
SOL003/VNFLifecycleManagement-API_egm/variables.txt
with
56 additions
and
12 deletions
SOL003/VNFLifecycleManagement-API_egm/SOL003-VNFLifecycleManagement.robot
+
35
−
12
View file @
2ca647df
*** Settings ***
Suite setup
Expect spec
SOL003-VNFLifecycleManagement-API.yaml
Resource
../
variables.txt
Resource
variables.txt
Library
REST
http://
${VNFM_HOST}
:
${VNFM_PORT}
#Library RequestsLibrary
*** Test cases ***
Create a new vnfInstance
Log
Create VNF instance by POST to /vnflcm/v1/vnf_instances
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "application/json"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Post
/vnflcm/v1/vnf_instances
{"vnfdId": "12345","vnfInstanceName": "Test-VnfInstance", "vnfInstanceDescription": "bla"}
Log
Validate Status code
Integer
response status
200
Output
response
Integer
response status
201
Log
Status code validated
Create a new vnfInstance Bad Request
Log
Create VNF instance by POST to /vnflcm/v1/vnf_instances
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Post
/vnflcm/v1/vnf_instances
{"bad_request": "bad_example"}
Output
response
Integer
response status
400
Log
Status code validated
Get information about multiple VNF instances
[
Tags
]
get
Create a new vnfInstance Unauthorized
Log
Create VNF instance by POST to /vnflcm/v1/vnf_instances
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${WRONG_AUTHORIZATION}
"}
Post
/vnflcm/v1/vnf_instances
{"vnfdId": "12345","vnfInstanceName": "Test-VnfInstance", "vnfInstanceDescription": "bla"}
Output
response
Integer
response status
401
Log
Status code validated
Get information about multiple VNF instances
Log
Query VNF The GET method queries information about multiple VNF instances.
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
application/json
"}
Set Headers
{"Authorization":
"
${AUTHORIZATION
_TOKEN
}
"}
Log
Execute Query and validate
against online spec
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Log
Execute Query and validate
response
Get
/vnflcm/v1/vnf_instances
Output
response
Log
Validate Status code
Integer
response status
200
Log
Execute Query and validate against online spec
GET
${apiRoot}
/vnflcm/v1/vnf_instances?fields=wrong_field
GET
/vnflcm/v1/vnf_instances?fields=wrong_field
Log
Validate Status code
Integer
response status
400
*** Keywords ***
This diff is collapsed.
Click to expand it.
SOL003/VNFLifecycleManagement-API_egm/variables.txt
0 → 100644
+
21
−
0
View file @
2ca647df
*** Variables ***
${VNFM_HOST} localhost # Hostname of the VNFM
${VNFM_PORT} 8080 # Listening port of the VNFM
${NFVO_HOST} localhost # Hostname of the NFVO
${NFVO_PORT} 8081 # Listening port of the NFVO
${VNFM_SCHEMA} https
${NFVO_SCHEMA} https
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE} application/json
${ACCEPT} application/json
${apiRoot} /
${AUTH_USAGE} 1
${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
${vnfPkgId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT
${ACCEPT_PLAIN} text/plain
${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
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