diff --git a/SOL003/VNFPackageManagement-API_nxw/IndividualSubscription.robot b/SOL003/VNFPackageManagement-API_nxw/IndividualSubscription.robot index 2dd72876a0bc70132ba34165952d5341205a1938..ee36ae80b1064022dde83f7d05678b0eb15253e9 100644 --- a/SOL003/VNFPackageManagement-API_nxw/IndividualSubscription.robot +++ b/SOL003/VNFPackageManagement-API_nxw/IndividualSubscription.robot @@ -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 diff --git a/SOL003/VNFPackageManagement-API_nxw/IndividualVNFPackage.robot b/SOL003/VNFPackageManagement-API_nxw/IndividualVNFPackage.robot index 640833471a46f71ceb90af62fbcc651e8bd5ff7d..5e95a31906f45765283764a716673a0e1d9d001d 100644 --- a/SOL003/VNFPackageManagement-API_nxw/IndividualVNFPackage.robot +++ b/SOL003/VNFPackageManagement-API_nxw/IndividualVNFPackage.robot @@ -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 diff --git a/SOL003/VNFPackageManagement-API_nxw/Subscriptions.robot b/SOL003/VNFPackageManagement-API_nxw/Subscriptions.robot index a3780ea0561990f59dd6b73a9e2ed68364aa05ec..67aed17a9230003e4979a52606428debab9b8e77 100644 --- a/SOL003/VNFPackageManagement-API_nxw/Subscriptions.robot +++ b/SOL003/VNFPackageManagement-API_nxw/Subscriptions.robot @@ -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 diff --git a/SOL003/VNFPackageManagement-API_nxw/VNFDInIndividualVNFPackage.robot b/SOL003/VNFPackageManagement-API_nxw/VNFDInIndividualVNFPackage.robot index 819da448d2bc704abe5665ba3e8e3beb06138cd1..4f19ff4f7b2753844ed2f88ada2b19054365a5cf 100644 --- a/SOL003/VNFPackageManagement-API_nxw/VNFDInIndividualVNFPackage.robot +++ b/SOL003/VNFPackageManagement-API_nxw/VNFDInIndividualVNFPackage.robot @@ -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 diff --git a/SOL003/VNFPackageManagement-API_nxw/VNFPackageArtifacts.robot b/SOL003/VNFPackageManagement-API_nxw/VNFPackageArtifacts.robot index 09ed0deaa6b4ae265e437b66da323e1b9b45c6a4..e7cca22117ebfbbfa9555e326b395f540469c382 100644 --- a/SOL003/VNFPackageManagement-API_nxw/VNFPackageArtifacts.robot +++ b/SOL003/VNFPackageManagement-API_nxw/VNFPackageArtifacts.robot @@ -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 diff --git a/SOL003/VNFPackageManagement-API_nxw/VNFPackageContent.robot b/SOL003/VNFPackageManagement-API_nxw/VNFPackageContent.robot index 20d1294dd3a4e62505cd55fa1b6448d072597ccb..bcfbe3abe019e64ef9a06fdfaad63c89557f2eda 100644 --- a/SOL003/VNFPackageManagement-API_nxw/VNFPackageContent.robot +++ b/SOL003/VNFPackageManagement-API_nxw/VNFPackageContent.robot @@ -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 diff --git a/SOL003/VNFPackageManagement-API_nxw/VNFPackages.robot b/SOL003/VNFPackageManagement-API_nxw/VNFPackages.robot index 2a5a467290607b41b2d82495c3bfd23c4c8eba20..ac2367e1ebef366b73ae0f4042490a17109bf755 100644 --- a/SOL003/VNFPackageManagement-API_nxw/VNFPackages.robot +++ b/SOL003/VNFPackageManagement-API_nxw/VNFPackages.robot @@ -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 + ${result}= Get Response Body + ${json}= evaluate json.loads('''${result}''') json Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON} Log Trying to validate response - Validate Json vnfPkgInfo.schema.json ${vnfPkgInfos} + Validate Json vnfPkgInfo.schema.json ${json} Log Validation OK GET all Packages - Filter @@ -26,10 +27,11 @@ GET all Packages - Filter Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION} GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?${POS_FIELDS} Response Status Code Should Equal 200 - ${vnfPkgInfos}= Get Response Body + ${result}= Get Response Body + ${json}= evaluate json.loads('''${result}''') json Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON} Log Trying to validate response - Validate Json vnfPkgInfo.schema.json ${vnfPkgInfos} + Validate Json vnfPkgInfo.schema.json ${json} Log Validation OK GET all Packages - Negative (wronge filter name) @@ -41,9 +43,10 @@ GET all Packages - Negative (wronge filter name) Response Status Code Should Equal 400 Log Received 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 all Packages - Negative (Unauthorized: Wrong Token) @@ -56,9 +59,10 @@ GET all Packages - 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 all Packages - Negative (Unauthorized: No Token) @@ -71,9 +75,10 @@ GET all Packages - 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 GET all Packages - all_fields @@ -84,20 +89,21 @@ GET all Packages - all_fields GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?all_fields Response Status Code Should Equal 200 ${vnfPkgInfos}= Get Response Body + ${json}= evaluate json.loads('''${vnfPkgInfos}''') json Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON} Log Trying to validate response - Validate Json vnfPkgInfo.schema.json ${vnfPkgInfos} + Validate Json vnfPkgInfo.schema.json ${json} Log Validation OK Log Trying to validate softwareImages schema - ${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages - Validate Json softwareImage.schema.json ${softwareImages} + ${softwareImages}= Get Value From Json ${json} $..softwareImages + Validate Json softwareImage.schema.json ${softwareImages[0]} Log Validation for softwareImage schema OK Log Trying to validate additionalArtifacts schema - ${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts - Validate Json additionalArtifacts.schema.json ${additional_artifacts} + ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]} Log Validation for additionalArtifacts schema OK - ${links}= Get Value From Json ${vnfPkgInfos} $.._links - Validate Json links.schema.json ${links} + ${links}= Get Value From Json ${json} $.._links + Validate Json links.schema.json ${links[0]} Log Validation for _links schema OK GET all Packages - fields @@ -109,17 +115,18 @@ GET all Packages - fields GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?fields=${fields} Response Status Code Should Equal 200 ${vnfPkgInfos}= Get Response Body + ${json}= evaluate json.loads('''${vnfPkgInfos}''') json Response Header Should Equal Content-Type ${CONTENT_TYPE_JSON} Log Trying to validate response, checking vnfPkgInfo and other complex attributes included in the vnfPkgInfo - Validate Json vnfPkgInfo.schema.json ${vnfPkgInfos} + Validate Json vnfPkgInfo.schema.json ${json} Log Validation for vnfPkgInfo OK Log Trying to validate softwareImages schema - ${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages - Validate Json softwareImage.schema.json ${softwareImages} + ${softwareImages}= Get Value From Json ${json} $..softwareImages + Validate Json softwareImage.schema.json ${softwareImages[0]} Log Validation for softwareImage schema OK Log Trying to validate additionalArtifacts schema - ${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts - Validate Json additionalArtifacts.schema.json ${additional_artifacts} + ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]} Log Validation for additionalArtifacts schema OK GET all PACKAGE (Negative: Not found)