Commit 05f54e24 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

fixes

parent 433833ce
......@@ -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 ${FIELDS_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 ${FIELDS_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}
......
*** Settings ***
Resource variables.txt
Resource environment/variables.txt
Suite Setup Create Sessions
Suite Teardown Terminate All Processes kill=true
Library MockServerLibrary
......
......@@ -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
......@@ -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
*** Settings ***
Resource environmentvariables.txt
Resource environment/variables.txt
Library REST http://${NFVO_HOST}:${NFVO_PORT}
... spec=SOL003-VNFLifecycleOperationGranting-API.yaml
Library OperatingSystem
......
......@@ -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
......
......@@ -16,3 +16,4 @@ ${apiName} vnfpkgm
${FIELD_USAGE} 1
${NFVO_PLAIN} 1
${NFVO_FIELDS} 1
${vnfPackageId} 788106a2-d692-44f3-a86d-384f0ce35e42
......@@ -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 ${FIELDS_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 ${FIELDS_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}
......
*** 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment