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
d03f349e
Commit
d03f349e
authored
5 years ago
by
Giacomo Bernini
Browse files
Options
Downloads
Patches
Plain Diff
removed old file
parent
a969c4ac
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/VnfInstancesWithChecks.robot
+0
-64
0 additions, 64 deletions
...3/VNFLifecycleManagement-API/VnfInstancesWithChecks.robot
with
0 additions
and
64 deletions
SOL003/VNFLifecycleManagement-API/VnfInstancesWithChecks.robot
deleted
100644 → 0
+
0
−
64
View file @
a969c4ac
*** Setting ***
Resource
environment/configuration.txt
Resource
environment/variables.txt
Library
OperatingSystem
Library
BuiltIn
Library
Collections
Library
String
Library
JSONSchemaLibrary
schemas/
Library
JSONLibrary
Library
REST
${VNFM_SCHEMA}
://
${VNFM_HOST}
:
${VNFM_PORT}
*** Test Cases ***
Create VNFInstantiation
${post_response}
=
Instantiate VNF
Validate Status Code
${post_response.status_code}
201
Validate Header
${post_response.headers}
Location
Validate Header
${post_response.headers}
Content-Type
Validate JsonSchema
${post_response.body}
vnfInstance.schema.json
${get_response}
=
Retrieve VNFinstance
${post_response.body.id}
Should Not Be Empty
${get_response}
Validate Status Code
${get_response.status_code}
200
Should Be Equal
${post_response.body.id}
${get_response.body.id}
Validate Header
${get_response.headers}
Content-Type
Validate JsonSchema
${get_response.body}
vnfInstance.schema.json
*** Keywords ***
Instantiate VNF
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
jsons/createVnfRequest.json
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances
${body}
[
Return
]
response
Validate Status Code
[
Arguments
]
${curr_status}
${exp_status}
Should Be Equal
${curr_status}
${exp_status}
Log
Status code validated
Validate Header
[
Arguments
]
${headers}
${CONTENT_TYPE}
Should Contain
${headers}
${CONTENT_TYPE}
Log
Header is present
Validate JsonSchema
[
Arguments
]
${body}
${schema}
${json}
=
evaluate
json.loads('''
${body}
''')
json
Validate Json
${schema}
${json}
Log
Validation OK
Retrieve VNFinstance
[
Arguments
]
${vnfId}
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances/
${vnfId}
[
Return
]
response
\ 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