Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nfv/api-tests
  • reinaortega/api-tests
2 results
Show changes
Commits on Source (500)
Showing
with 1495 additions and 1226 deletions
#!/bin/bash
# Copyright ETSI 2018
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt
#set -vx
#set -e
cd "$(dirname "$0")"
run_dir="$(pwd)"
echo "Using git branch $GIT_BRANCH"
bash ./scripts/build-container.sh
ret=$?
if [ "$ret" != "0" ]; then
echo "build-container.sh failed"
exit -1
fi
bash ./scripts/run-container.sh "${run_dir}" "$GIT_BRANCH"
ret=$?
if [ "$ret" != "0" ]; then
echo "run-container.sh failed"
exit -1
fi
if [[ "$GIT_BRANCH" =~ .*fix-plu$ ]]; then
apiTestsVersion=$(echo $GIT_BRANCH | cut -d'/' -f 2)
apiTestsVersion=$(echo $apiTestsVersion | cut -d'-' -f 1)
echo apiTestsVersion
curl -X POST \
-F token=${ROBOT_HIVE_TAP_TT_TOKEN} \
-F ref=master \
-F "variables[API_TESTS_VERSION]=$apiTestsVersion" \
-F "variables[TEST_SUITE]=NFV" \
https://forge.etsi.org/rep/api/v4/projects/484/trigger/pipeline
fi
ret=$?
echo "Final validation result: $ret"
exit $ret
eclipse.preferences.version=1
encoding//libspecs/REST.py=utf-8
# NFV API Conformance Test Specification (NFV-TST 010)
This repository hosts the NFV API Conformance test specification for
the APIs defined in ETSI NFV GS [SOL002](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_NFV-SOL002v020701p.pdf),
[SOL003](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.07.01_60/gs_NFV-SOL003v020701p.pdf),
[SOL005](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.07.01_60/gs_NFV-SOL005v020701p.pdf), in their versions
v2.7.1.
More information and download is available at [DGS/NFV-TST010ed271](https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=58931).
**{- Disclaimer: The content of this repository is related to a DRAFT, i.e. a working document, of ETSI ISG NFV.-}**
{-It is provided for information only and is still under development. The content may be updated, replaced, or removed at any time. Do not use as reference material.-}
The latest draft may be downloaded at the [ISG NFV open area](https://docbox.etsi.org/isg/nfv/open/Drafts/).
## Overview
The Test Specification is built as a collection of [Robot Framework](robotframework.org/) Test Description. [Robot Framework](robotframework.org/) is a generic test automation framework for acceptance testing and acceptance test-driven development.
This repository hosts the NFV API Conformance test specification for
the APIs defined in ETSI NFV GS [SOL002](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.08.01_60/gs_NFV-SOL002v020801p.pdf),
[SOL003](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.08.01_60/gs_NFV-SOL003v020801p.pdf),
[SOL005](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.08.01_60/gs_NFV-SOL005v020801p.pdf), in their versions
v2.8.1.
More information and download is available at [DGS/NFV-TST010ed281](https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=63121).
## Available versions
The NFV API Conformance test specification is available in the following versions:
| TST010 Version | SOL Specifications | API Conformance Tests |
|----------------------|-----------------------------------------------------------------------------------------|-----------------------------------------------------------|
| v2.4.1 | SOL002 SOL003 SOL005 v2.4.1 | [v2.4.1](https://forge.etsi.org/rep/nfv/api-tests/tree/2.4.1/) |
| v2.4.1-maintenance | SOL002 SOL003 SOL005 v2.4.1 | [v2.4.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/2.4.1-fix-plu/) |
| v2.6.1 | SOL002 SOL003 SOL005 v2.6.1 | [v2.6.1](https://forge.etsi.org/rep/nfv/api-tests/tree/2.6.1/) |
| v2.6.1-maintenance | SOL002 SOL003 SOL005 v2.6.1 | [v2.6.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/2.6.1-fix-plu/) |
| v2.7.1 | SOL002 SOL003 SOL005 v2.7.1 | [v2.7.1](https://forge.etsi.org/rep/nfv/api-tests/tree/2.7.1/) |
| v2.7.1-maintenance | SOL002 SOL003 SOL005 v2.7.1 | [v2.7.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/2.7.1-fix-plu/)
| v2.8.1 | SOL002 SOL003 SOL005 v2.8.1 | [v2.8.1](https://forge.etsi.org/rep/nfv/api-tests/tree/2.8.1/) |
| v2.8.1-maintenance | SOL002 SOL003 SOL005 v2.8.1 | [v2.8.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/2.8.1-fix-plu/)|
| v3.3.1 | SOL002 SOL003 SOL005 v3.3.1<br>SOL009 SOL011 v3.3.1<br>SOL012 v3.4.1 | [v3.3.1](https://forge.etsi.org/rep/nfv/api-tests/tree/3.3.1/) |
| v3.3.1-maintenance | SOL002 SOL003 SOL005 v3.3.1<br>SOL009 SOL011 v3.3.1<br>SOL012 v3.4.1 | [v3.3.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/3.3.1-fix-plu/) |
| v3.5.1 | SOL002 SOL003 SOL005 v3.5.1<br>SOL009 v3.5.1<br>SOL011 v3.3.1<br>SOL012 v3.4.1 | [v3.5.1](https://forge.etsi.org/rep/nfv/api-tests/tree/3.5.1/) |
| v3.5.1-maintenance | SOL002 SOL003 SOL005 v3.5.1<br>SOL009 v3.5.1<br>SOL011 v3.3.1<br>SOL012 v3.4.1 | [v3.5.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/3.5.1-fix-plu/) |
| v3.6.1 | SOL002 SOL003 SOL005 v3.6.1<br>SOL009 v3.6.1<br>SOL011 v3.3.1<br>SOL012 v3.4.1 | [v3.6.1](https://forge.etsi.org/rep/nfv/api-tests/tree/3.6.1/) |
| v3.6.1-maintenance | SOL002 SOL003 SOL005 v3.6.1<br>SOL009 v3.6.1<br>SOL011 v3.3.1<br>SOL012 v3.4.1 | [v3.6.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/3.6.1-fix-plu/) |
## Test Specification Overview
The Test Specification is built as a collection of [Robot Framework](robotframework.org/) Test Description. [Robot Framework](robotframework.org/) is a generic test automation framework for acceptance testing and acceptance
test-driven development.
More information at [NFV API Conformance Test Specification wiki](https://forge.etsi.org/rep/nfv/api-tests/wikis/NFV-API-Conformance-Test-Specification).
......
*** Settings ***
Resource environment/variables.txt
Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
*** Test Cases ***
POST API Version - Method not implemented
[Documentation] Test ID: 6.3.1.2.1
... Test title: POST API version - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version
[Documentation] Test ID: 6.3.1.2.2
... Test title: GET API Version
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version - Method not implemented
[Documentation] Test ID: 6.3.1.2.3
... Test title: PUT API Version - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version - Method not implemented
[Documentation] Test ID: 6.3.1.2.4
... Test title: PATCH API Version - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version - Method not implemented
[Documentation] Test ID: 6.3.1.2.5
... Test title: DELETE API Version - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
POST API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.1.2.6
... Test title: POST API version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version with apiMajorVerion
[Documentation] Test ID: 6.3.1.2.7
... Test title: GET API Version with apiMajorVerion
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.1.2.8
... Test title: PUT API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.1.2.9
... Test title: PATCH API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.1.2.10
... Test title: DELETE API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
*** Keywords ***
POST API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
${schema} = Catenate ${input} .schema.json
Validate Json ${schema} ${response['body']}
*** Settings ***
Resource environment/variables.txt
Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
*** Test Cases ***
POST API Version - Method not implemented
[Documentation] Test ID: 6.3.1.2.1
... Test title: POST API version - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version
[Documentation] Test ID: 6.3.1.2.2
... Test title: GET API Version
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version - Method not implemented
[Documentation] Test ID: 6.3.1.2.3
... Test title: PUT API Version - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version - Method not implemented
[Documentation] Test ID: 6.3.1.2.4
... Test title: PATCH API Version - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version - Method not implemented
[Documentation] Test ID: 6.3.1.2.5
... Test title: DELETE API Version - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
POST API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.1.2.6
... Test title: POST API version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version with apiMajorVerion
[Documentation] Test ID: 6.3.1.2.7
... Test title: GET API Version with apiMajorVerion
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.1.2.8
... Test title: PUT API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.1.2.9
... Test title: PATCH API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.1.2.10
... Test title: DELETE API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
*** Keywords ***
POST API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
\ No newline at end of file
......@@ -7,12 +7,12 @@ Library OperatingSystem
Library DependencyLibrary
*** Test Cases ***
Set new VNF Configuration
PATCH Set a new VNF Configuration
[Documentation] Test ID: 6.3.1.1.1
... Test title: Set a new VNF Configuration
... Test title: PATCH Set a new VNF Configuration
... Test objective: The objective is to test the creation of a new VNF configuration and perform a JSON schema validation of the returned configuration data structure
... Pre-conditions: A VNF instance is instantiated
... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers
... Post-Conditions: The configuration is successfully set in the VNF and it matches the issued configuration
......@@ -28,7 +28,7 @@ Get information about a VNF configuration
... Test title: Get information about a VNF configuration
... Test objective: The objective is to test the retrieval of an existing VNF instance configuration and perform a JSON schema validation of the collected configuration data structure
... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured.
... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: none
......@@ -42,7 +42,7 @@ Get information about a VNF configuration with HTTP Etag
... Test title: Get information about a VNF configuration with HTTP Etag
... Test objective: The objective is to test the retrieval of an existing VNF instance configuration, check the generation by the VNF of an HTTP Etag opaque identifier, and perform a JSON schema validation of the collected configuration data structure
... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured
... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers
... Post-Conditions: none
......@@ -51,13 +51,13 @@ Get information about a VNF configuration with HTTP Etag
Check HTTP Response Header Contains ETag
Check HTTP Response Body Json Schema Is vnfConfiguration
Set new VNF Configuration - HTTP Etag precondition unsuccessful
PATCH VNF Configuration - HTTP Etag precondition unsuccessful
[Tags] etag
[Documentation] Test ID: 6.3.1.1.4
... Test title: Set a new VNF Configuration - HTTP Etag precondition unsuccessful
... Test title: PATCH VNF Configuration - HTTP Etag precondition unsuccessful
... Test objective: The objective is to test the unsuccess in setting a duplication of VNF configuration identified by an already used HTTP Etag identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response.
... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured (Test ID 6.3.1.1.1) with a given HTTP Etag identifier.
... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers
... Post-Conditions: The VNF configuration is not modified by the unsuccessful operation and it matches the configuration issued in Test ID 6.3.1.1.1
......@@ -70,8 +70,8 @@ POST VNF Configuration - Method not implemented
[Documentation] Test ID: 6.3.1.1.5
... Test title: POST VNF Configuration - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create a new VNF configuration
... Pre-conditions: A VNF instance is instantiated. The VNF instance is alrseady configured
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: none
......@@ -82,8 +82,8 @@ PUT VNF Configuration - Method not implemented
[Documentation] Test ID: 6.3.1.1.6
... Test title: PUT VNF Configuration - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify an existing VNF configuration
... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured
... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: none
......@@ -94,23 +94,22 @@ DELETE VNF Configuration - Method not implemented
[Documentation] Test ID: 6.3.1.1.7
... Test title: Delete VNF Configuration - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete an existing VNF configuration
... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured
... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: The VNF configuration is not deleted by the unsuccessful operation
... Post-Conditions: none
Send DELETE Request for VNF Configuration
Check HTTP Response Status Code Is 405
Check Postcondition VNF Configuration Exists
*** Keywords ***
Get VNF configuration
Log Query VNF The GET method queries information about a configuration.
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/configuration
Get ${apiRoot}/${apiName}/${apiMajorVersion}/configuration
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -118,9 +117,9 @@ Send VNF configuration
log Trying to perform a PATCH. This method modifies the configuration
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/vnfConfigModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -137,7 +136,8 @@ Check HTTP Response Header Contains
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/problem+json
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
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
......@@ -145,10 +145,6 @@ Check HTTP Response Body Json Schema Is
Check Postcondition VNF Configuration Unmodified (Implicit)
Log Check Implicit Postcondition
Check Postcondition VNF Is Configured
Check Postcondition VNF Configuration Exists
Log Check Postcondition VNF exists
Check Postcondition VNF Is Configured
Check Postcondition VNF Is Configured
Log Check Postcondition for VNF Configuration
......@@ -163,32 +159,32 @@ Send Duplicated VNF configuration
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Set Headers {"If-Match": "${etag}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/vnfConfigModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for VNF Configuration
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/configuration
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/configuration
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for VNF Configuration
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/configuration
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/configuration
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for VNF Configuration
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/configuration
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/configuration
${output}= Output response
Set Suite Variable ${response} ${output}
\ No newline at end of file
*** Variables ***
${Etag}= an etag
${Etag_modified}= 12345
${Etag} an etag
${Etag_modified} 12345
${response}= httpresponse
${EM-VNF_HOST} localhost # Hostname of the NFVO
......@@ -10,16 +10,13 @@ ${EM-VNF_SCHEMA} https
${ACCEPT} application/json
${AUTH_USAGE} 1
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${AUTHORIZATION_HEADER} Authorization
${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${CONTENT_TYPE} application/json
${apiRoot} /
${apiName} vnfconfig
${apiVersion} v1
${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
${apiMajorVersion} v1
${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
\ No newline at end of file
*** Settings ***
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
*** Test Cases ***
POST API Version - Method not implemented
[Documentation] Test ID: 6.3.4.7.1
... Test title: POST API version - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version
[Documentation] Test ID: 6.3.4.7.2
... Test title: GET API Version
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version - Method not implemented
[Documentation] Test ID: 6.3.4.7.3
... Test title: PUT API Version - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version - Method not implemented
[Documentation] Test ID: 6.3.4.7.4
... Test title: PATCH API Version - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version - Method not implemented
[Documentation] Test ID: 6.3.4.7.5
... Test title: DELETE API Version - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
POST API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.4.7.6
... Test title: POST API version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version with apiMajorVerion
[Documentation] Test ID: 6.3.4.7.7
... Test title: GET API Version with apiMajorVerion
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.4.7.8
... Test title: PUT API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.4.7.9
... Test title: PATCH API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.4.7.10
... Test title: DELETE API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
*** Keywords ***
POST API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
${schema} = Catenate ${input} .schema.json
Validate Json ${schema} ${response['body']}
*** Settings ***
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
*** Test Cases ***
POST API Version - Method not implemented
[Documentation] Test ID: 6.3.4.7.1
... Test title: POST API version - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version
[Documentation] Test ID: 6.3.4.7.2
... Test title: GET API Version
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version - Method not implemented
[Documentation] Test ID: 6.3.4.7.3
... Test title: PUT API Version - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version - Method not implemented
[Documentation] Test ID: 6.3.4.7.4
... Test title: PATCH API Version - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version - Method not implemented
[Documentation] Test ID: 6.3.4.7.5
... Test title: DELETE API Version - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
POST API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.4.7.6
... Test title: POST API version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version with apiMajorVerion
[Documentation] Test ID: 6.3.4.7.7
... Test title: GET API Version with apiMajorVerion
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.4.7.8
... Test title: PUT API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.4.7.9
... Test title: PATCH API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.4.7.10
... Test title: DELETE API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
*** Keywords ***
POST API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
\ No newline at end of file
......@@ -10,10 +10,10 @@ Escalate the perceived severity
... Test title: Escalate the perceived severity
... Test objective: To enable the consumer to escalate the perceived severity of an alarm that is represented by an individual alarm resource.
... Pre-conditions: The resource representing the individual alarm has been created
... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
... Applicability: none
... Post-Conditions: none
Post escalate severity
Check HTTP Response Status Code Is 204
......@@ -21,11 +21,11 @@ GET Escalate the perceived severity - Method not implemented
[Documentation] Test ID: 6.3.4.3.2
... Test title: GET Escalate the perceived severity - Method not implemented
... Test objective: The objective is to test that the GET HTTP method not implemented for escalate perceived severity
... Pre-conditions:
... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
... Applicability: none
... Post-Conditions: none
Get escalate severity
Check HTTP Response Status Code Is 405
......@@ -33,11 +33,11 @@ PUT Escalate the perceived severity - Method not implemented
[Documentation] Test ID: 6.3.4.3.3
... Test title: PUT Escalate the perceived severity - Method not implemented
... Test objective: The objective is to test that the PUT HTTP method not implemented for escalate perceived severity
... Pre-conditions:
... Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
... Applicability: none
... Post-Conditions: none
Put escalate severity
Check HTTP Response Status Code Is 405
......@@ -45,24 +45,23 @@ PATCH Escalate the perceived severity - Method not implemented
[Documentation] Test ID: 6.3.4.3.4
... Test title: PATCH Escalate the perceived severity - Method not implemented
... Test objective: The objective is to test that the PATCH HTTP method not implemented for escalate perceived severity
... Pre-conditions:
... Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
... Applicability: none
... Post-Conditions: none
PATCH escalate severity
Check HTTP Response Status Code Is 405
DELETE Escalate the perceived severity - Method not implemented
[Documentation] Test ID: 6.3.4.3.5
... Test title: DELETE Escalate the perceived severity - Method not implemented
... Test objective: The objective is to test that the DELETE HTTP method not implemented for escalate perceived severity
... Pre-conditions:
... Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
... Applicability: none
... Post-Conditions: none
Delete escalate severity
Check HTTP Response Status Code Is 405
......@@ -70,39 +69,39 @@ DELETE Escalate the perceived severity - Method not implemented
Check resource existence
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}
Integer response status 200
POST escalate severity
Log escalate the perceived severity of an alarm with the VNFM
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate ${PerceivedSeverity}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${PerceivedSeverity}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET escalate severity
log Trying to perform a GET. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT escalate severity
log Trying to perform a PUT. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH escalate severity
log Trying to perform a PATCH. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE escalate severity
log Trying to perform a DELETE. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
......@@ -113,7 +112,8 @@ Check HTTP Response Status Code Is
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
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
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
\ No newline at end of file
*** Settings ***
# Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library OperatingSystem
......@@ -7,61 +6,55 @@ Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library DependencyLibrary
*** Variables **
${original_etag} 1234
*** Test Cases ***
POST Alarm - Method not implemented
[Documentation] Test ID: 6.3.4.2.1
... Test title: POST Alarm - Method not implemented
... Test objective: The objective is to test that the method is not implemented
... Pre-conditions:
... Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Applicability: none
... Post-Conditions: none
POST Alarm Task
Check HTTP Response Status Code Is 405
GET information about an individual alarm
[Documentation] Test ID: 6.3.4.2.2
... Test title: GET information about an individual alarm
... Test objective: The objective is to read an individual alarm.
... Pre-conditions: The related alarm exists
... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
... Applicability: none
... Post-Conditions: none
GET Alarm Task
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is alarm
PUT Individual Alarm - Method not implemented
[Documentation] Test ID: 6.3.4.2.3
... Test title: PUT Individual Alarm - Method not implemented
... Test objective: The objective is to test that the method is not implemented
... Pre-conditions:
... Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Applicability: none
... Post-Conditions: none
PUT Alarm Task
Check HTTP Response Status Code Is 405
PATCH Individual Alarm
[Documentation] Test ID: 6.3.4.2.4
... Test title: PATCH Individual Alarm
... Test objective: The objective is to Modify an individual alarm resource
... Pre-conditions: The related alarm exists
... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Applicability: none
... Post-Conditions: none
PATCH Alarm Task
Check HTTP Response Status Code Is 200
......@@ -72,54 +65,68 @@ PATCH Individual Alarm - Precondition failed
... Test title: PATCH Individual Alarm - Precondition failed
... Test objective: The objective is to attempt to Modify an individual alarm resource, where the precondition was not met
... Pre-conditions: The related alarm exists
... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Applicability: none
... Post-Conditions: The alarm resource is not modified
PATCH Alarm Task with wrong precondition
Check HTTP Response Status Code Is 412
Check HTTP Response Body Json Schema Is ProblemDetails
Check Postcondition VNF individual alarm Unmodified (Implicit)
PATCH Individual Alarm - Conflict
[Documentation] Test ID: 6.3.4.2.6
... Test title: PATCH Individual Alarm - Conflict
... Test objective: The objective is to Modify an individual alarm resource
... Pre-conditions: The related alarm exists
... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Applicability: none
... Post-Conditions: The alarm resource is not modified
PATCH Alarm Task
Check HTTP Response Status Code Is 409
Check HTTP Response Body Json Schema Is ProblemDetails
Check Postcondition VNF individual alarm Unmodified (Implicit)
DELETE Individual Alarm - Method not implemented
[Documentation] Test ID: 6.3.4.2.7
... Test title: DELETE Individual Alarm - Method not implemented
... Test objective: The objective is to test that the method is not implemented
... Pre-conditions:
... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions: alarm not deleted
... Applicability: none
... Post-Conditions: none
DELETE Alarm Task
Check HTTP Response Status Code Is 405
GET information about an individual alarm - Not Found
[Documentation] Test ID: 6.3.4.2.8
... Test title: GET information about an individual alarm - Not Found
... Test objective: The objective is to test that GET method fail retrieving status information about individaual Alarms when alarm is not present.
... Pre-conditions: The related alarm doesnot exists
... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET Alarm Task
Check HTTP Response Status Code Is 404
Check HTTP Response Body Json Schema Is ProblemDetails
*** Keywords ***
POST Alarm Task
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT Alarm Task
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/alarmModifications.json
Put ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH Alarm Task
......@@ -127,33 +134,37 @@ PATCH Alarm Task
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Set Headers {"If-Match": "${original_etag[0]}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/alarmModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH Alarm Task with wrong precondition
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/alarmModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}
${origOutput}= Output response
Set Suite Variable ${origResponse} ${origOutput}
Set Headers {"If-Match": "${wrong_etag}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE Alarm Task
log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET Alarm Task
Log Query VNF The GET method queries information about individual alarm.
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}
${etag} Output response headers ETag
Set Suite Variable &{original_etag} ${etag}
${outputResponse}= Output response
......@@ -161,17 +172,17 @@ GET Alarm Task
GET Alarm Task with filter
Log Query VNF The GET method queries information about individual alarm with filters.
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${alarm_filter}=${managedObjectId}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${managedObjectId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET Alarm Task with invalid filter
Log Query VNF The GET method queries information about individual alarm with filters.
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${invalid_alarm_filter}=${managedObjectId}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${managedObjectId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
......@@ -181,7 +192,14 @@ Check HTTP Response Status Code Is
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
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
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
Check Postcondition VNF individual alarm Unmodified (Implicit)
Log Check Postcondition subscription is not modified
GET Alarm Task
Should Be Equal As Strings ${origResponse['body']['callbackUri']} ${response['body']['callbackUri']}
......@@ -12,11 +12,11 @@ POST Individual Subscription - Method not implemented
[Documentation] Test ID: 6.3.4.5.1
... Test title: POST Individual Subscription - Method not implemented
... Test objective: The objective is to test that the method is not implemented
... Pre-conditions:
... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
... Applicability: none
... Post-Conditions: none
Post Create individual subscription
Check HTTP Response Status Code Is 405
......@@ -25,10 +25,10 @@ GET Information about an individual subscription
... Test title: GET Information about an individual subscription
... Test objective: The objective is to read an individual subscription for VNF alarms subscribed by the client
... Pre-conditions: The subscription with the given id exists
... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
... Applicability: none
... Post-Conditions: none
Get individual subscription
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is FmSubscription
......@@ -37,94 +37,106 @@ PUT an individual subscription - Method not implemented
[Documentation] Test ID: 6.3.4.5.3
... Test title: PUT an individual subscription - Method not implemented
... Test objective: The objective is to test that the method is not implemented
... Pre-conditions:
... Reference: Clause 7.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 7.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
... Applicability: none
... Post-Conditions: none
Put individual subscription
Check HTTP Response Status Code Is 405
PATCH an individual subscription - Method not implemented
[Documentation] Test ID: 6.3.4.5.4
... Test title: PATCH an individual subscription - Method not implemented
... Test objective: The objective is to test that the method is not implemented
... Pre-conditions:
... Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Pre-conditions: none
... Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
... Applicability: none
... Post-Conditions: none
Patch individual subscription
Check HTTP Response Status Code Is 405
DELETE an individual subscription
[Documentation] Test ID: 6.3.4.5.5
... Test title: DELETE an individual subscription
... Test objective: The objective is to test that the deletion of a subscription
... Pre-conditions: an existing subscription
... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Test objective: The objective is to test that the deletion of a individual subscription resource.
... Pre-conditions: one or more subscription already exsist
... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability:
... Applicability: none
... Post-Conditions: the subscription is deleted
Delete individual subscription
Check HTTP Response Status Code Is 204
Check Postcondition resource is deleted
GET Information about an individual subscription - Not Found
[Documentation] Test ID: 6.3.4.5.6
... Test title: GET Information about an individual subscription - Not Found
... Test objective: The objective is to test that GET method fail retrieving individual subscription for VNF alarms subscribed by the client because it is not present.
... Pre-conditions: The subscription with the given id donot exists
... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get individual subscription
Check HTTP Response Status Code Is 404
Check HTTP Response Body Json Schema Is ProblemDetails
*** Keywords ***
Check resource existence
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Integer response status 200
Post Create individual subscription
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Get individual subscription
log Trying to get information about an individual subscription
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Get individual subscription - filter
Log Get the list of active individual subscription using a filter
Set Headers {"Accept": "${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Get individual subscription - invalid filter
Log Get the list of active individual subscription using an invalid filter
Set Headers {"Accept": "${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT individual subscription
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH individual subscription
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE individual subscription
log Try to delete an individual subscription
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
......@@ -135,7 +147,13 @@ Check HTTP Response Status Code Is
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
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
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
Check Postcondition resource is deleted
Get individual subscription
Check HTTP Response Status Code Is 404
\ No newline at end of file
*** Settings ***
Resource environment/variables.txt
Library MockServerLibrary
Library Process
Library String
Library OperatingSystem
Library Collections
Suite Setup Create Sessions
Suite Teardown Terminate All Processes kill=true
Resource environment/variables.txt
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Suite Setup Check resource existence and get CallbackUri
*** Test Cases ***
VNF Fault Alarm Notification
[Documentation] Test ID: 6.3.4.6.1
[Documentation] Test ID: 6.3.4.8.1
... Test title: VNF Fault Alarm Notification
... Test objective: The objective is to test the dispatch of VNF Fault Alarm Notification when a virtualised resource within an VNF instance fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
... Test objective: The objective is to test that VNF Fault Alarm Notification is delivered with success to the notification consumer
... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Config ID: Config_prod_VNFM
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_Notif_Endpoint
... Applicability: none
... Post-Conditions: none
Trigger the fault of a virtualised resource in the VNF instance (external action)
Check Alarm Notification Http POST Request Body Json Schema Is alarmNotification
Check Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification
Post Alarm Notification
Check HTTP Response Status Code Is 204
VNF Fault Alarm Cleared Notification
[Documentation] Test ID: 6.3.4.6.2
[Documentation] Test ID: 6.3.4.8.2
... Test title: VNF Fault Alarm Cleared Notification
... Test objective: The objective is to test the dispatch of VNF Fault Alarm Cleared Notification when a faulty virtualised resource within an VNF instance is cleared, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
... Pre-conditions: A VNF instance is instantiated, a virtualised resource is in faulty state, and a subscription for fault alarm cleared notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Config ID: Config_prod_VNFM
... Test objective: The objective is to test that VNF Fault Alarm Cleared Notification is delivered with success to the notification consumer
... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm cleared notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_Notif_Endpoint
... Applicability: none
... Post-Conditions: none
Trigger the clear of a faulty virtualised resource in the VNF instance (external action)
Check Alarm cleared Notification Http POST Request Body Json Schema Is alarmClearedNotification
Check Alarm cleared Notification Http POST Request Body notificationType attribute Is alarmClearedNotification
VNF Fault Alarm List Rebuilt Notification
[Documentation] Test ID: 6.3.4.6.3
... Test title: VNF Fault Alarm List Rebuilt Notification
... Test objective: The objective is to test the dispatch of VNF Fault Alarm List Rebuilt Notification when the VNFM decides to rebuild the list of its VNF alarms, e.g. due to a corruption in the alarm storage, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
... Pre-conditions: A VNF instance is instantiated, one or more virtualised resource are in faulty state, and a subscription for fault alarm list rebuilt notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1
... Config ID: Config_prod_VNFM
Post Alarm Cleared Notification
Check HTTP Response Status Code Is 204
VNF Fault Alarm List Rebuilt Notification
[Documentation] Test ID: 6.3.4.8.3
... Test title: VNF Fault List Rebuilt Alarm List Rebuilt Notification
... Test objective: The objective is to test that VNF Fault Alarm List Rebuilt Notification is delivered with success to the notification consumer
... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_Notif_Endpoint
... Applicability: none
... Post-Conditions: none
Trigger the VNF fault alarm list rebuild in the NFVO (external action)
Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is alarmListRebuiltNotification
Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification
Post Alarm List Rebuilt Notification
Check HTTP Response Status Code Is 204
*** Keywords ***
Trigger the fault of a virtualised resource in the VNF instance (external action)
#do nothing
Log do nothing
Trigger the clear of a faulty virtualised resource in the VNF instance (external action)
#do nothing
Log do nothing
Trigger the VNF fault alarm list rebuild in the NFVO (external action)
#do nothing
Log do nothing
Check Alarm List Rebuilt Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Alarm List Rebuilt Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Check Alarm Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Alarm Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Alarm Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Check Alarm cleared Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Alarm cleared Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Alarm Cleareance Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Check Alarm Clerance Notification Http POST Request Body changeType attribute Is
[Arguments] ${type}
#do nothing
Log do nothing
Configure Notification Alarm List Rebuilt Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
&{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Alarm Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
&{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Alarm Cleareance Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
&{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Forward
[Arguments] ${schema} ${endpoint} ${endpoint_fwd}
Log Creating mock Http POST forward to handle ${schema}
&{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema}
&{notification_fwd}= Create Mock Http Forward ${endpoint_fwd}
Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd}
Check resource existence and get CallbackUri
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Integer response status 200
Validate Json response body FmSubscription.schema.json
Set Global Variable ${callbackResp} response body callbackUri
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
Wait For Process handle=mockInstance timeout=5s on_timeout=continue
Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL002-7.3.4
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Post Alarm Notification
log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template} = Get File jsons/AlarmNotification.json
${body}= Format String ${template} subscriptionId=${subscriptionId}
Post ${callbackResp} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Post Alarm Cleared Notification
log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template} = Get File jsons/AlarmClearedNotification.json
${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId}
Post ${callbackResp} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Post Alarm List Rebuilt Notification
log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template} = Get File jsons/AlarmListRebuiltNotification.json
${body}= Format String ${template} subscriptionId=${subscriptionId}
Post ${callbackResp} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
\ No newline at end of file
*** Settings ***
Resource environment/variables.txt
Library MockServerLibrary
Library Process
Library OperatingSystem
Library Collections
Suite Setup Create Sessions
Suite Teardown Terminate All Processes kill=true
*** Test Cases ***
VNF Fault Alarm Notification
[Documentation] Test ID: 6.3.4.6.1
... Test title: VNF Fault Alarm Notification
... Test objective: The objective is to test the dispatch of VNF Fault Alarm Notification when a virtualised resource within an VNF instance fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Trigger the fault of a virtualised resource in the VNF instance (external action)
Check Alarm Notification Http POST Request Body Json Schema Is alarmNotification
Check Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification
VNF Fault Alarm Cleared Notification
[Documentation] Test ID: 6.3.4.6.2
... Test title: VNF Fault Alarm Cleared Notification
... Test objective: The objective is to test the dispatch of VNF Fault Alarm Cleared Notification when a faulty virtualised resource within an VNF instance is cleared, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
... Pre-conditions: A VNF instance is instantiated, a virtualised resource is in faulty state, and a subscription for fault alarm cleared notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Trigger the clear of a faulty virtualised resource in the VNF instance (external action)
Check Alarm cleared Notification Http POST Request Body Json Schema Is alarmClearedNotification
Check Alarm cleared Notification Http POST Request Body notificationType attribute Is alarmClearedNotification
VNF Fault Alarm List Rebuilt Notification
[Documentation] Test ID: 6.3.4.6.3
... Test title: VNF Fault Alarm List Rebuilt Notification
... Test objective: The objective is to test the dispatch of VNF Fault Alarm List Rebuilt Notification when the VNFM decides to rebuild the list of its VNF alarms, e.g. due to a corruption in the alarm storage, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
... Pre-conditions: A VNF instance is instantiated, one or more virtualised resource are in faulty state, and a subscription for fault alarm list rebuilt notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Trigger the VNF fault alarm list rebuild in the NFVO (external action)
Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is alarmListRebuiltNotification
Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification
*** Keywords ***
Trigger the fault of a virtualised resource in the VNF instance (external action)
#do nothing
Log do nothing
Trigger the clear of a faulty virtualised resource in the VNF instance (external action)
#do nothing
Log do nothing
Trigger the VNF fault alarm list rebuild in the NFVO (external action)
#do nothing
Log do nothing
Check Alarm List Rebuilt Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Alarm List Rebuilt Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Check Alarm Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Alarm Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Alarm Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Check Alarm cleared Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Alarm cleared Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Alarm Cleareance Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Check Alarm Clerance Notification Http POST Request Body changeType attribute Is
[Arguments] ${type}
#do nothing
Log do nothing
Configure Notification Alarm List Rebuilt Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
Set Global Variable ${notification_request} ${req}
&{headers} = Create Dictionary Content-Type=application/json
&{notification_response}= Create Mock Response headers=${headers} status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Alarm Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
Set Global Variable ${notification_request} ${req}
&{headers} = Create Dictionary Content-Type=application/json
&{notification_response}= Create Mock Response headers=${headers} status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Alarm Cleareance Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
Set Global Variable ${notification_request} ${req}
&{headers} = Create Dictionary Content-Type=application/json
&{notification_response}= Create Mock Response headers=${headers} status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Forward
[Arguments] ${schema} ${endpoint} ${endpoint_fwd}
Log Creating mock Http POST forward to handle ${schema}
&{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema}
&{notification_fwd}= Create Mock Http Forward ${endpoint_fwd}
Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd}
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
Wait For Process handle=mockInstance timeout=5s on_timeout=continue
Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL002-7.3.4
......@@ -2,7 +2,8 @@
${VNFM_HOST} localhost # Hostname of the VNFM
${VNFM_PORT} 8080 # Listening port of the VNFM
${VNFM_SCHEMA} https
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${AUTHORIZATION_HEADER} Authorization
${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${ACCEPT} application/json
${ACCEPT_JSON} application/json
${AUTH_USAGE} 1
......@@ -11,9 +12,11 @@ ${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c
${invalid_alarm_filter} badFilter
${apiRoot} /
${apiName} vnffm
${apiVersion} v1
${apiMajorVersion} v1
${CONTENT_TYPE} application/json
${origResponse}= httpresponse
${VNFM_ALLOWS_DUPLICATE_SUBS} 0
${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
......@@ -52,7 +55,8 @@ ${response}= httpresponse
${vnfcInstanceIds} []
${faultyResourceType} COMPUTE
${eventType} COMMUNICATIONS_ALARM
${perceivedSeverity} CRITICAL
${probableCause}
${notification_type} AlarmNotification
\ No newline at end of file
${notification_type} AlarmNotification
${callbackResp} localhost
\ No newline at end of file
{{
"id":"",
"notificationType":"AlarmClearedNotification",
"subscriptionId":"{subscriptionId}",
"timeStamp":"",
"alarmId":"{alarmId}",
"alarmCleareTime":"",
"_links":{{
"subscription":"",
"alarm":""
}}
}}
{{
"id":"",
"notificationType":"AlarmListRebuiltNotification",
"subscriptionId":"{subscriptionId}",
"timeStamp":"",
"_links":{{
"subscription":"",
"alarm":""
}}
}}
{{
"id":"",
"notificationType":"AlarmNotification",
"subscriptionId":"{subscriptionId}",
"timeStamp":"",
"alarm":{{
"id":"",
"managedObjectId":""
}},
"_links":{{
"subscription":""
}}
}}
{
"filter": {
"vnfInstanceSubscriptionFilter": {
{{
"filter": {{
"vnfInstanceSubscriptionFilter": {{
"vnfdIds": [
"6fc3539c-e602-4afa-8e13-962fb5a7d81f"
]
}
},
"callbackUri": "http://127.0.0.1/subscribe"
}
\ No newline at end of file
}}
}},
"callbackUri": "{callback_uri}{callback_endpoint}"
}}
\ No newline at end of file
*** Settings ***
Resource environment/variables.txt
Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
*** Test Cases ***
POST API Version - Method not implemented
[Documentation] Test ID: 6.3.2.7.1
... Test title: POST API version - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version
[Documentation] Test ID: 6.3.2.7.2
... Test title: GET API Version
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version - Method not implemented
[Documentation] Test ID: 6.3.2.7.3
... Test title: PUT API Version - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version - Method not implemented
[Documentation] Test ID: 6.3.2.7.4
... Test title: PATCH API Version - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version - Method not implemented
[Documentation] Test ID: 6.3.2.7.5
... Test title: DELETE API Version - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
POST API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.2.7.6
... Test title: POST API version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version with apiMajorVerion
[Documentation] Test ID: 6.3.2.7.7
... Test title: GET API Version with apiMajorVerion
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.2.7.8
... Test title: PUT API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.2.7.9
... Test title: PATCH API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.2.7.10
... Test title: DELETE API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
*** Keywords ***
POST API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
${schema} = Catenate ${input} .schema.json
Validate Json ${schema} ${response['body']}
*** Settings ***
Resource environment/variables.txt
Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
*** Test Cases ***
POST API Version - Method not implemented
[Documentation] Test ID: 6.3.2.7.1
... Test title: POST API version - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version
[Documentation] Test ID: 6.3.2.7.2
... Test title: GET API Version
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version - Method not implemented
[Documentation] Test ID: 6.3.2.7.3
... Test title: PUT API Version - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version - Method not implemented
[Documentation] Test ID: 6.3.2.7.4
... Test title: PATCH API Version - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version - Method not implemented
[Documentation] Test ID: 6.3.2.7.5
... Test title: DELETE API Version - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
POST API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.2.7.6
... Test title: POST API version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that POST method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
POST API Version
Check HTTP Response Status Code Is 405
GET API Version with apiMajorVerion
[Documentation] Test ID: 6.3.2.7.7
... Test title: GET API Version with apiMajorVerion
... Test objective: The objective is to test that GET method successfully return ApiVersionInformation
... Pre-conditions: none
... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET API Version
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApiVersionInformation
PUT API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.2.7.8
... Test title: PUT API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PUT method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT API Version
Check HTTP Response Status Code Is 405
PATCH API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.2.7.9
... Test title: PATCH API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that PATCH method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH API Version
Check HTTP Response Status Code Is 405
DELETE API Version with apiMajorVerion - Method not implemented
[Documentation] Test ID: 6.3.2.7.10
... Test title: DELETE API Version with apiMajorVerion - Method not implemented
... Test objective: The objective is to test that DELETE method is not implemented
... Pre-conditions: none
... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE API Version
Check HTTP Response Status Code Is 405
*** Keywords ***
POST API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
\ No newline at end of file