Commit fc066fde authored by Elian Kraja's avatar Elian Kraja
Browse files

Fixies on json schema validation

parent 7d895626
......@@ -16,7 +16,8 @@ GET Individual Subscription
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Received a 200 OK as expected
${result}= Get Response Body
Validate Json PkgmSubscription.schema.json ${result}
${json}= evaluate json.loads('''${result}''') json
Validate Json PkgmSubscription.schema.json ${json}
Log Validated PkgmSubscription schema
GET Subscription - Negative (Not Found)
......@@ -28,9 +29,10 @@ GET Subscription - Negative (Not Found)
Response Status Code Should Equal 404
Log Received 404 Not Found as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Subscription - Negative (Unauthorized: Wrong Token)
......@@ -42,9 +44,10 @@ GET Subscription - Negative (Unauthorized: Wrong Token)
Response Status Code Should Equal 401
Log Received 401 Unauthorized as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
DELETE Subscription
......@@ -72,9 +75,10 @@ DELETE Subscription - Negative (Not Found)
Response Status Code Should Equal 404
Log The subscriptionId is not present in database
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
PUT Subscription - (Method not implemented)
......@@ -85,23 +89,12 @@ 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
PATCH Subscription - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Set Request Header Accept ${ACCEPT_JSON}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Http Request "PATCH" ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
#PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Http Request 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
......@@ -13,9 +13,10 @@ GET Individual VNF Package
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Response Status Code Should Equal 200
${vnfPkgInfo}= Get Response Body
${json}= evaluate json.loads('''${vnfPkgInfo}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate response
Validate Json vnfPkgInfo.schema.json ${vnfPkgInfo}
Validate Json vnfPkgInfo.schema.json ${json}
Log Validation OK
GET Individual VNF Package - Negative (Not Found)
......@@ -27,9 +28,10 @@ GET Individual VNF Package - Negative (Not Found)
Response Status Code Should Equal 404
Log Received 404 Not Found as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Individual VNF Package - Negative (Unauthorized: Wrong Token)
......@@ -42,9 +44,10 @@ GET Individual VNF Package - Negative (Unauthorized: Wrong Token)
Response Status Code Should Equal 401
Log Received 401 Unauthorized as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Individual VNF Package - Negative (Unauthorized: No Token)
......@@ -56,9 +59,10 @@ GET Individual VNF Package - Negative (Unauthorized: No Token)
Response Status Code Should Equal 401
Log Received 401 Unauthorized as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
POST Individual VNF Package - (Method not implemented)
......@@ -69,11 +73,6 @@ 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
PUT Individual VNF Package - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -83,26 +82,15 @@ 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
PATCH Individual VNF Package - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Set Request Header Accept ${ACCEPT_JSON}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Http Request "PATCH" ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
#PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Http Request 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
DELETE Individual VNF Package - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
......@@ -112,8 +100,3 @@ 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
......@@ -16,7 +16,8 @@ GET Subscription
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Received a 200 OK as expected
${result}= Get Response Body
Validate Json PkgmSubscription.schema.json ${result}
${json}= evaluate json.loads('''${result}''') json
Validate Json PkgmSubscription.schema.json ${json}
Log Validated PkgmSubscription schema
GET Subscription - Filter
......@@ -29,7 +30,8 @@ GET Subscription - Filter
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Received a 200 OK as expected
${result}= Get Response Body
Validate Json PkgmSubscription.schema.json ${result}
${json}= evaluate json.loads('''${result}''') json
Validate Json PkgmSubscription.schema.json ${json}
Log Validated PkgmSubscription schema
GET Subscription - Negative Filter
......@@ -42,9 +44,10 @@ GET Subscription - Negative Filter
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Received a 400 Bad Request as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Subscription - Negative (Not Found)
......@@ -56,9 +59,10 @@ GET Subscription - Negative (Not Found)
Response Status Code Should Equal 404
Log Received 404 Not Found as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Subscription - Negative (Unauthorized: Wrong Token)
......@@ -70,9 +74,10 @@ GET Subscription - Negative (Unauthorized: Wrong Token)
Response Status Code Should Equal 401
Log Received 401 Unauthorized as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
POST Subscription
......@@ -88,8 +93,9 @@ POST Subscription
Log Received 201 Created as expected
Response Should Have Header Location
Log Response has header Location
${response} Get Response Body
Validate Json PkgmSubscription.schema.json ${response}
${result}= Get Response Body
${json}= evaluate json.loads('''${result}''') json
Validate Json PkgmSubscription.schema.json ${json}
Log Validation of PkgmSubscription OK
POST Subscription - DUPLICATION
......@@ -106,8 +112,9 @@ POST Subscription - DUPLICATION
Log Received 201 Created as expected
Response Should Have Header Location
Log Response has header Location
${response} Get Response Body
Validate Json PkgmSubscription.schema.json ${response}
${result} Get Response Body
${json}= evaluate json.loads('''${result}''') json
Validate Json PkgmSubscription.schema.json ${json}
Log Validation of PkgmSubscription OK
POST Subscription - NO DUPLICATION
......@@ -124,9 +131,9 @@ POST Subscription - NO DUPLICATION
Log Received 303 See Other as expected
Response Should Have Header Location
Log Response header contains Location
${result}= Get Response Body
${count}= Get Length ${result}
Run Keyword If $count == 0 Response body is empty as expected
Comment ${result}= Get Response Body
Comment ${count}= Get Length ${result}
Comment Run Keyword If $count == 0 Response body is empty as expected
PUT Subscription - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -136,26 +143,15 @@ 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
PATCH Subscription - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Set Request Header Accept ${ACCEPT_JSON}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Http Request "PATCH" ${apiRoot}/${apiName}/${apiVersion}/subscriptions
#PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Http Request 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
DELETE Subscription - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
......@@ -165,8 +161,3 @@ 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
......@@ -59,9 +59,10 @@ GET VNFD in Individual VNF Package - Negative (PLAIN/ZIP)
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd
Response Status Code Should Equal 406
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Individual VNF Package - Negative (Not Found)
......@@ -74,9 +75,10 @@ GET Individual VNF Package - Negative (Not Found)
Response Status Code Should Equal 404
Log Received 404 Not Found as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Individual VNF Package - Negative (Unauthorized: Wrong Token)
......@@ -90,9 +92,10 @@ GET Individual VNF Package - Negative (Unauthorized: Wrong Token)
Response Status Code Should Equal 401
Log Received 401 Unauthorized as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Individual VNF Package - Negative (Unauthorized: No Token)
......@@ -104,9 +107,10 @@ GET Individual VNF Package - Negative (Unauthorized: No Token)
Response Status Code Should Equal 401
Log Received 401 Unauthozired as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET VNFD in Individual VNF Package - Negative (onboardingState issue)
......@@ -119,9 +123,10 @@ GET VNFD in Individual VNF Package - Negative (onboardingState issue)
Response Status Code Should Equal 409
Log Received 409 Conflict as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
POST all PACKAGE (Method not implemented)
......@@ -132,11 +137,6 @@ 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
PUT all PACKAGE (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -146,26 +146,15 @@ 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
PATCH all PACKAGE (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Set Request Header Accept ${ACCEPT_JSON}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Http Request "PATCH" ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
#PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
Http Request 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
DELETE all PACKAGE (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
......@@ -175,8 +164,3 @@ 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
......@@ -49,9 +49,10 @@ GET VNF Package Artifact - Negative Range
Response Status Code Should Equal 416
Log Received 416 Range not satisfiable as expected.
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET VNF Package Artifact- Negative (Not Found)
......@@ -63,9 +64,10 @@ GET VNF Package Artifact- Negative (Not Found)
Response Status Code Should Equal 404
Log Received 404 Not Found as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET VNF Package Artifact - Negative (Unauthorized: Wrong Token)
......@@ -77,9 +79,10 @@ GET VNF Package Artifact - Negative (Unauthorized: Wrong Token)
Response Status Code Should Equal 401
Log Received 401 Unauthorized as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET VNF Package Artifact - Negative (onboardingState issue)
......@@ -90,9 +93,10 @@ GET VNF Package Artifact - Negative (onboardingState issue)
Response Status Code Should Equal 409
Log Received 409 Conflict as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
POST VNF Package Artifact - (Method not implemented)
......@@ -103,11 +107,6 @@ 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
PUT VNF Package Artifact - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -117,26 +116,15 @@ 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
PATCH VNF Package Artifact - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Set Request Header Accept ${ACCEPT_JSON}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Http Request "PATCH" ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/artifacts/{artifactPath}
#PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/artifacts/{artifactPath}
Http Request 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
DELETE VNF Package Artifact - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
......@@ -146,8 +134,3 @@ 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
......@@ -53,9 +53,10 @@ GET VNF Package Content - Negative Range
Response Status Code Should Equal 416
Log Received 416 Range not satisfiable as expected.
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET VNF Package Content - Negative (Not Found)
......@@ -67,9 +68,10 @@ GET VNF Package Content - Negative (Not Found)
Response Status Code Should Equal 404
Log Received 404 Not Found as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET VNF Package Content - Negative (Unauthorized: Wrong Token)
......@@ -82,9 +84,10 @@ GET VNF Package Content - Negative (Unauthorized: Wrong Token)
Response Status Code Should Equal 401
Log Received 401 Unauthorized as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET VNF Package Content - Negative (onboardingState issue)
......@@ -96,9 +99,10 @@ GET VNF Package Content - Negative (onboardingState issue)
Response Status Code Should Equal 409
Log Received 409 Conflict as expected
${problemDetails}= Get Response Body
${json}= evaluate json.loads('''${problemDetails}''') json
Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
POST VNF Package Content - (Method not implemented)
......@@ -109,11 +113,6 @@ 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
PUT VNF Package Content - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
......@@ -123,26 +122,15 @@ 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
PATCH VNF Package Content - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA}
Set Request Header Accept ${ACCEPT_JSON}
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
Http Request "PATCH" ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
#PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Http Request 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
DELETE VNF Package Content - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
......@@ -152,8 +140,3 @@ 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
......@@ -13,10 +13,11 @@ GET all Packages
Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
Response Status Code Should Equal 200
${vnfPkgInfos}= Get Response Body