diff --git a/SOL002/VNFConfiguration-API/Configuration.robot b/SOL002/VNFConfiguration-API/Configuration.robot index dfcc1368e92a0929eaf59bd9da19cbf172c8b49d..64b565270f02e4ab546f04277e3f0d62884ee676 100644 --- a/SOL002/VNFConfiguration-API/Configuration.robot +++ b/SOL002/VNFConfiguration-API/Configuration.robot @@ -1,16 +1,12 @@ *** Settings *** Resource environments/variables.txt -Library REST ${VNF_SCHEMA}://${VNF_HOST}:${VNF_PORT} +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ... spec=SOL002-VNFConfiguration-API.yaml Library JSONLibrary Library JSONSchemaLibrary schemas/ Library OperatingSystem Library DependencyLibrary -*** Variables *** -${Etag}= an etag -${Etag_modified}= a modified etag - *** Test Cases *** POST Configuration - Method not implemented log Trying to perform a POST. This method should not be implemented diff --git a/SOL002/VNFConfiguration-API/environment/variables.txt b/SOL002/VNFConfiguration-API/environment/variables.txt index dea2180426440ba4aa6dc44dc519534f62590206..b9e960bea074536e7535127d69e9308e80ae8b12 100644 --- a/SOL002/VNFConfiguration-API/environment/variables.txt +++ b/SOL002/VNFConfiguration-API/environment/variables.txt @@ -1,42 +1,13 @@ *** Variables *** -${VNFM_HOST} localhost # Hostname of the VNFM -${VNFM_PORT} 8080 # Listening port of the VNFM -${VNF_HOST} localhost # Hostname of the NFVO -${VNF_PORT} 8081 # Listening port of the NFVO -${VNFM_SCHEMA} https -${VNF_SCHEMA} https +${EM-VNF_HOST} localhost # Hostname of the NFVO +${EM-VNF_PORT} 8081 # Listening port of the NFVO +${EM-VNF_SCHEMA} https +${ACCEPT} application/json +${AUTH_USAGE} 1 ${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== ${CONTENT_TYPE} application/json -${CONTENT_TYPE_PATCH} application/merge-patch+json -${ACCEPT} application/json ${apiRoot} / ${apiName} vnfconfig -${apiVersion} v1 -${AUTH_USAGE} 1 -${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX -${alarm_filter} managedObjectId -${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c -${invalid_alarm_filter} badFilter -${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d -${vnfInstanceDescription} description vnf -${vnfInstanceDescription_Update} Updated description vnf -${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT -${ACCEPT_PLAIN} text/plain -${ACCEPT_ZIP} application/zip -${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c -${ARTIFACT_TYPE} application/octet-stream -${ARTIFACT_ID} artifactId -${WRONG_ACCEPT} application/json -${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d -${CancelMode} GRACEFUL -${LccnSubscriptionRequest} {} -${NVFM_DUPLICATION} 0 -${sub_filter} filter -${sub_filter_invalid} filter_invalid -${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${notification_ep} /notification -${notification_port} 9091 -${AlarmNotification} {} -${AlarmClearedNotification} {} -${AlarmListRebuiltNotification} {} -${PerceivedSeverity} CRITICAL \ No newline at end of file +${apiVersion} v1 +${Etag}= an etag +${Etag_modified}= a modified etag diff --git a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot index 8ca82026e87ce607936f5cfc98a94f116bc845a6..5ef1f23735e4d4234009ac4d946307c2908de897 100644 --- a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot @@ -8,9 +8,6 @@ Library JSONLibrary Library JSONSchemaLibrary schemas/ Library DependencyLibrary -*** Variables *** -${Etag}= an etag -${Etag_modified}= a modified etag *** Test Cases *** POST Alarm - Method not implemented diff --git a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot index 1d5a78aaf8ab78ea6c02932e13b9c166d1798ec8..e377f2661bb01b852000d37b5b097eb52ec82697 100644 --- a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot @@ -5,10 +5,6 @@ Suite Teardown Terminate All Processes kill=true Library MockServerLibrary Library Process Library OperatingSystem -Library REST ${CONSUMER_SCHEMA}://${CONSUMER_HOST}:${notification_port} - -*** Variables *** -${sleep_interval} 20s *** Test Cases *** Deliver a notification - Alarm @@ -16,75 +12,75 @@ Deliver a notification - Alarm ${json}= Get File schemas/alarmNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle alarmNotification - &{req}= Create Mock Request Matcher Schema POST ${notification_ep} body=${BODY} + &{req}= Create Mock Request Matcher Schema POST ${callback_uri} body=${BODY} &{rsp}= Create Mock Response Schema headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Log Verifying results Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${notification_ep} + Clear Requests ${callback_uri} Deliver a notification - Alarm Clearance log The POST method delivers a notification - Information of a VNF alarm. ${json}= Get File schemas/alarmClearedNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle alarmNotification - &{req}= Create Mock Request Matcher Schema POST ${notification_ep} body=${BODY} + &{req}= Create Mock Request Matcher Schema POST ${callback_uri} body=${BODY} &{rsp}= Create Mock Response Schema headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Log Verifying results Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${notification_ep} + Clear Requests ${callback_uri} Deliver a notification - Alarm List Rebuilt log The POST method delivers a notification - Information of a VNF alarm. ${json}= Get File schemas/alarmListRebuiltNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle alarmNotification - &{req}= Create Mock Request Matcher Schema POST ${notification_ep} body=${BODY} + &{req}= Create Mock Request Matcher Schema POST ${callback_endpoint} body=${BODY} &{rsp}= Create Mock Response Schema headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Log Verifying results Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${notification_ep} + Clear Requests ${callback_endpoint} Test a notification end point log The GET method allows the server to test the notification endpoint - &{req}= Create Mock Request Matcher Schema GET ${notification_ep} + &{req}= Create Mock Request Matcher Schema GET ${callback_endpoint} &{rsp}= Create Mock Response Schema headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Verify Mock Expectation ${req} - Clear Requests ${notification_ep} + Clear Requests ${callback_endpoint} PUT notification - Method not implemented log Trying to perform a PUT. This method should not be implemented - Put ${notification_ep} + Put ${callback_endpoint} Log Validate Status code Output response Integer response status 405 PATCH subscriptions - Method not implemented log Trying to perform a PATCH. This method should not be implemented - Patch ${notification_ep} + Patch ${callback_endpoint} Log Validate Status code Output response Integer response status 405 DELETE subscriptions - Method not implemented log Trying to perform a DELETE. This method should not be implemented - Delete ${notification_ep} + Delete ${callback_endpoint} Log Validate Status code Output response Integer response status 405 *** Keywords *** Create Sessions - Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${notification_port} alias=mockInstance + Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${CONSUMER_SCHEMA}://${CONSUMER_HOST}:${notification_port} #The API producer is set to NFVO according to SOL003-7.3.4 \ No newline at end of file + Create Mock Session ${callback_schema}://${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-7.3.4 \ No newline at end of file diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index 7671246a01fa4815d55ea1c47960e0215c9fa0d4..0647a789ceb0c52ad894abada2f4bdf441b92e49 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -27,7 +27,7 @@ Create a new subscription Create a new Subscription - DUPLICATION Log Trying to create a subscription with an already created content - Pass Execution If ${NVFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test + Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL002/VNFFaultManagement-API/environment/variables.txt b/SOL002/VNFFaultManagement-API/environment/variables.txt index 7bba5b601516a377d930d3edb92a0c381f72787d..dbd89e4f5e2a7282ec902ce0532b11176a3bec2e 100644 --- a/SOL002/VNFFaultManagement-API/environment/variables.txt +++ b/SOL002/VNFFaultManagement-API/environment/variables.txt @@ -1,42 +1,34 @@ *** Variables *** ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM -${CONSUMER_HOST} localhost # Hostname of the NFVO -${CONSUMER_PORT} 8081 # Listening port of the NFVO ${VNFM_SCHEMA} https -${CONSUMER_SCHEMA} https ${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== -${CONTENT_TYPE} application/json -${CONTENT_TYPE_PATCH} application/merge-patch+json ${ACCEPT} application/json ${apiRoot} / ${apiName} vnffm -${apiVersion} v1 +${apiVersion} v1 ${AUTH_USAGE} 1 -${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX -${alarm_filter} managedObjectId -${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c -${invalid_alarm_filter} badFilter +${CONTENT_TYPE} application/json + ${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d -${vnfInstanceDescription} description vnf -${vnfInstanceDescription_Update} Updated description vnf -${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT -${ACCEPT_PLAIN} text/plain -${ACCEPT_ZIP} application/zip -${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c -${ARTIFACT_TYPE} application/octet-stream -${ARTIFACT_ID} artifactId -${WRONG_ACCEPT} application/json -${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d -${CancelMode} GRACEFUL -${LccnSubscriptionRequest} {} -${NVFM_DUPLICATION} 0 +${Etag}= an etag +${Etag_modified}= a modified etag +${CONTENT_TYPE_PATCH} application/merge-patch+json + +${PerceivedSeverity} CRITICAL + +${VNFM_DUPLICATION} 0 + ${sub_filter} filter ${sub_filter_invalid} filter_invalid + ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${notification_ep} /notification -${notification_port} 9091 +${sleep_interval} 20s +${callback_schema} http +${callback_uri} localhost +${callback_port} 9091 +${callback_endpoint} /notification + ${AlarmNotification} {} ${AlarmClearedNotification} {} ${AlarmListRebuiltNotification} {} -${PerceivedSeverity} CRITICAL \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/IndividualSubscription.robot b/SOL002/VNFIndicator-API/IndividualSubscription.robot index 81c4e08a8b4025a1c5d4f2cda4894ab634427f48..457c5cee482f94650f2adee82639039643084e07 100644 --- a/SOL002/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL002/VNFIndicator-API/IndividualSubscription.robot @@ -1,15 +1,15 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/individualSubscription.txt Library OperatingSystem -Library REST ${PRODUCER_SCHEMA}://${PRODUCER_HOST}:${PRODUCER_PORT} +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} *** Test Cases *** GET Individual Subscription Log Trying to get a given subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 200 Log Received a 200 OK as expected @@ -24,7 +24,7 @@ GET Individual Subscription GET Subscription - Negative (Not Found) Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} Integer response status 404 Log Received 404 Not Found as expected @@ -39,7 +39,7 @@ GET Subscription - Negative (Not Found) DELETE Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 204 Log Received 204 No Content as expected @@ -47,7 +47,7 @@ DELETE Subscription DELETE Subscription - Negative (Not Found) Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} Integer response status 404 Log The subscriptionId is not present in database @@ -62,7 +62,7 @@ DELETE Subscription - Negative (Not Found) PUT Subscription - (Method not implemented) Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -70,7 +70,7 @@ PUT Subscription - (Method not implemented) PATCH Subscription - (Method not implemented) Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -78,7 +78,7 @@ PATCH Subscription - (Method not implemented) POST Subscription - (Method not implemented) Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 405 Log Received 405 Method not implemented as expected diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index afa22f96af33e36e4e34e6e616b4c2fec0ad7ea3..d7e79091bb0e4114e673950407cc3a31cbf7f994 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -1,14 +1,14 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/individualVnfIndicator.txt -Library REST ${PRODUCER_SCHEMA}://${PRODUCER_HOST}:${PRODUCER_PORT} +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} *** Test Cases *** GET Individual VNF Indicator Log The GET method reads a VNF indicator. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} Integer response status 200 ${contentType}= Output response headers Content-Type @@ -22,7 +22,7 @@ GET Individual VNF Indicator GET Individual VNF Indicator - Negative (Not Found) Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} Integer response status 404 Log Received 404 Not Found as expected @@ -37,7 +37,7 @@ GET Individual VNF Indicator - Negative (Not Found) POST Individual VNF Indicator (Method not implemented) Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -45,7 +45,7 @@ POST Individual VNF Indicator (Method not implemented) PUT Individual VNF Indicator (Method not implemented) Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -53,7 +53,7 @@ PUT Individual VNF Indicator (Method not implemented) PATCH Individual VNF Indicator (Method not implemented) Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -61,7 +61,7 @@ PATCH Individual VNF Indicator (Method not implemented) DELETE Individual VNF Indicator (Method not implemented) Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} Integer response status 405 Log Received 405 Method not implemented as expected diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index 4af16ecb1259195065d5e96b315133ff2fd02e72..4e28c6625eafee5f9ccee8eb83a83304274fdeb6 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -1,16 +1,16 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/subscriptions.txt Library OperatingSystem Library JSONLibrary -Library REST ${PRODUCER_SCHEMA}://${PRODUCER_HOST}:${PRODUCER_PORT} +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} *** Test Cases *** GET Subscription Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 200 Log Received a 200 OK as expected @@ -24,7 +24,7 @@ GET Subscription GET Subscription - Filter Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${POS_FILTER} Integer response status 200 ${contentType}= Output response headers Content-Type @@ -38,7 +38,7 @@ GET Subscription - Filter GET Subscription - Negative Filter Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${NEG_FILTER} Integer response status 400 Log Received a 400 Bad Request as expected @@ -53,7 +53,7 @@ GET Subscription - Negative Filter GET Subscription - Negative (Not Found) Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscription Integer response status 404 Log Received 404 Not Found as expected @@ -70,7 +70,7 @@ POST Subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File json/subscriptions.json - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Integer response status 201 Log Received 201 Created as expected @@ -85,7 +85,7 @@ POST Subscription PUT Subscription - (Method not implemented) Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 405 Log Received 405 Method not implemented as expected @@ -93,7 +93,7 @@ PUT Subscription - (Method not implemented) PATCH Subscription - (Method not implemented) Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 405 Log Received 405 Method not implemented as expected @@ -101,7 +101,7 @@ PATCH Subscription - (Method not implemented) DELETE Subscription - (Method not implemented) Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${PRODUCER_AUTH_USAGE} == 1 Set Headers {"Authorization": "${PRODUCER_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 405 Log Received 405 Method not implemented as expected diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index 35a024dd3c77175098f79d5da45a22f212132d8f..8bcfd9a382959353e317e45eeb99e08f62d1df72 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This clause defines all the resources and methods provided by the VNF Indicator interface. \ Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library JSONLibrary Resource environment/vnfIndicators.txt Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 7ffc7dff815a5de2c4fd36e53fc8bd4b3b667655..8ca81017bb9c306b63265588cdd74089211b5713 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This resource represents VNF indicators related to a VNF instance. The client can use this resource to query multiple VNF indicators that are related to a particular VNF instance. Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/vnfIndicatorinVnfInstance.txt Library JSONLibrary Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} diff --git a/SOL002/VNFIndicator-API/environment/generic.txt b/SOL002/VNFIndicator-API/environment/variables.txt similarity index 58% rename from SOL002/VNFIndicator-API/environment/generic.txt rename to SOL002/VNFIndicator-API/environment/variables.txt index 1facbe84ce5ef2453115527647f9a05950741f2d..6b3ba9427c5a847aa7935ea030a9213c4bebd9dc 100644 --- a/SOL002/VNFIndicator-API/environment/generic.txt +++ b/SOL002/VNFIndicator-API/environment/variables.txt @@ -1,18 +1,12 @@ *** Variables *** -${PRODUCER_HOST} localhost # Hostname of the NFVO -${PRODUCER_PORT} 8081 # Listening port of the NFVO -${PRODUCER_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${CONTENT_TYPE_JSON} application/json +${EM-VNF_HOST} localhost +${EM-VNF_PORT} 8002 +${EM-VNF_SCHEMA} https ${ACCEPT_JSON} application/json -${apiRoot} / ${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken +${apiRoot} / ${apiVersion} v1 ${apiName} vnfind -${FIELD_USAGE} 1 -${PRODUCER_AUTHENTICATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 -${PRODUCER_AUTH_USAGE} 1 -${EM-VNF_HOST} localhost -${EM-VNF_PORT} 8002 -${EM-VNF_SCHEMA} https +${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${NEG_AUTHORIZATION} Bearer negativetoken +${CONTENT_TYPE_JSON} application/json diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot index 3a05017125f095f3101ae53347eab3b77cb87560..a4ade7a2f21abf5c909e2bda8e1f4b76a2aa84f8 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -11,10 +11,6 @@ Documentation This resource represents an individual VNF instance. The client ... underlying VNF instance, and to read information about the VNF instance. Suite Setup Check resource existance -*** Variables *** -${Etag}= an etag -${Etag_modified}= a modified etag - *** Test Cases *** Post Individual VNFInstance - Method not implemented Log Trying to perform a POST. This method should not be implemented diff --git a/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot b/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot index 662897f492b332a6f58c4a8cbc9f922392675b4c..f9591fd9df8ace5e174cb982a8bae3dfabfbbdf2 100644 --- a/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot @@ -5,7 +5,6 @@ Resource environment/variables.txt Library MockServerLibrary Library Process Library OperatingSystem -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${notification_port} *** Variables *** ${sleep_interval} 20s @@ -16,75 +15,75 @@ Deliver a notification - Operation Occurence ${json}= Get File schemas/vnfLcmOperationOccurrenceNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher Schema POST ${notification_ep} body=${BODY} + &{req}= Create Mock Request Matcher Schema POST ${callback_endpoint} body=${BODY} &{rsp}= Create Mock Response Schema headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Log Verifying results Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${notification_ep} + Clear Requests ${callback_endpoint} Deliver a notification - Id Creation log The POST method delivers a notification from the server to the client. ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher Schema POST ${notification_ep} body=${BODY} + &{req}= Create Mock Request Matcher Schema POST ${callback_endpoint} body=${BODY} &{rsp}= Create Mock Response Schema headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Log Verifying results Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${notification_ep} + Clear Requests ${callback_endpoint} Deliver a notification - Id deletion log The POST method delivers a notification from the server to the client. ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher Schema POST ${notification_ep} body=${BODY} + &{req}= Create Mock Request Matcher Schema POST ${callback_endpoint} body=${BODY} &{rsp}= Create Mock Response Schema headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Log Verifying results Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${notification_ep} + Clear Requests ${callback_endpoint} Test a notification end point log The GET method allows the server to test the notification endpoint - &{req}= Create Mock Request Matcher Schema GET ${notification_ep} + &{req}= Create Mock Request Matcher Schema GET ${callback_endpoint} &{rsp}= Create Mock Response Schema headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Verify Mock Expectation ${req} - Clear Requests ${notification_ep} + Clear Requests ${callback_endpoint} PUT notification - Method not implemented log Trying to perform a PUT. This method should not be implemented - Put ${notification_ep} + Put ${callback_endpoint} Log Validate Status code Output response Integer response status 405 PATCH subscriptions - Method not implemented log Trying to perform a PATCH. This method should not be implemented - Patch ${notification_ep} + Patch ${callback_endpoint} Log Validate Status code Output response Integer response status 405 DELETE subscriptions - Method not implemented log Trying to perform a DELETE. This method should not be implemented - Delete ${notification_ep} + Delete ${callback_endpoint} Log Validate Status code Output response Integer response status 405 *** Keywords *** Create Sessions - Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${notification_port} alias=mockInstance + Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${NFVO_SCHEMA}://${NFVO_HOST}:${notification_port} #The API producer is set to NFVO according to SOL003-5.3.9 \ No newline at end of file + Create Mock Session ${callback_schema}://${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-5.3.9 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot index 3e669983c1ea2317537fcde4fbf373ae281fce84..6987af290d275562f286ef6ec06f63cd21e735bf 100644 --- a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot @@ -27,7 +27,7 @@ Create a new subscription Create a new Subscription - DUPLICATION Log Trying to create a subscription with an already created content - Pass Execution If ${NVFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test + Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -44,7 +44,7 @@ Create a new Subscription - DUPLICATION Create a new Subscription - NO-DUPLICATION Log Trying to create a subscription with an already created content - Pass Execution If ${NVFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test + Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index 8ff721abee4a6a6e7a489007ffa090ce229602e9..3f80b8492e2cdf74551e75a759799f7504795906 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -1,38 +1,32 @@ *** Variables *** ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM -${NFVO_HOST} localhost # Hostname of the NFVO -${NFVO_PORT} 8081 # Listening port of the NFVO ${VNFM_SCHEMA} https -${NFVO_SCHEMA} https ${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTH_USAGE} 1 +${CancelMode} GRACEFUL +${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${CONTENT_TYPE} application/json -${CONTENT_TYPE_PATCH} application/merge-patch+json ${ACCEPT} application/json -${apiRoot} / -${apiName} vnflcm -${apiVersion} v1 -${AUTH_USAGE} 1 -${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX ${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${vnfInstanceName} Test-VnfInstance -${vnfInstanceDescription} description vnf -${vnfInstanceDescription_Update} Updated description vnf -${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT -${ACCEPT_PLAIN} text/plain -${ACCEPT_ZIP} application/zip -${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c -${ARTIFACT_TYPE} application/octet-stream -${ARTIFACT_ID} artifactId -${WRONG_ACCEPT} application/json -${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d -${CancelMode} GRACEFUL -${NVFM_DUPLICATION} 0 -${sub_filter} filter -${sub_filter_invalid} filter_invalid +${CONTENT_TYPE_PATCH} application/merge-patch+json ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${notification_ep} /notification -${notification_port} 9091 + +${callback_endpoint} /notification +${callback_port} 9091 +${callback_schema} http +${callback_uri} localhost + +${VNFM_DUPLICATION} 0 + +${Etag}= an etag +${Etag_modified}= a modified etag + +${apiRoot} / +${apiName} vnflcm +${apiVersion} v1 + + ${VnfLcmOperationOccurrenceNotification} {} ${VnfIdentifierCreationNotification} {} -${VnfIdentifierDeletionNotification} {} \ No newline at end of file +${VnfIdentifierDeletionNotification} {} diff --git a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot index c876be05e9d0f86a784832ad63025f98622e7336..fbc64d769588f6de59fad9cd8d104afb976a067b 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library JSONLibrary Resource environment/IndividualPmJob.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} @@ -9,7 +9,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} GET Individual PM Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} Integer response status 200 ${contentType}= Output response headers Content-Type @@ -23,7 +23,7 @@ GET Individual PM Job GET Individual PM Job - Negative (Not Found) Log Trying to perform a negative get, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} Integer response status 404 Log Received 404 Not Found as expected @@ -38,7 +38,7 @@ GET Individual PM Job - Negative (Not Found) DELETE Individual PM Job Log Trying to delete an existing PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} Integer response status 204 Log Received 204 No Content as expected @@ -46,7 +46,7 @@ DELETE Individual PM Job DELETE Individual PM Job - Negative (Not Found) Log Trying to delete an existing PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} Integer response status 404 Log Received 204 No Content as expected @@ -54,7 +54,7 @@ DELETE Individual PM Job - Negative (Not Found) POST Individual PM Job - (Method not implemented) Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -62,7 +62,7 @@ POST Individual PM Job - (Method not implemented) PUT Individual PM Job - (Method not implemented) Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -70,7 +70,7 @@ PUT Individual PM Job - (Method not implemented) PATCH Individual PM Job - (Method not implemented) Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} Integer response status 405 Log Received 405 Method not implemented as expected diff --git a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot index 4bb2b37114053a8571485d43442296a725d3b911..e8752ea65c263a9e1382e80c3bf611c15e65b5cc 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot @@ -6,7 +6,7 @@ Documentation This resource represents an individual performance report that ... It is determined by means outside the scope of the present document, such as configuration or policy, how long an ... individual performance report is available. Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/reports.txt Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} @@ -17,7 +17,7 @@ GET Report on Single PM Job ... This method shall follow the provisions specified in the tables 6.4.4.3.2-1 and 6.4.4.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} Integer response status 200 ${contentType}= Output response headers Content-Type @@ -32,7 +32,7 @@ GET Report on Single PM Job - Negative (Not Found) ... This method shall follow the provisions specified in the tables 6.4.4.3.2-1 and 6.4.4.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} Integer response status 404 Log Received 404 Not Found as expected @@ -45,7 +45,7 @@ GET Report on Single PM Job - Negative (Not Found) POST Reports - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -53,7 +53,7 @@ POST Reports - (Method not implemented) PUT Reports - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -61,7 +61,7 @@ PUT Reports - (Method not implemented) PATCH Reports - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -69,7 +69,7 @@ PATCH Reports - (Method not implemented) DELETE Reports - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} Integer response status 405 Log Received 405 Method not implemented as expected diff --git a/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot b/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot index 6bb132ddce85a7c0d6bb8d6fcb499fc8a7ffbb28..09444c6be00b311a0a191c157db2ff40c65d15af 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot @@ -2,7 +2,7 @@ Documentation This resource represents subscriptions. The client can use this resource to subscribe to notifications related to VNF ... performance management and to query its subscriptions. Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary @@ -15,7 +15,7 @@ GET Individual Subscription ... This method shall follow the provisions specified in the tables 6.4.8.3.2-1 and 6.4.8.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 200 Log Received a 200 OK as expected @@ -32,7 +32,7 @@ GET Individual Subscription - Negative (Not Found) ... This method shall follow the provisions specified in the tables 6.4.8.3.2-1 and 6.4.8.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}" + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} Integer response status 404 Log Received a 404 Not found as expected @@ -46,7 +46,7 @@ GET Individual Subscription - Negative (Not Found) POST Individual Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -54,7 +54,7 @@ POST Individual Subscription - (Method not implemented) PUT Individual Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -62,7 +62,7 @@ PUT Individual Subscription - (Method not implemented) PATCH Individual Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 405 Log Received 405 Method not implemented as expected @@ -72,7 +72,7 @@ DELETE Individual Subscription - (Method not implemented) ... This method shall follow the provisions specified in the tables 6.4.8.3.5-1 and 6.4.8.3.5-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}" + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 204 Log Received a 204 No Content as expected diff --git a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot index 108fc481f7a6bfc2a336e3ff4ac40d90962392ca..bb52856ef3e406ae2fa44143bdc0085f5f26836b 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This resource represents an individual threshold. Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem @@ -13,7 +13,7 @@ GET Individual Threshold ... This method shall follow the provisions specified in the tables 6.4.5.3.2-1 and 6.4.5.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} Integer response status 200 ${contentType}= Output response headers Content-Type @@ -28,7 +28,7 @@ GET Individual Threshold - Negative (Not Found) ... This method shall follow the provisions specified in the tables 6.4.5.3.2-1 and 6.4.5.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} Integer response status 404 Log Received 404 Not Found as expected @@ -42,7 +42,7 @@ DELETE Individual Threshold [Documentation] This method allows to delete a threshold. ... This method shall follow the provisions specified in the tables 6.4.6.3.5-1, and 6.4.6.3.5-2 for URI query parameters, ... request and response data structures, and response codes. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} Integer response status 204 Log Received 204 No Content as expected @@ -54,7 +54,7 @@ DELETE Individual Threshold - Negative (Not Found) [Documentation] This method allows to delete a threshold. ... This method shall follow the provisions specified in the tables 6.4.6.3.5-1, and 6.4.6.3.5-2 for URI query parameters, ... request and response data structures, and response codes. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} Integer response status 404 Log Received 404 Not Found as expected @@ -66,7 +66,7 @@ DELETE Individual Threshold - Negative (Not Found) POST Individual Threshold - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 Log Received 405 Method not implemented as expected @@ -74,7 +74,7 @@ POST Individual Threshold - (Method not implemented) PUT Individual Threshold - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 Log Received 405 Method not implemented as expected @@ -82,7 +82,7 @@ PUT Individual Threshold - (Method not implemented) PATCH Individual Threshold - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 Log Received 405 Method not implemented as expected diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index 980222dcadb53a1199116ded2bc39d1cf8cf35b1..b7fa8f70f527a047d2f4902823ce6fb9fc8924b7 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library OperatingSystem Resource environment/pmJobs.txt @@ -10,7 +10,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} GET all Pm Jobs Log Trying to get all PM Jobs present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs Integer response status 200 ${contentType}= Output response headers Content-Type @@ -28,7 +28,7 @@ GET all Pm Jobs GET all Pm Jobs - Filter Log Trying to get all PM Jobs present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${POS_FILTER} Integer response status 200 ${contentType}= Output response headers Content-Type @@ -42,7 +42,7 @@ GET all Pm Jobs - Filter GET all Pm Jobs - all_fields Log Trying to get all PM Jobs present in the VNFM, using 'all_fields' filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?all_fields Integer response status 200 ${contentType}= Output response headers Content-Type @@ -68,7 +68,7 @@ GET all Pm Jobs - all_fields GET all Pm Jobs - exclude_default Log Trying to get all VNF Packages present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?exclude_default Integer response status 200 ${contentType}= Output response headers Content-Type @@ -87,7 +87,7 @@ GET all Pm Jobs - fields Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELDS_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields} Integer response status 200 ${contentType}= Output response headers Content-Type @@ -110,7 +110,7 @@ GET all Pm Jobs - exclude_fields Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELDS_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields} Integer response status 200 ${contentType}= Output response headers Content-Type @@ -132,7 +132,7 @@ GET all Pm Jobs - exclude_fields GET all Pm Jobs - Negative (wronge filter name) Log Trying to get all PM Jobs present in the VNFM, using an erroneous filter param Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${NEG_FILTER} Integer response status 400 Log Received 400 Bad Request as expected @@ -147,7 +147,7 @@ GET all Pm Jobs - Negative (wronge filter name) GET all Pm Jobs (Negative: Not found) Log Trying to perform a GET on a erroneous URI Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_job # wrong URI /pm_job instead of /pm_jobs Integer response status 404 Log Received 404 Not Found as expected @@ -163,7 +163,7 @@ POST all PM Jobs - Create new PM Job Log Creating a new PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${body}= Get File jsons/CreatePmJobRequest.json POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} Integer response status 201 @@ -179,7 +179,7 @@ POST all PM Jobs - Create new PM Job PUT all PM Jobs - (Method not implemented) Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs Integer response status 405 Log Received 405 Method not implemented as expected @@ -187,7 +187,7 @@ PUT all PM Jobs - (Method not implemented) PATCH all Pm Jobs - (Method not implemented) Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs Integer response status 405 Log Received 405 Method not implemented as expected @@ -195,7 +195,7 @@ PATCH all Pm Jobs - (Method not implemented) DELETE all Pm Jobs - (Method not implemented) Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs Integer response status 405 Log Received 405 Method not implemented as expected diff --git a/SOL002/VNFPerformanceManagement-API/Subscriptions.robot b/SOL002/VNFPerformanceManagement-API/Subscriptions.robot index bdbdfb6bd206a21da5d6edc12724f96872ba45cf..5810808bb636e4f2a4ec3cc21c9cafa4e9f6ec79 100644 --- a/SOL002/VNFPerformanceManagement-API/Subscriptions.robot +++ b/SOL002/VNFPerformanceManagement-API/Subscriptions.robot @@ -2,7 +2,7 @@ Documentation This resource represents subscriptions. The client can use this resource to subscribe to notifications related to VNF ... performance management and to query its subscriptions. Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary @@ -15,7 +15,7 @@ GET Subscription ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 200 Log Received a 200 OK as expected @@ -32,7 +32,7 @@ GET Subscription - Filter ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} Integer response status 200 Log Received a 200 OK as expected @@ -49,7 +49,7 @@ GET Subscription - Negative Filter (Erroneous filter) ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} Integer response status 400 Log Received a 400 Bad Request as expected @@ -66,7 +66,7 @@ GET Subscription - Negative (Not Found) ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscription Integer response status 404 Log Received a 404 Not found as expected @@ -89,7 +89,7 @@ POST Subscription ... referencing the existing subscription resource with the same filter and callbackUri). Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} ${body_request}= Get File jsons/subscriptions.json POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} Integer response status 201 @@ -117,7 +117,7 @@ POST Subscription - DUPLICATION Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM is permitting duplication. Skipping the test Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} ${body_request}= Get File jsons/subscriptions.json POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} Integer response status 303 @@ -144,7 +144,7 @@ POST Subscription - NO DUPLICATION Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} ${body_request}= Get File jsons/subscriptions.json POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} Integer response status 201 @@ -162,7 +162,7 @@ POST Subscription - NO DUPLICATION PUT Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 405 Log Received 405 Method not implemented as expected @@ -170,7 +170,7 @@ PUT Subscription - (Method not implemented) PATCH Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 405 Log Received 405 Method not implemented as expected @@ -178,7 +178,7 @@ PATCH Subscription - (Method not implemented) DELETE Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 405 Log Received 405 Method not implemented as expected diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index e8767c8e804fb03dd39b60cf13142bd580bd8ac5..23a82a8bae7b8eb60782abd0f2057815547f7f20 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This resource represents thresholds. The client can use this resource to create and query thresholds. Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Resource environment/thresholds.txt @@ -13,7 +13,7 @@ GET Thresholds ... This method shall follow the provisions specified in the tables 6.4.5.3.2-1 and 6.4.5.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 200 ${contentType}= Output response headers Content-Type @@ -28,7 +28,7 @@ GET Thresholds - Filter ... This method shall follow the provisions specified in the tables 6.4.5.3.2-1 and 6.4.5.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK} Integer response status 200 ${contentType}= Output response headers Content-Type @@ -43,7 +43,7 @@ GET Thresholds - NEGATIVE Filter ... This method shall follow the provisions specified in the tables 6.4.5.3.2-1 and 6.4.5.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} Integer response status 400 ${result}= Output response body @@ -56,7 +56,7 @@ GET Thresholds - Negative (Not Found) ... This method shall follow the provisions specified in the tables 6.4.5.3.2-1 and 6.4.5.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": ${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/threshold Integer response status 404 Log Received 404 Not Found as expected @@ -70,7 +70,7 @@ POST Threshold Request [Documentation] The POST method can be used by the client to create a threshold. ... This method shall follow the provisions specified in the tables 6.4.5.3.1-1 and 6.4.5.3.1-2 for URI query parameters, ... request and response data structures, and response codes. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${request}= Get File jsons/CreateThresholdRequest.json @@ -88,7 +88,7 @@ POST Threshold Request PUT Reports - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 Log Received 405 Method not implemented as expected @@ -96,7 +96,7 @@ PUT Reports - (Method not implemented) PATCH Reports - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 Log Received 405 Method not implemented as expected @@ -104,7 +104,7 @@ PATCH Reports - (Method not implemented) DELETE Reports - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. - Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 Log Received 405 Method not implemented as expected diff --git a/SOL002/VNFPerformanceManagement-API/environment/generic.txt b/SOL002/VNFPerformanceManagement-API/environment/generic.txt deleted file mode 100644 index 4f4b01943e95cea8574fb7e33af3b9690858ab30..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/environment/generic.txt +++ /dev/null @@ -1,19 +0,0 @@ -*** Variables *** -${VNFM_HOST} localhost # Hostname of the VNFM -${VNFM_PORT} 8080 # Listening port of the VNFM -${NFVO_HOST} localhost # Hostname of the NFVO -${NFVO_PORT} 8081 # Listening port of the NFVO -${VNFM_SCHEMA} https -${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${CONTENT_TYPE_JSON} application/json -${ACCEPT_JSON} application/json -${apiRoot} / -${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken -${apiVersion} v1 -${apiName} vnfpm -${FIELD_USAGE} 1 -${VNFM_AUTHENTICATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 -${VNFM_AUTH_USAGE} 1 -${VNFM_DUPLICATION} 1 diff --git a/SOL002/VNFPerformanceManagement-API/environment/variables.txt b/SOL002/VNFPerformanceManagement-API/environment/variables.txt new file mode 100644 index 0000000000000000000000000000000000000000..df8e5c4ac9e7d10e0e244af7d362ed1d44707262 --- /dev/null +++ b/SOL002/VNFPerformanceManagement-API/environment/variables.txt @@ -0,0 +1,6 @@ +*** Variables *** +${callback_uri} http://localhost +${callback_port} 9091 +${callback_endpoint} /endpoint +${callback_endpoint_error} /endpoint_404 +${sleep_interval} 20s \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot b/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot index 8662ae0063c0032c7dafdc15ca1931888148cacb..aeaf91d6ecf1ad51fed8338225ed354d5a8efc18 100644 --- a/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot +++ b/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot @@ -1,5 +1,5 @@ *** Setting *** -Resource environment/generic.txt +Resource environment/variables.txt Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true Library MockServerLibrary diff --git a/SOL002/VNFPerformanceManagementNotification-API/environment/generic.txt b/SOL002/VNFPerformanceManagementNotification-API/environment/variables.txt similarity index 100% rename from SOL002/VNFPerformanceManagementNotification-API/environment/generic.txt rename to SOL002/VNFPerformanceManagementNotification-API/environment/variables.txt