Skip to content
Snippets Groups Projects
Commit f9e60421 authored by AHMADABB's avatar AHMADABB
Browse files
parents e823155a 93a423f3
No related branches found
No related tags found
No related merge requests found
Showing
with 670 additions and 360 deletions
...@@ -76,7 +76,7 @@ Create new VNF Performance subscription ...@@ -76,7 +76,7 @@ Create new VNF Performance subscription
Send Post Request for VNF Performance Subscription Send Post Request for VNF Performance Subscription
Check HTTP Response Status Code Is 201 Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Matches the Subscription Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Check Postcondition VNF Performance Subscription Is Set Check Postcondition VNF Performance Subscription Is Set
...@@ -109,7 +109,7 @@ Create duplicated VNF Performance subscription with VNFM creating duplicated sub ...@@ -109,7 +109,7 @@ Create duplicated VNF Performance subscription with VNFM creating duplicated sub
Send Post Request for Duplicated VNF Performance Subscription Send Post Request for Duplicated VNF Performance Subscription
Check HTTP Response Status Code Is 201 Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Matches the Subscription Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Check Postcondition VNF Performance Subscription Is Set Check Postcondition VNF Performance Subscription Is Set
PUT VNF Performance Subscriptions - Method not implemented PUT VNF Performance Subscriptions - Method not implemented
......
...@@ -286,7 +286,7 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte ...@@ -286,7 +286,7 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte
# Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri} # Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri}
#TODO #TODO
Check HTTP Response Body Matches the Subscription Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Log Check Response matches subscription Log Check Response matches subscription
${body}= Get File jsons/subscriptions.json ${body}= Get File jsons/subscriptions.json
${subscription}= evaluate json.loads('''${body}''') json ${subscription}= evaluate json.loads('''${body}''') json
......
...@@ -2,65 +2,82 @@ ...@@ -2,65 +2,82 @@
Library JSONSchemaLibrary schemas/ Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters Resource environment/variables.txt # Generic Parameters
Resource environment/individualVnfPackage.txt Resource environment/individualVnfPackage.txt
Resource VNFPackageManagementKeywords.robot
Library JSONLibrary Library JSONLibrary
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
*** Test Cases *** *** Test Cases ***
GET Individual VNF Package GET Individual VNF Package
Log Trying to get a VNF Package present in the NFVO Catalogue [Documentation] Test ID: 7.3.3.2.1
Set Headers {"Accept": "${ACCEPT_JSON}"} ... Test title: GET Individual VNF Package
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test the retrieval of an individual VNF package information perform a JSON schema validation of the collected data structure
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId} ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Integer response status 200 ... Reference: section 10.4.3.3.2 - SOL003 v2.4.1
${contentType}= Output response headers Content-Type ... Config ID: Config_prod_NFVO
Should Contain ${contentType} ${CONTENT_TYPE_JSON} ... Applicability: none
Log Trying to validate response ... Post-Conditions: none
${vnfPkgInfo}= Output response body GET Individual VNF Package
Validate Json vnfPkgInfo.schema.json ${vnfPkgInfo} Check HTTP Response Status Code Is 200
Log Validation OK Check HTTP Response Body Json Schema Is vnfPkgInfo
Check HTTP Response Body vnfPkgInfo Identifier matches the requested VNF Package
GET Individual VNF Package - Negative (Not Found) GET Individual VNF Package with invalid resource identifier
Log Trying to perform a negative get, using wrong authorization bearer [Documentation] Test ID: 7.3.3.2.2
Set Headers {"Accept": "${ACCEPT_JSON}"} ... Test title: GET Individual VNF Package with invalid resource identifier
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test that the retrieval of an individual VNF package fails when using an invalid resource identifier
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPackageId} ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Integer response status 404 ... Reference: section 10.4.3.3.2 - SOL003 v2.4.1
Log Received 404 Not Found as expected ... Config ID: Config_prod_NFVO
${contentType}= Output response headers Content-Type ... Applicability: none
Should Contain ${contentType} ${CONTENT_TYPE_JSON} ... Post-Conditions: none
Log Trying to validate ProblemDetails GET Individual VNF Package with invalid resource identifier
${problemDetails}= Output response body Check HTTP Response Status Code Is 404
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
POST Individual VNF Package - (Method not implemented) POST Individual VNF Package - Method not implemented
Log Trying to perform a POST (method should not be implemented) [Documentation] Test ID: 7.3.3.2.3
Set Headers {"Accept": "${ACCEPT_JSON}"} ... Test title: POST Individual VNF Package - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test that POST method is not allowed to create new VNF Package
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId} ... Pre-conditions: none
Integer response status 405 ... Reference: section 10.4.3.3.1 - SOL003 v2.4.1
Log Received 405 Method not implemented as expected ... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send POST Request for individual VNF Package
Check HTTP Response Status Code Is 405
PUT Individual VNF Package - (Method not implemented) PUT Individual VNF Package - Method not implemented
Log Trying to perform a PUT. This method should not be implemented [Documentation] Test ID: 7.3.3.2.4
Set Headers {"Accept": "${ACCEPT_JSON}"} ... Test title: PUT Individual VNF Package - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId} ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Integer response status 405 ... Reference: section 10.4.3.3.3 - SOL003 v2.4.1
Log Received 405 Method not implemented as expected ... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send PUT Request for individual VNF Package
Check HTTP Response Status Code Is 405
PATCH Individual VNF Package - (Method not implemented) PATCH Individual VNF Package - Method not implemented
Log Trying to perform a PATCH. This method should not be implemented [Documentation] Test ID: 7.3.3.2.5
Set Headers {"Accept": "${ACCEPT_JSON}"} ... Test title: PATCH Individual VNF Package - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId} ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Integer response status 405 ... Reference: section 10.4.3.3.4 - SOL003 v2.4.1
Log Received 405 Method not implemented as expected ... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send PATCH Request for individual VNF Package
Check HTTP Response Status Code Is 405
DELETE Individual VNF Package - (Method not implemented) DELETE Individual VNF Package - Method not implemented
Log Trying to perform a DELETE. This method should not be implemented [Documentation] Test ID: 7.3.3.2.6
Set Headers {"Accept": "${ACCEPT_JSON}"} ... Test title: DELETE Individual VNF Package - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId} ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Integer response status 405 ... Reference: section 10.4.3.3.5 - SOL003 v2.4.1
Log Received 405 Method not implemented as expected ... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: The VNF Package is not deleted by the failed operation
Send DELETE Request for individual VNF Package
Check HTTP Response Status Code Is 405
Check Postcondition VNF Package Exist
\ No newline at end of file
...@@ -2,107 +2,134 @@ ...@@ -2,107 +2,134 @@
Library JSONSchemaLibrary schemas/ Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters Resource environment/variables.txt # Generic Parameters
Resource environment/vnfPackageContent.txt Resource environment/vnfPackageContent.txt
Resource VNFPackageManagementKeywords.robot
Library JSONLibrary Library JSONLibrary
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
*** Test Cases *** *** Test Cases ***
GET VNF Package Content GET Individual VNF Package Content
Log Trying to get a VNF Package Content [Documentation] Test ID: 7.3.3.3.1
Set Headers {"Accept": "${ACCEPT_ZIP}"} ... Test title: GET Individual VNF Package Content
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test the retrieval of an individual VNF package content and perform a validation that returned content is in zip format
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Integer response status 200 ... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
${contentType}= Output response headers Content-Type ... Config ID: Config_prod_NFVO
Should Contain ${contentType} ${CONTENT_TYPE_ZIP} ... Applicability: none
... Post-Conditions: none
GET Individual VNF Package Content
Check HTTP Response Status Code Is 200
Check HTTP Response Header Content-Type Is application/zip
GET VNF Package Content - Range GET Individual VNF Package Content with Range Request and NFVO supporting Range Requests
Log Trying to get a VNF Package Content using RANGE using an NFVO that can handle it [Documentation] Test ID: 7.3.3.3.2
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. ... Test title: GET Individual VNF Package Content with Range Request and NFVO supporting Range Requests
Set Headers {"Accept": "${ACCEPT_ZIP}"} ... Test objective: The objective is to test the retrieval of an individual VNF package content when using a range request to return single range of bytes from the file, with the NFVO supporting it. The test also perform a validation that returned content matches the issued range
Set Headers {"Range": "${range}"} ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content ... Config ID: Config_prod_NFVO
Integer response status 206 ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package file
Log Received 206 Partial Content as expected. ... Post-Conditions: none
${headers}= Output response headers GET Individual VNF Package Content with Range Request
Should Contain ${headers} Content-Range Check HTTP Response Status Code Is 206
Log Header Content-Range is present Check HTTP Response Header Content-Type Is application/zip
Should Contain ${headers} Content-Length Check HTTP Response Header Content-Range Is Present and Matches the requested range
Log Header Content-Length is present Check HTTP Response Header Content-Length Is Present and Matches the requested range length
GET Individual VNF Package Content with Range Request and NFVO not supporting Range Requests
[Documentation] Test ID: 7.3.3.3.3
... Test title: GET Individual VNF Package Content with Range Request and NFVO not supporting Range Requests
... Test objective: The objective is to test that the retrieval of an individual VNF package content, when using a range request to return single range of bytes from the file and the NFVO not supporting it, returns the full VNF Package file.
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO does not support range requests to return single range of bytes from the VNF package file
... Post-Conditions: none
GET Individual VNF Package Content with Range Request
Check HTTP Response Status Code Is 200
Check HTTP Response Header Content-Type Is application/zip
GET VNF Package Content - Negative Range GET Individual VNF Package Content with invalid Range Request
Log Trying to get a range of bytes of the limit of the VNF Package [Documentation] Test ID: 7.3.3.3.4
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. ... Test title: GET Individual VNF Package Content with invalid Range Request
Set Headers {"Accept": "${ACCEPT_ZIP}"} ... Test objective: The objective is to test that the retrieval of an individual VNF package content fails when using a range request that does not match any available byte range in the file.
Set Headers {"Range": "${erroneousRange}"} ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content ... Config ID: Config_prod_NFVO
Integer response status 416 ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package file
Log Received 416 Range not satisfiable as expected. ... Post-Conditions: none
${contentType}= Output response headers Content-Type GET Individual VNF Package Content with invalid Range Request
Should Contain ${contentType} ${CONTENT_TYPE_JSON} Check HTTP Response Status Code Is 416
Log Trying to validate ProblemDetails
${problemDetails}= Output response body GET Individual VNF Package Content with invalid resource identifier
Validate Json ProblemDetails.schema.json ${problemDetails} [Documentation] Test ID: 7.3.3.3.5
Log Validation OK ... Test title: GET Individual VNF Package Content with invalid resource identifier
... Test objective: The objective is to test that the retrieval of an individual VNF package content fails when using an invalid resource identifier
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Individual VNF Package Content with invalid resource identifier
Check HTTP Response Status Code Is 404
GET VNF Package Content - Negative (Not Found) GET Individual VNF Package Content with conflict due to onboarding state
Log Trying to perform a negative get, using an erroneous package ID [Documentation] Test ID: 7.3.3.3.6
Set Headers {"Accept": "${ACCEPT_ZIP}"} ... Test title: GET Individual VNF Package Content with conflict due to onboarding state
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test that the retrieval of an individual VNF package content fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/package_content ... Pre-conditions: The onboarding state of the VNF package for which the content is requested is different from ONBOARDED.
Integer response status 404 ... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
Log Received 404 Not Found as expected ... Config ID: Config_prod_NFVO
${contentType}= Output response headers Content-Type ... Applicability: none
Should Contain ${contentType} ${CONTENT_TYPE_JSON} ... Post-Conditions: none
Log Trying to validate ProblemDetails GET Content for VNF Package in onboarding state different from ONBOARDED
${problemDetails}= Output response body Check HTTP Response Status Code Is 409
Validate Json ProblemDetails.schema.json ${problemDetails} Check HTTP Response Body Json Schema Is ProblemDetails
Log Validation OK
GET VNF Package Content - Negative (onboardingState issue) POST Individual VNF Package Content - Method not implemented
Log Trying to get a VNF Package content present in the NFVO Catalogue, but not in ONBOARDED operationalStatus [Documentation] Test ID: 7.3.3.3.7
Set Headers {"Accept": "${ACCEPT_ZIP}"} ... Test title: POST Individual VNF Package Content - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test that POST method is not allowed to create new VNF Package content
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/package_content ... Pre-conditions: none
Integer response status 409 ... Reference: section 10.4.3.5.1 - SOL003 v2.4.1
Log Received 409 Conflict as expected ... Config ID: Config_prod_NFVO
${contentType}= Output response headers Content-Type ... Applicability: none
Should Contain ${contentType} ${CONTENT_TYPE_JSON} ... Post-Conditions: none
Log Trying to validate ProblemDetails Send POST Request for individual VNF Package
${problemDetails}= Output response body Check HTTP Response Status Code Is 405
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
POST VNF Package Content - (Method not implemented) PUT Individual VNF Package Content - Method not implemented
Log Trying to perform a POST (method should not be implemented) [Documentation] Test ID: 7.3.3.3.8
Set Headers {"Accept": "${ACCEPT_ZIP}"} ... Test title: PUT Individual VNF Package Content - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package content
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Integer response status 405 ... Reference: section 10.4.3.5.3 - SOL003 v2.4.1
Log Received 405 Method not implemented as expected ... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send PUT Request for individual VNF Package
Check HTTP Response Status Code Is 405
PUT VNF Package Content - (Method not implemented) PATCH Individual VNF Package Content - Method not implemented
Log Trying to perform a PUT. This method should not be implemented [Documentation] Test ID: 7.3.3.3.9
Set Headers {"Accept": "${ACCEPT_ZIP}"} ... Test title: PATCH Individual VNF Package Content - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package content
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Integer response status 405 ... Reference: section 10.4.3.5.4 - SOL003 v2.4.1
Log Received 405 Method not implemented as expected ... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send PATCH Request for individual VNF Package
Check HTTP Response Status Code Is 405
PATCH VNF Package Content - (Method not implemented) DELETE Individual VNF Package Content - Method not implemented
Log Trying to perform a PATCH. This method should not be implemented [Documentation] Test ID: 7.3.3.3.10
Set Headers {"Accept": "${ACCEPT_ZIP}"} ... Test title: DELETE Individual VNF Package Content - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package content
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content ... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
Integer response status 405 ... Reference: section 10.4.3.5.5 - SOL003 v2.4.1
Log Received 405 Method not implemented as expected ... Config ID: Config_prod_NFVO
... Applicability: none
DELETE VNF Package Content - (Method not implemented) ... Post-Conditions: The VNF Package content is not deleted by the failed operation
Log Trying to perform a DELETE. This method should not be implemented Send DELETE Request for individual VNF Package
Set Headers {"Accept": "${ACCEPT_ZIP}"} Check HTTP Response Status Code Is 405
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Check Postcondition VNF Package Content Exist
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content \ No newline at end of file
Integer response status 405
Log Received 405 Method not implemented as expected
*** Settings *** *** Settings ***
Resource environment/variables.txt Resource environment/variables.txt
Resource environment/subscriptions.txt Resource environment/subscriptions.txt
Resource environment/vnfPackages.txt
Resource environment/individualVnfPackage.txt
Resource environment/vnfPackageContent.txt
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false
Library MockServerLibrary Library MockServerLibrary
Library OperatingSystem Library OperatingSystem
...@@ -12,6 +15,326 @@ Library Process ...@@ -12,6 +15,326 @@ Library Process
*** Keywords *** *** Keywords ***
Get all VNF Packages
Log Trying to get all VNF Packages present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body Does Not Contain softwareImages
Log Checking that field element is missing
${softwareImages}= Get Value From Json ${response['body']} $..softwareImages
Should Be Empty ${softwareImages}
Log Element is empty as expected
Check HTTP Response Body Does Not Contain additionalArtifacts
Log Checking that field element is missing
${additionalArtifacts}= Get Value From Json ${response['body']} $..additionalArtifacts
Should Be Empty ${additionalArtifacts}
Log Element is empty as expected
Check HTTP Response Body Does Not Contain userDefinedData
Log Checking that field element is missing
${userDefinedData}= Get Value From Json ${response['body']} $..userDefinedData
Should Be Empty ${userDefinedData}
Log Element is empty as expected
GET VNF Packages with attribute-based filter
Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?${POS_FILTER}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body VnfPkgsInfo Matches the requested Attribute-Based Filter
Log Checking that attribute-based filter is matched
#todo
GET VNF Packages with invalid attribute-based filter
Log Trying to perform a negative get, filtering by the inexistent filter 'nfvId'
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?${NEG_FILTER}
${output}= Output response
Set Suite Variable ${response} ${output}
GET VNF Packages with all_fields attribute selector
Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?all_fields
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body VnfPkgsInfo Matches the requested all_fields selector
Log Trying to validate softwareImages schema
${softwareImages}= Get Value From Json ${response['body']} $..softwareImages
Validate Json softwareImage.schema.json ${softwareImages[0]}
Log Validation for softwareImage schema OK
Log Trying to validate additionalArtifacts schema
${additional_artifacts}= Get Value From Json ${response['body']} $..additionalArtifacts
Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]}
Log Validation for additionalArtifacts schema OK
${links}= Get Value From Json ${response['body']} $.._links
Validate Json links.schema.json ${links[0]}
Log Validation for _links schema OK
GET VNF Packages with exclude_default attribute selector
Log Trying to get all VNF Packages present in the NFVO Catalogue, using exclude_default filter.
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body VnfPkgsInfo Matches the requested exclude_default selector
Log Checking missing information for softwareImages element
${softwareImages}= Get Value From Json ${response['body']} $..softwareImages
Should Be Empty ${softwareImages}
Log softwareImages element is missing as excepted
Log Checking missing information for additionalArtifact element
${additional_artifacts}= Get Value From Json ${response['body']} $..additionalArtifacts
Should Be Empty ${additional_artifacts}
Log additionalArtifact element is missing as excepted
GET VNF Packages with fields attribute selector
Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields
Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?fields=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body vnfPkgsInfo Matches the requested fields selector
Log Trying to validate softwareImages schema
${softwareImages}= Get Value From Json ${response['body']} $..softwareImages
Validate Json softwareImage.schema.json ${softwareImages[0]}
Log Validation for softwareImage schema OK
Log Trying to validate additionalArtifacts schema
${additional_artifacts}= Get Value From Json ${response['body']} $..additionalArtifacts
Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]}
Log Validation for additionalArtifacts schema OK
GET VNF Packages with exclude_fields attribute selector
Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields
Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?exclude_fields=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body vnfPkgsInfo Matches the requested exclude_fields selector
Log Checking missing information for softwareImages element
${softwareImages}= Get Value From Json ${response['body']} $..softwareImages
Should Be Empty ${softwareImages}
Log softwareImages element is missing as excepted
Log Checking missing information for additionalArtifact element
${additional_artifacts}= Get Value From Json ${response['body']} $..additionalArtifacts
Should Be Empty ${additional_artifacts}
Log additionalArtifact element is missing as excepted
GET all VNF Packages with invalid resource endpoint
Log Trying to perform a GET on a erroneous URI
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_package
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for all VNF Packages
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": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for all VNF Packages
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": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for all VNF Packages
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": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for all VNF Packages
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": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition VNF Packages Exist
Log Checking that Pm Job still exists
GET all VNF Packages
GET Individual VNF Package
Log Trying to get a VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body vnfPkgInfo Identifier matches the requested VNF Package
Log Going to validate pacakge info retrieved
Should Be Equal ${response['body']['id']} ${vnfPackageId}
Log Pacakge identifier as expected
GET Individual VNF Package with invalid resource identifier
Log Trying to perform a negative get, using wrong authorization bearer
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for individual VNF Package
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": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for individual VNF Package
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": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for individual VNF Package
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": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for individual VNF Package
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": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition VNF Package Exist
Log Checking that vnf pacakge still exists
GET Individual VNF Package
GET Individual VNF Package Content
Log Trying to get a VNF Package Content
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Header Content-Type Is
[Arguments] ${header}
Should Contain ${response['headers']['Content-Type']} ${header}
GET Individual VNF Package Content with Range Request
Log Trying to get a VNF Package Content using RANGE 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.
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Set Headers {"Range": "${range}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Header Content-Range Is Present and Matches the requested range
Log Check Content-Range HTTP Header
Should Contain ${response['headers']} Content-Range
Should Be Equal As Strings ${response['headers']['Content-Range']} ${range}
Log Header Content-Range is present
Check HTTP Response Header Content-Length Is Present and Matches the requested range length
Log Check Content-Length HTTP Header
Should Contain ${response['headers']} Content-Length
Should Be Equal As Integers ${response['headers']['Content-Length']} ${length}
Log Header Content-Length is present
GET Individual VNF Package Content 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}"}
Set Headers {"Range": "${erroneousRange}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual VNF Package Content with invalid resource identifier
Log Trying to perform a negative get, using an erroneous package ID
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
GET Content for VNF Package in onboarding state different from ONBOARDED
Log Trying to get a VNF Package content present in the NFVO Catalogue, but not in ONBOARDED operationalStatus
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for individual VNF Package Content
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": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for individual VNF Package Content
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": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for individual VNF Package Content
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": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for individual VNF Package Content
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": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition VNF Package Content Exist
Log Checking that vnf pacakge still exists
GET Individual VNF Package Content
Get all VNF Package Subscriptions Get all VNF Package Subscriptions
Log Trying to get the list of subscriptions Log Trying to get the list of subscriptions
Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Accept": "${ACCEPT_JSON}"}
...@@ -20,8 +343,6 @@ Get all VNF Package Subscriptions ...@@ -20,8 +343,6 @@ Get all VNF Package Subscriptions
${output}= Output response ${output}= Output response
Set Suite Variable ${response} ${output} Set Suite Variable ${response} ${output}
Get VNF Package Subscriptions with attribute-based filters Get VNF Package Subscriptions with attribute-based filters
Log Trying to get the list of subscriptions using filters Log Trying to get the list of subscriptions using filters
Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Accept": "${ACCEPT_JSON}"}
...@@ -29,9 +350,6 @@ Get VNF Package Subscriptions with attribute-based filters ...@@ -29,9 +350,6 @@ Get VNF Package Subscriptions with attribute-based filters
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok}
${output}= Output response ${output}= Output response
Set Suite Variable ${response} ${output} Set Suite Variable ${response} ${output}
Get VNF Package Subscriptions with invalid attribute-based filters Get VNF Package Subscriptions with invalid attribute-based filters
Log Trying to get the list of subscriptions using filters with wrong attribute name Log Trying to get the list of subscriptions using filters with wrong attribute name
...@@ -40,9 +358,7 @@ Get VNF Package Subscriptions with invalid attribute-based filters ...@@ -40,9 +358,7 @@ Get VNF Package Subscriptions with invalid attribute-based filters
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko}
${output}= Output response ${output}= Output response
Set Suite Variable ${response} ${output} Set Suite Variable ${response} ${output}
Get VNF Package Subscriptions with invalid resource endpoint Get VNF Package Subscriptions with invalid resource endpoint
Log Trying to perform a request on a Uri which doesn't exist Log Trying to perform a request on a Uri which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Accept": "${ACCEPT_JSON}"}
...@@ -51,8 +367,6 @@ Get VNF Package Subscriptions with invalid resource endpoint ...@@ -51,8 +367,6 @@ Get VNF Package Subscriptions with invalid resource endpoint
${output}= Output response ${output}= Output response
Set Suite Variable ${response} ${output} Set Suite Variable ${response} ${output}
Send Post Request for VNF Package Subscription Send Post Request for VNF Package Subscription
Log Trying to create a new subscription Log Trying to create a new subscription
Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Accept": "${ACCEPT_JSON}"}
...@@ -110,8 +424,7 @@ Check HTTP Response Status Code Is ...@@ -110,8 +424,7 @@ Check HTTP Response Status Code Is
Should Be Equal ${response['status']} ${expected_status} Should Be Equal ${response['status']} ${expected_status}
Log Status code validated Log Status code validated
Check HTTP Response Body Json Schema Is Check HTTP Response Body Json Schema Is
[Arguments] ${input} [Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json Should Contain ${response['headers']['Content-Type']} application/json
......
This diff is collapsed.
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
${ACCEPT_ZIP} application/zip ${ACCEPT_ZIP} application/zip
${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO ${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO
${range} bytes=0-1023 ${range} bytes=0-1023
${length} 1024
${erroneousRange} bytes=10000000-1000000000 # Requesting a out of range number of bytes ${erroneousRange} bytes=10000000-1000000000 # Requesting a out of range number of bytes
${erroneousVnfPkgId} erroneousPkgId ${erroneousVnfPkgId} erroneousPkgId
${CONTENT_TYPE_ZIP} application/zip ${CONTENT_TYPE_ZIP} application/zip
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
${POS_FILTER} vnfdId=41fdd38a-3d4c-465c-83e0-f80e014425f8 ,vnfProvider=NXW # Positive case, suing compiant fields name for filtering get request ${POS_FILTER} vnfdId=41fdd38a-3d4c-465c-83e0-f80e014425f8 ,vnfProvider=NXW # Positive case, suing compiant fields name for filtering get request
${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case, using wrong name of field ${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case, using wrong name of field
${fields} softwareImages,additionalArtifacts ${fields} softwareImages,additionalArtifacts
${response} httpresponse
...@@ -76,7 +76,7 @@ Create new VNF Performance subscription ...@@ -76,7 +76,7 @@ Create new VNF Performance subscription
Send Post Request for VNF Performance Subscription Send Post Request for VNF Performance Subscription
Check HTTP Response Status Code Is 201 Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Matches the Subscription Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Check Postcondition VNF Performance Subscription Is Set Check Postcondition VNF Performance Subscription Is Set
...@@ -109,7 +109,7 @@ Create duplicated VNF Performance subscription with VNFM creating duplicated sub ...@@ -109,7 +109,7 @@ Create duplicated VNF Performance subscription with VNFM creating duplicated sub
Send Post Request for Duplicated VNF Performance Subscription Send Post Request for Duplicated VNF Performance Subscription
Check HTTP Response Status Code Is 201 Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Matches the Subscription Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Check Postcondition VNF Performance Subscription Is Set Check Postcondition VNF Performance Subscription Is Set
PUT VNF Performance Subscriptions - Method not implemented PUT VNF Performance Subscriptions - Method not implemented
......
...@@ -286,7 +286,7 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte ...@@ -286,7 +286,7 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte
# Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri} # Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri}
#TODO #TODO
Check HTTP Response Body Matches the Subscription Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Log Check Response matches subscription Log Check Response matches subscription
${body}= Get File jsons/subscriptions.json ${body}= Get File jsons/subscriptions.json
${subscription}= evaluate json.loads('''${body}''') json ${subscription}= evaluate json.loads('''${body}''') json
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment