Newer
Older
Set Suite Variable ${response} ${output}
GET individual VNF Package Subscription with invalid resource identifier
Log Trying to perform a request on a subscriptionID which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send Delete request for individual VNF Package Subscription
Log Trying to perform a DELETE on a subscriptionId
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition VNF Package Subscription is Deleted
Log Check Postcondition Subscription is deleted
GET individual VNF Package Subscription
Check HTTP Response Status Code Is 404
Send Delete request for individual VNF Package Subscription with invalid resource identifier
Log Trying to perform a DELETE on a subscriptionId which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send Post request for individual VNF Package Subscription
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId}
Set Suite Variable ${response} ${output}
Send Put request for individual VNF Package Subscription
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
${origOutput}= Output response
Set Suite Variable ${origResponse} ${origOutput}
REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Set Suite Variable ${response} ${output}
Send Patch request for individual VNF Package Subscription
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
${origOutput}= Output response
Set Suite Variable ${origResponse} ${origOutput}
REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Set Suite Variable ${response} ${output}
Check Postcondition VNF Package Subscription is Unmodified (Implicit)
Log Check postconidtion subscription not modified
GET individual VNF Package Subscription
Log Check Response matches original VNF Threshold
${subscription}= evaluate json.loads('''${response['body']}''') json
Should Be Equal ${origResponse['body']['id']} ${subscription.id}
Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri}
Check Postcondition VNF Package Subscription is not Created
Log Trying to get a new subscription
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId}
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 404
Elian Kraja
committed
Create Sessions
Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance
Wait For Process handle=mockInstance timeout=5s on_timeout=continue
Create Mock Session ${callback_uri}:${callback_port}
Check HTTP Response Status Code Is
Should Be Equal As Strings ${response['status']} ${expected_status}
Elian Kraja
committed
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json
... ELSE Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate SEPARATOR= ${input} .schema.json
Elian Kraja
committed
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
Log Check Response includes VNF Package Management according to filter
Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1]
Elian Kraja
committed
Check HTTP Response Body Subscription Identifier matches the requested Subscription
Log Trying to check response ID
Should Be Equal ${response['body']['id']} ${subscriptionId}
Log Subscription identifier as expected
Elian Kraja
committed
Check HTTP Response Body PkgmSubscription content against VNF Descriptor
#${check_descriptors} flag, 1 to check descriptors
Run Keyword If ${check_descriptors} == 1 Check Individual PkgmSubscription Content
zafar
committed
Check Individual PkgmSubscription Content
PARSE the Descriptor File
Match the Response Attributes of PkgmSubscription with Descriptors
zafar
committed
Match the Response Attributes of PkgmSubscription with Descriptors
Should Be Equal As Strings ${response['body']['filter']['vnfdId']} ${Descriptor_ID}
Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders']['vnfProvider']} ${Provider}
Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['vnfProductName']} ${Product_Name}
Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['vnfProductName']['versions']['vnfSoftwareVersion']} ${Software_Version}
Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['vnfProductName']['versions']['vnfdVersion']} ${Descriptor_Version}
Elian Kraja
committed
Check Notification Endpoint
&{notification_request}= Create Mock Request Matcher REST.GET ${callback_endpoint}
&{headers} = Create Dictionary Content-Type=application/json
&{notification_response}= Create Mock Response headers=${headers} status_code=204
Elian Kraja
committed
Create Mock Expectation ${notification_request} ${notification_response}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Check HTTP Response Body Matches the Subscription
Log Check Response matches subscription
${template}= Get File jsons/subscriptions.json
${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId}
Elian Kraja
committed
${subscription}= evaluate json.loads('''${body}''') json
Should Be Equal As Strings ${response['body']['callbackUri']} ${subscription['callbackUri']}
Elian Kraja
committed
Check HTTP Response Body Is Empty
Should Be Empty ${response['body']}
Log No json schema is provided. Validation OK
Check HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE}
Should Contain ${response['headers']} ${CONTENT_TYPE}
Giacomo Bernini
committed
Log Header is present
${linkURL}= Get Value From Json ${response['headers']} $..Link
Giacomo Bernini
committed
Should Not Be Empty ${linkURL}
Get access configuration information for external artifacts
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request to access configuration information for external artifacts
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/ExternalArtifactsAccessConfig.json
REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition individual VNF Package is created
GET Individual VNF Package
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is vnfPkgInfo
Should Be True '${response['body']['id']}' =='CREATED' or '${response['body']['id']}'=='ERROR'
Send POST Request for access configuration for external artifacts
Log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for access configuration for external artifacts
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for Access configuration for external artifacts
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access
${output}= Output response
Set Suite Variable ${response} ${output}
Get Manifest in Individual VNF Package in plainFormat
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest
${output}= Output response
Set Suite Variable ${response} ${output}
Get Manifest in Individual VNF Package with security information
Log Trying to get a manifest from a given VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest/include_signatures
${output}= Output response
Set Suite Variable ${response} ${output}
Get Manifest in Individual VNF Package with unacceptable request
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest/include_signatures
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for manifest in individual VNF Package
Log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for manifest in individual VNF Package
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for manifest in individual VNF Package
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for manifest in individual VNF Package
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package
Log Trying to get Artifact in VNF Package
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with exclude_all_mano_artifacts parameter
Log Trying to get Artifact in VNF Package with exclude_all_mano_artifacts
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/?exclude_all_mano_artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with exclude_all_non_mano_artifacts parameter
Log Trying to get Artifact in VNF Package with security certificates
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/?exclude_all_non_mano_artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with include_external_artifacts parameter
Log Trying to get Artifact in VNF Package with security certificates
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/?include_external_artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with select_non_mano_artifact_sets parameter
Log Trying to get Artifact in VNF Package with security certificates
Pass Execution If ${NFVO_non-MANO_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/?select_non_mano_artifact_sets=${non_mano_artifact_sets}
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with include_signatures parameter
Log Trying to get Artifact in VNF Package with security certificates
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/?include_signatures
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with Range Request
Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts
Unset Headers ["Range"]
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets
Log Trying to get Artifact in VNF Package
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts&select_non_mano_artifact_sets=${non_mano_artifact_sets}
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts
Log Trying to get Artifact in VNF Package
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts&exclude_all_non_mano_artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
GET Artifact of VNF Package in onboarding state different from ONBOARDED
Log Trying to get a VNF Package artifact present in the NFVO Catalogue, but not in ONBOARDED operationalStatus
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
GET VNF Package Artifact with invalid Range Request
Log Trying to get a range of bytes of the limit of the VNF Package
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts
Unset Headers ["Range"]
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for VNF Package Artifact
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for VNF Package Artifact
Log Trying to perform a PUT (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for VNF Package Artifact
Log Trying to perform a PATCH (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for VNF Package Artifact
Log Trying to perform a DELETE (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts
Set Suite Variable ${response} ${output}