Skip to content
Snippets Groups Projects
Commit 7d895626 authored by Elian Kraja's avatar Elian Kraja
Browse files

Added json schema and modified checks on MethodNotImplemented

parent 9a6bc3f0
No related branches found
No related tags found
No related merge requests found
Showing
with 282 additions and 250 deletions
......@@ -85,11 +85,11 @@ PUT Subscription - (Method not implemented)
PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PATCH Subscription - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
......@@ -100,8 +100,8 @@ PATCH Subscription - (Method not implemented)
#PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
......@@ -69,11 +69,11 @@ POST Individual VNF Package - (Method not implemented)
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PUT Individual VNF Package - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -83,11 +83,11 @@ PUT Individual VNF Package - (Method not implemented)
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PATCH Individual VNF Package - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
......@@ -98,11 +98,11 @@ PATCH Individual VNF Package - (Method not implemented)
#PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
DELETE Individual VNF Package - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
......@@ -112,8 +112,8 @@ DELETE Individual VNF Package - (Method not implemented)
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
*** Settings ***
Library HttpLibrary.HTTP
Resource ../variables.txt
Library JSONSchemaLibrary schemas/
*** Test Cases ***
VNF packages
Log Trying to get all VNF Packages present in the NFVO Catalogue
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Set Request Header Accept ${ACCEPT}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
GET ${apiRoot}/vnfpkgm/v1/vnf_packages
Response Status Code Should Equal 200
${vnfPkgInfos}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE}
Log Trying to validate response
Validate Json vnfPkgInfo.schema.json ${vnfPkgInfos}
Log Validation OK
Log Trying to generate a invalid request using invalid attribute filter
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Set Request Header Accept ${ACCEPT}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
GET ${apiRoot}/vnfpkgm/v1/vnf_packages?fields=wrong_field
Response Status Code Should Equal 400
Log Response code il 400 as expected
Log Trying to generate an invalid request using an invalid token
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Set Request Header Accept ${ACCEPT}
Set Request Header Authorization ${WRONG_AUTHORIZATION}
GET ${apiRoot}/vnfpkgm/v1/vnf_packages
Response Status Code Should Equal 401
Log Response code is 401 as expected
Individual VNF package
Log Trying to get a VNF Package present in the NFVO Catalogue
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Set Request Header Accept ${ACCEPT}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
GET ${apiRoot}/vnfpkgm/v1/vnf_packages/${vnfPkgId}
Response Status Code Should Equal 200
${vnfPkgInfo}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE}
Log Trying to validate response
Validate Json vnfPkgInfo.schema.json ${vnfPkgInfo}
Log Validation OK
VNFD of an individual VNF package
Log Trying to get the content of a VNFD within a VNF Package present in the NFVO Catalogue
Log Request to have a VNFD from a given VNF Package
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Set Request Header Accept ${ACCEPT_PLAIN}
Set Request Header Accept ${ACCEPT_ZIP}
GET ${apiRoot}/vnfpkgm/v1/vnf_packages/${vnfPkgId}/vnfd
Response Status Code Should Equal 200
${vnfPkgInfo}= Get Response Body
#Run Keyword If ${SINGLE_FILE_VNFD} == 1 Response Header Should Equal Content-Type ${ACCEPT_PLAIN}
Run Keyword If ${SINGLE_FILE_VNFD} == 0 Response Header Should Equal Content-Type ${ACCEPT_ZIP}
Log How to handle validation here? Are we going to check some fields from the json?
Log Request that will generate an error (406) using an Accept header as text/plain but the NFVO could not provide
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Set Request Header Accept ${WRONG_ACCEPT}
GET ${apiRoot}/vnfpkgm/v1/vnf_packages/${vnfPkgId}/vnfd
Response Status Code Should Equal 406
Log Received 406 Not Applicable
VNF package content
Log Trying to fetch the content of a VNF package identified by the VNF package identifier allocated by the NFVO
Log Request to have the whole VNF Package
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Set Request Header Accept ${ACCEPT_ZIP}
GET ${apiRoot}/vnfpkgm/v1/vnf_packages/${vnfPkgId}/package_content
Response Status Code Should Equal 200
${vnfPkgInfo}= Get Response Body
Response Header Should Equal Content-Type ${ACCEPT_ZIP}
Log Request to have the VNF Package using partial download
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Set Request Header Accept ${ACCEPT_ZIP}
Set Request Header Range bytes=0-1023
GET ${apiRoot}/vnfpkgm/v1/vnf_packages/${vnfPkgId}/package_content
Response Header Should Equal Content-Length 2048
Response Header Should Equal Content-Range bytes 0-1023/2048
Response Status Code Should Equal 206
Log Received 206 Partial Content
Log Request that will generate a 416 Error. Package length in bytes is 2048 and will be requested a range from 2048 to 2560
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Set Request Header Accept ${ACCEPT_ZIP}
Set Request Header Range bytes=2048-2560
GET ${apiRoot}/vnfpkgm/v1/vnf_packages/${vnfPkgId}/package_content
Response Status Code Should Equal 416
Log Received 416 Range not satisfiable
Individual VNF package artifact
Log Trying to get an individual artifact contained in a VNF package
Log Request to have the whole VNF Package
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Set Request Header Accept ${ARTIFACT_TYPE}
GET ${apiRoot}/vnfpkgm/v1/vnf_packages/${vnfPkgId}/artifacts/${ARTIFACT_ID}
Response Status Code Should Equal 200
${vnfPkgInfo}= Get Response Body
Response Header Should Equal Content-Type ${ARTIFACT_TYPE}
Log How to handle validation here? The object returned is a zip file
Log Trying to get \ with partial download an individual artifact contained in a VNF package
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Set Request Header Accept ${ARTIFACT_TYPE}
Set Request Header Range bytes=0-1023
GET ${apiRoot}/vnfpkgm/v1/vnf_packages/${vnfPkgId}/artifacts/${ARTIFACT_ID}
Response Header Should Equal Content-Length 2048
Response Header Should Equal Content-Range bytes 0-1023/2048
Response Status Code Should Equal 206
Log Received 206 Partial Content
Log Request that will generate a 416 Error. Artifact length in bytes is 2048 and will be requested a range from 2048 to 2560
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Set Request Header Accept ${ARTIFACT_TYPE}
Set Request Header Range bytes=2048-2560
GET ${apiRoot}/vnfpkgm/v1/vnf_packages/${vnfPkgId}/artifacts/${ARTIFACT_ID}
Response Status Code Should Equal 416
Log Received 416 Range not satisfiable
......@@ -136,11 +136,11 @@ PUT Subscription - (Method not implemented)
PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PATCH Subscription - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
......@@ -151,11 +151,11 @@ PATCH Subscription - (Method not implemented)
#PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
DELETE Subscription - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
......@@ -165,8 +165,8 @@ DELETE Subscription - (Method not implemented)
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
......@@ -132,11 +132,11 @@ POST all PACKAGE (Method not implemented)
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PUT all PACKAGE (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -146,11 +146,11 @@ PUT all PACKAGE (Method not implemented)
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PATCH all PACKAGE (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
......@@ -161,11 +161,11 @@ PATCH all PACKAGE (Method not implemented)
#PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
DELETE all PACKAGE (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
......@@ -175,8 +175,8 @@ DELETE all PACKAGE (Method not implemented)
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
......@@ -103,11 +103,11 @@ POST VNF Package Artifact - (Method not implemented)
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/artifacts/{artifactPath}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PUT VNF Package Artifact - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -117,11 +117,11 @@ PUT VNF Package Artifact - (Method not implemented)
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/artifacts/{artifactPath}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PATCH VNF Package Artifact - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
......@@ -132,11 +132,11 @@ PATCH VNF Package Artifact - (Method not implemented)
#PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/artifacts/{artifactPath}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
DELETE VNF Package Artifact - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
......@@ -146,8 +146,8 @@ DELETE VNF Package Artifact - (Method not implemented)
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/artifacts/{artifactPath}
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
......@@ -109,11 +109,11 @@ POST VNF Package Content - (Method not implemented)
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PUT VNF Package Content - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -123,11 +123,11 @@ PUT VNF Package Content - (Method not implemented)
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PATCH VNF Package Content - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
......@@ -138,11 +138,11 @@ PATCH VNF Package Content - (Method not implemented)
#PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
DELETE VNF Package Content - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
......@@ -152,8 +152,8 @@ DELETE VNF Package Content - (Method not implemented)
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
......@@ -144,11 +144,11 @@ POST all PACKAGE (Method not implemented)
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PUT all PACKAGE (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -158,11 +158,11 @@ PUT all PACKAGE (Method not implemented)
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
PATCH all PACKAGE (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -173,11 +173,11 @@ PATCH all PACKAGE (Method not implemented)
#PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
DELETE all PACKAGE (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -187,8 +187,8 @@ DELETE all PACKAGE (Method not implemented)
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
Response Status Code Should Equal 405
Log Received 405 Method not implemented as expected
${problemDetails}= Get Response Body
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#${problemDetails}= Get Response Body
#Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
#Log Trying to validate ProblemDetails
#Validate Json ProblemDetails.schema.json ${problemDetails}
#Log Validation OK
{ "type": "array", "items": { "description": "This type represents a subscription related to notifications about VNF package management.\n", "type": "object", "required": [ "id", "callbackUri", "_links" ], "properties": { "id": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" }, "filter": { "description": "This type represents a subscription filter related to notifications related to VNF package management. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n", "type": "object", "properties": { "notificationTypes": { "description": "Match particular notification types. Permitted values: - VnfPackageOnboardingNotification - VnfPackageChangeNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n", "type": "array", "items": { "type": "string", "enum": [ "VnfPackageOnboardingNotification", "VnfPackageChangeNotification" ] } }, "vnfProductsFromProviders": { "description": "If present, match VNF packages that contain VNF products from certain providers. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProvider" ], "properties": { "vnfProvider": { "description": "Name of the VNF provider to match.\n", "type": "string" }, "vnfProducts": { "description": "If present, match VNF packages that contain VNF products with certain product names, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProductName" ], "properties": { "vnfProductName": { "description": "Name of the VNF product to match.\n", "type": "string" }, "versions": { "description": "If present, match VNF packages that contain VNF products with certain versions and a certain product name, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfSoftwareVersion" ], "properties": { "vnfSoftwareVersion": { "description": "A Version.\n", "type": "string" }, "vnfdVersions": { "description": "If present, match VNF packages that contain VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n", "type": "array", "items": { "description": "A Version.\n", "type": "string" } } } } } } } } } } }, "vnfdId": { "description": "Match VNF packages with a VNFD identifier listed in the attribute. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfPkgId": { "description": "Match VNF packages with a package identifier listed in the attribute. May be present if the \"notificationTypes\" attribute contains the value \"VnfPackageChangeNotification\", and shall be absent otherwise. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "operationalState": { "description": "- ENABLED: The VNF package is enabled, i.e. it can be used for instantiation of new VNF instances.\n- DISABLED: The VNF package is disabled, i.e. it cannot be used for further VNF instantiation requests (unless and until the VNF package\n is re-enabled).\n", "type": "string", "enum": [ "ENABLED", "DISABLED" ] }, "usageState": { "description": "- IN_USE: VNF instances instantiated from this VNF package exist. - NOT_IN_USE: No existing VNF instance is instantiated from this VNF package.\n" } } }, "callbackUri": { "description": "String formatted according to IETF RFC 3986.\n", "type": "string" }, "_links": { "description": "Links to resources related to this resource.\n", "type": "object", "required": [ "self" ], "properties": { "self": { "description": "This type represents a link to a resource.\n", "type": "object", "required": [ "href" ], "properties": { "href": { "description": "URI of the referenced resource.\n", "type": "string", "format": "url" } } } } } } }}
\ No newline at end of file
{ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n", "type": "object", "required": [ "status", "detail" ], "properties": { "type": { "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n", "type": "string", "format": "URI" }, "title": { "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n", "type": "string" }, "status": { "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n", "type": "integer" }, "detail": { "description": "A human-readable explanation specific to this occurrence of the problem.\n", "type": "string" }, "instance": { "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", "type": "string", "format": "URI" } }}
\ No newline at end of file
{
"description": "Information about VNF package artifacts contained in the VNF package that are not software images. This attribute shall not be present before the VNF package content is on-boarded. Otherwise, this attribute shall be present if the VNF package contains additional artifacts.\n",
"type": "array",
"items": {
"description": "This type represents an artifact other than a software image which is contained in a VNF package.\n",
"type": "object",
"required": ["artifactPath", "checksum"],
"properties": {
"artifactPath": {
"description": "Path in the VNF package, which identifies the artifact and also allows to access a copy of the artifact.\n",
"type": "string"
},
"checksum": {
"description": "This type represents the checksum of a VNF package or an artifact file.\n",
"type": "object",
"required": ["algorithm", "hash"],
"properties": {
"algorithm": {
"description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n",
"type": "string"
},
"hash": {
"description": "The hexadecimal value of the checksum.\n",
"type": "string"
}
}
},
"metadata": {
"description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
"type": "object"
}
}
}
}
\ No newline at end of file
{
"description": "Links to resources related to this resource.\n",
"type": "object",
"required": ["self", "packageContent"],
"properties": {
"self": {
"description": "This type represents a link to a resource.\n",
"type": "object",
"required": ["href"],
"properties": {
"href": {
"description": "URI of the referenced resource.\n",
"type": "string",
"format": "url"
}
}
},
"vnfd": {
"description": "This type represents a link to a resource.\n",
"type": "object",
"required": ["href"],
"properties": {
"href": {
"description": "URI of the referenced resource.\n",
"type": "string",
"format": "url"
}
}
},
"packageContent": {
"description": "This type represents a link to a resource.\n",
"type": "object",
"required": ["href"],
"properties": {
"href": {
"description": "URI of the referenced resource.\n",
"type": "string",
"format": "url"
}
}
}
}
}
\ No newline at end of file
{
"description": "Information about VNF package artifacts that are software images. This attribute shall not be present before the VNF package content is on-boarded. Otherwise, this attribute shall be present unless it has been requested to be excluded per attribute selector.\n",
"type": "array",
"items": {
"description": "This type represents an artifact contained in a VNF package which represents a software image.\n",
"type": "object",
"required": ["id", "name", "provider", "version", "checksum", "containerFormat", "diskFormat", "createdAt", "minDisk", "minRam", "size", "imagePath"],
"properties": {
"id": {
"description": "An identifier that is unique within a VNF descriptor.\n",
"type": "string"
},
"name": {
"description": "Name of the software image.\n",
"type": "string"
},
"provider": {
"description": "Provider of the software image.\n",
"type": "string"
},
"version": {
"description": "A Version.\n",
"type": "string"
},
"checksum": {
"description": "This type represents the checksum of a VNF package or an artifact file.\n",
"type": "object",
"required": ["algorithm", "hash"],
"properties": {
"algorithm": {
"description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n",
"type": "string"
},
"hash": {
"description": "The hexadecimal value of the checksum.\n",
"type": "string"
}
}
},
"containerFormat": {
"description": "Container format indicates whether the software image is in a file format that also contains metadata about the actual software. Permitted values: - AKI: a kernel image format - AMI: a machine image format - ARI: a ramdisk image format - BARE: the image does not have a container or metadata envelope - DOCKER: docker container format - OVA: OVF package in a tarfile - OVF: OVF container format The list of permitted values was taken from \"Container formats\" in http://docs.openstack.org/image-guide/image-formats.html\n",
"type": "string",
"enum": ["AKI", "AMI", "ARI", "BARE", "DOCKER", "OVA", "OVF"]
},
"diskFormat": {
"description": "Disk format of a software image is the format of the underlying disk image. Permitted values: - AKI: a kernel image format - AMI: a machine image format - ARI: a ramdisk image format - ISO: an archive format for the data contents of an optical disc, such as CD-ROM\n- QCOW2: a common disk image format, which can expand dynamically and supports copy on write\n- RAW: an unstructured disk image format - VDI: a common disk image format - VHD: a common disk image format - VHDX: enhanced version of VHD format - VMDK: a common disk image format The list of permitted values was adapted from \"Disk formats\" in http://docs.openstack.org/image-guide/image-formats.html\n",
"type": "string",
"enum": ["AKI", "AMI", "ISO", "QCOW2", "RAW", "VDI", "VHD", "VHDX", "VMDK"]
},
"createdAt": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
},
"minDisk": {
"description": "The minimal disk for this software image in bytes.\n",
"type": "integer"
},
"minRam": {
"description": "The minimal RAM for this software image in bytes.\n",
"type": "integer"
},
"size": {
"description": "Size of this software image in bytes.\n",
"type": "integer"
},
"userMetadata": {
"description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
"type": "object"
},
"imagePath": {
"description": "Path in the VNF package, which identifies the image artifact and also allows to access a copy of the image artifact.\n",
"type": "string"
}
}
}
}
\ No newline at end of file
{ "type": "array", "items": { "description": "This type represents the information of an VNF package.\n", "type": "object", "required": [ "id", "operationalState", "usageState", "_links" ], "properties": { "id": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" }, "vnfdId": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" }, "vnfProvider": { "description": "Provider of the VNF package and the VNFD. This information is copied from the VNFD.\n", "type": "string" }, "vnfProductName": { "description": "Name to identify the VNF product. Invariant for the VNF product lifetime. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.\n", "type": "string" }, "vnfSoftwareVersion": { "description": "A Version.\n", "type": "string" }, "vnfdVersion": { "description": "A Version.\n", "type": "string" }, "checksum": { "description": "This type represents the checksum of a VNF package or an artifact file.\n", "type": "object", "required": [ "algorithm", "hash" ], "properties": { "algorithm": { "description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n", "type": "string" }, "hash": { "description": "The hexadecimal value of the checksum.\n", "type": "string" } } }, "softwareImages": { "description": "Information about VNF package artifacts that are software images. This attribute shall not be present before the VNF package content is on-boarded. Otherwise, this attribute shall be present unless it has been requested to be excluded per attribute selector.\n", "type": "array", "items": { "description": "This type represents an artifact contained in a VNF package which represents a software image.\n", "type": "object", "required": [ "id", "name", "provider", "version", "checksum", "containerFormat", "diskFormat", "createdAt", "minDisk", "minRam", "size", "imagePath" ], "properties": { "id": { "description": "An identifier that is unique within a VNF descriptor.\n", "type": "string" }, "name": { "description": "Name of the software image.\n", "type": "string" }, "provider": { "description": "Provider of the software image.\n", "type": "string" }, "version": { "description": "A Version.\n", "type": "string" }, "checksum": { "description": "This type represents the checksum of a VNF package or an artifact file.\n", "type": "object", "required": [ "algorithm", "hash" ], "properties": { "algorithm": { "description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n", "type": "string" }, "hash": { "description": "The hexadecimal value of the checksum.\n", "type": "string" } } }, "containerFormat": { "description": "Container format indicates whether the software image is in a file format that also contains metadata about the actual software. Permitted values: - AKI: a kernel image format - AMI: a machine image format - ARI: a ramdisk image format - BARE: the image does not have a container or metadata envelope - DOCKER: docker container format - OVA: OVF package in a tarfile - OVF: OVF container format The list of permitted values was taken from \"Container formats\" in http://docs.openstack.org/image-guide/image-formats.html\n", "type": "string", "enum": [ "AKI", "AMI", "ARI", "BARE", "DOCKER", "OVA", "OVF" ] }, "diskFormat": { "description": "Disk format of a software image is the format of the underlying disk image. Permitted values: - AKI: a kernel image format - AMI: a machine image format - ARI: a ramdisk image format - ISO: an archive format for the data contents of an optical disc, such as CD-ROM\n- QCOW2: a common disk image format, which can expand dynamically and supports copy on write\n- RAW: an unstructured disk image format - VDI: a common disk image format - VHD: a common disk image format - VHDX: enhanced version of VHD format - VMDK: a common disk image format The list of permitted values was adapted from \"Disk formats\" in http://docs.openstack.org/image-guide/image-formats.html\n", "type": "string", "enum": [ "AKI", "AMI", "ISO", "QCOW2", "RAW", "VDI", "VHD", "VHDX", "VMDK" ] }, "createdAt": { "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", "type": "string", "format": "date-time" }, "minDisk": { "description": "The minimal disk for this software image in bytes.\n", "type": "integer" }, "minRam": { "description": "The minimal RAM for this software image in bytes.\n", "type": "integer" }, "size": { "description": "Size of this software image in bytes.\n", "type": "integer" }, "userMetadata": { "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n", "type": "object" }, "imagePath": { "description": "Path in the VNF package, which identifies the image artifact and also allows to access a copy of the image artifact.\n", "type": "string" } } } }, "additionalArtifacts": { "description": "Information about VNF package artifacts contained in the VNF package that are not software images. This attribute shall not be present before the VNF package content is on-boarded. Otherwise, this attribute shall be present if the VNF package contains additional artifacts.\n", "type": "array", "items": { "description": "This type represents an artifact other than a software image which is contained in a VNF package.\n", "type": "object", "required": [ "artifactPath", "checksum" ], "properties": { "artifactPath": { "description": "Path in the VNF package, which identifies the artifact and also allows to access a copy of the artifact.\n", "type": "string" }, "checksum": { "description": "This type represents the checksum of a VNF package or an artifact file.\n", "type": "object", "required": [ "algorithm", "hash" ], "properties": { "algorithm": { "description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n", "type": "string" }, "hash": { "description": "The hexadecimal value of the checksum.\n", "type": "string" } } }, "metadata": { "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n", "type": "object" } } } }, "onboardingState": { "description": "CREATED: The VNF package resource has been created. UPLOADING: The associated VNF package content is being uploaded. PROCESSING: The associated VNF package content is being processed, e.g., validation.\nONBOARDED: The associated VNF package content has been successfully on-boarded.\n", "type": "string", "enum": [ "CREATED", "UPLOADING", "PROCESSING", "ONBOARDED" ] }, "operationalState": { "description": "- ENABLED: The VNF package is enabled, i.e. it can be used for instantiation of new VNF instances.\n- DISABLED: The VNF package is disabled, i.e. it cannot be used for further VNF instantiation requests (unless and until the VNF package\n is re-enabled).\n", "type": "string", "enum": [ "ENABLED", "DISABLED" ] }, "usageState": { "description": "- IN_USE: VNF instances instantiated from this VNF package exist. - NOT_IN_USE: No existing VNF instance is instantiated from this VNF package.\n" }, "userDefinedData": { "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n", "type": "object" }, "_links": { "description": "Links to resources related to this resource.\n", "type": "object", "required": [ "self", "packageContent" ], "properties": { "self": { "description": "This type represents a link to a resource.\n", "type": "object", "required": [ "href" ], "properties": { "href": { "description": "URI of the referenced resource.\n", "type": "string", "format": "url" } } }, "vnfd": { "description": "This type represents a link to a resource.\n", "type": "object", "required": [ "href" ], "properties": { "href": { "description": "URI of the referenced resource.\n", "type": "string", "format": "url" } } }, "packageContent": { "description": "This type represents a link to a resource.\n", "type": "object", "required": [ "href" ], "properties": { "href": { "description": "URI of the referenced resource.\n", "type": "string", "format": "url" } } } } } } }}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment