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
05f54e24
Commit
05f54e24
authored
Dec 24, 2018
by
Giacomo Bernini
Browse files
fixes
parent
433833ce
Changes
9
Hide whitespace changes
Inline
Side-by-side
SOL002/VNFPerformanceManagement-API/PMJobs.robot
View file @
05f54e24
...
...
@@ -85,7 +85,7 @@ GET all Pm Jobs - exclude_default
GET all Pm Jobs - fields
Log
Trying to get all VNF Packages present in the VNFM, using filter params
Pass Execution If
${FIELD
S
_USAGE}
=
= 0
Skipping test as VNFM is not supporting 'fields'
Pass Execution If
${FIELD_USAGE}
=
= 0
Skipping test as VNFM is not supporting 'fields'
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${VNFM_AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${VNFM_AUTHENTICATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/pm_jobs?fields=
${fields}
...
...
@@ -108,7 +108,7 @@ GET all Pm Jobs - fields
GET all Pm Jobs - exclude_fields
Log
Trying to get all VNF Packages present in the VNFM, using filter params
Pass Execution If
${FIELD
S
_USAGE}
=
= 0
Skipping test as VNFM is not supporting 'fields'
Pass Execution If
${FIELD_USAGE}
=
= 0
Skipping test as VNFM is not supporting 'fields'
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${VNFM_AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${VNFM_AUTHENTICATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/pm_jobs?fields=
${fields}
...
...
SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot
View file @
05f54e24
*** Settings ***
Resource
variables.txt
Resource
environment/
variables.txt
Suite Setup
Create Sessions
Suite Teardown
Terminate All Processes
kill=true
Library
MockServerLibrary
...
...
SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWithCheckAndNotifications.robot
View file @
05f54e24
...
...
@@ -66,7 +66,7 @@ Check HTTP Response Body Json Schema Is
[
Arguments
]
${schema}
${json}
=
evaluate
json.loads('''
${response.body}
''')
json
Validate Json
${schema}
${json}
${vnfInstanceId}
=
${response.body.id}
${vnfInstanceId}
=
evaluate
${response.body.id}
Log
Json Schema Validation OK
Check VNF Status
...
...
@@ -104,7 +104,7 @@ Check Operation Notification
Should Be Equal
${body.operationState}
${status}
Clear Requests
${callback_endpoint}
Verify Notification
COMPLETED
Verify Notification
[
Arguments
]
${status}
Verify Mock Expectation
${notification_request}
...
...
@@ -122,15 +122,15 @@ Initialize System
Create VNF Resource
Check HTTP Response Status Code Is
201
Check HTTP Response Header Contains
Location
Check HTTP Response Header Contains
${response.headers}
Content-Type
Check HTTP Response Header Contains
Content-Type
Check HTTP Response Body Json Schema Is
vnfInstance.schema.json
Check Postcondition
Log
Retrieve VNF Instance
Check VNF Instance
${vnfInstanceId}
Should Not Be Empty
${response}
Check HTTP Status Code Is
200
Check HTTP
Response
Status Code Is
200
Should Be Equal
${response.body.id}
${vnfInstanceId}
Check HTTP Response Header Contains
Content-Type
Check HTTP Response Json Schema
${response.body}
vnfInstance.schema.json
Check HTTP Response
Body
Json Schema
Is
vnfInstance.schema.json
Check VNF Status
${response.body.instantiationState}
INSTANTIATED
\ No newline at end of file
SOL003/VNFLifecycleManagement-API/environment/variables.txt
View file @
05f54e24
...
...
@@ -41,4 +41,9 @@ ${sleep_interval} 20s
${GRANT_POLLING_TOT} 2
${GRANT_POLLING_INTERVAL} 5s
${SCALE_POLLING_TOT} 10
${SCALE_POLLING_INTERVAL} 15s
\ No newline at end of file
${SCALE_POLLING_INTERVAL} 15s
${callback_uri} http://localhost
${callback_port} 9091
${callback_endpoint} /endpoint
${callback_endpoint_error} /endpoint_404
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar
\ No newline at end of file
SOL003/VNFLifecycleOperationGranting-API/Grants.robot
View file @
05f54e24
*** Settings ***
Resource
environmentvariables.txt
Resource
environment
/
variables.txt
Library
REST
http://
${NFVO_HOST}
:
${NFVO_PORT}
...
spec=SOL003-VNFLifecycleOperationGranting-API.yaml
Library
OperatingSystem
...
...
SOL003/VNFPackageManagement-API/VNFPackages.robot
View file @
05f54e24
...
...
@@ -49,7 +49,7 @@ GET all Packages - Filter
GET all Packages - Negative (wronge filter name)
Log
Trying to perform a negative get, filtering by the inexistent field 'nfvId'
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
${AUTHORIZATION}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_packages?
${NEG_FIELDS}
Integer
response status
400
Log
Received 400 Bad Request as expected
...
...
SOL003/VNFPackageManagement-API/environment/generic.txt
View file @
05f54e24
...
...
@@ -16,3 +16,4 @@ ${apiName} vnfpkgm
${FIELD_USAGE} 1
${NFVO_PLAIN} 1
${NFVO_FIELDS} 1
${vnfPackageId} 788106a2-d692-44f3-a86d-384f0ce35e42
SOL003/VNFPerformanceManagement-API/PMJobs.robot
View file @
05f54e24
...
...
@@ -86,7 +86,7 @@ GET all Pm Jobs - exclude_default
GET all Pm Jobs - fields
Log
Trying to get all VNF Packages present in the VNFM, using filter params
Pass Execution If
${FIELD
S
_USAGE}
=
= 0
Skipping test as VNFM is not supporting 'fields'
Pass Execution If
${FIELD_USAGE}
=
= 0
Skipping test as VNFM is not supporting 'fields'
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${VNFM_AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${VNFM_AUTHENTICATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/pm_jobs?fields=
${fields}
...
...
@@ -109,7 +109,7 @@ GET all Pm Jobs - fields
GET all Pm Jobs - exclude_fields
Log
Trying to get all VNF Packages present in the VNFM, using filter params
Pass Execution If
${FIELD
S
_USAGE}
=
= 0
Skipping test as VNFM is not supporting 'fields'
Pass Execution If
${FIELD_USAGE}
=
= 0
Skipping test as VNFM is not supporting 'fields'
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${VNFM_AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${VNFM_AUTHENTICATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/pm_jobs?fields=
${fields}
...
...
SOL003/VNFPerformanceManagement-API/PMJobsWithChecks.robot
View file @
05f54e24
*** Setting ***
Resource
variables.txt
Resource
environment/pmJobs.txt
Resource
environment/generic.txt
Library
OperatingSystem
Library
BuiltIn
Library
Collections
...
...
@@ -28,7 +29,7 @@ Create PMJob
Create PMJob
Log
Creating a new PM Job
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE
_JSON
}
"}
Run Keyword If
${VNFM_AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${VNFM_AUTHENTICATION}
"}
${body}
=
Get File
jsons/CreatePmJobRequest.json
POST
${apiRoot}
/
${apiName}
/
${apiVersion}
/pm_jobs
${body}
...
...
@@ -55,8 +56,8 @@ Validate JsonSchema
Retrieve PMJob
[
Arguments
]
${pmJobId}
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Set Headers
{"Accept":"
${ACCEPT
_JSON
}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE
_JSON
}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances/
${pmJobId}
[
Return
]
response
...
...
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