Commit 12a263a8 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch '2.6.1-dev-APIVersion-APIs' into '2.6.1-dev'

SOL002/3/5 Tests for API version endpoints - Implementation of deltas between v2.6.1 and v2.4.1

See merge request !94
parents 0efb5309 984ee32e
*** Settings ***
Resource environment/configuration.txt
Resource environment/variables.txt
Resource VnfLcmOperationKeywords.robot
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
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 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 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 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 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 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 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 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 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 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 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}
\ No newline at end of file
{
"description": "This type represents API version information.\n",
"type": "object",
"required": [
"uriPrefix",
"apiVersions"
],
"properties": {
"uriPrefix": {
"description": "Specifies the URI prefix for the API, in the following form {apiRoot}/{apiName}/{apiMajorVersion}/.\n",
"type": "string"
},
"apiVersions": {
"description": "Version(s) supported for the API signaled by the uriPrefix attribute.\n",
"type": "array",
"items": {
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"description": "Identifies a supported version. The value of the version attribute shall be a version identifier as specified in clause 9.1 (SOL013).\n",
"type": "string"
},
"isDeprecated": {
"description": "If such information is available, this attribute indicates whether use of the version signaled by the version attribute is deprecated (true) or not (false).\nA deprecated version is still supported by the API producer but is recommended not to be used any longer. When a version is no longer supported, it does not appear in the response body.\n",
"type": "boolean"
},
"retirementDate": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
}
}
}
}
}
}
\ No newline at end of file
*** Settings ***
Resource environment/configuration.txt
Resource environment/variables.txt
Resource VnfLcmOperationKeywords.robot
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
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 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 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 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 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 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 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 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 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 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 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}
\ No newline at end of file
{
"description": "This type represents API version information.\n",
"type": "object",
"required": [
"uriPrefix",
"apiVersions"
],
"properties": {
"uriPrefix": {
"description": "Specifies the URI prefix for the API, in the following form {apiRoot}/{apiName}/{apiMajorVersion}/.\n",
"type": "string"
},
"apiVersions": {
"description": "Version(s) supported for the API signaled by the uriPrefix attribute.\n",
"type": "array",
"items": {
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"description": "Identifies a supported version. The value of the version attribute shall be a version identifier as specified in clause 9.1 (SOL013).\n",
"type": "string"
},
"isDeprecated": {
"description": "If such information is available, this attribute indicates whether use of the version signaled by the version attribute is deprecated (true) or not (false).\nA deprecated version is still supported by the API producer but is recommended not to be used any longer. When a version is no longer supported, it does not appear in the response body.\n",
"type": "boolean"
},
"retirementDate": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
}
}
}
}
}
}
\ No newline at end of file
*** Settings ***
Resource environment/configuration.txt
Resource environment/variables.txt
Resource VnfLcmOperationKeywords.robot
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
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 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 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 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 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 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 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 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