Loading SOL002/VNFFaultManagement-API/Subscriptions.robot +46 −7 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,12 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library OperatingSystem Library JSONLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ Library JSONSchemaLibrary schemas/ Library String Library Process Library MockServerLibrary Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** *** Test Cases *** Create a new subscription Create a new subscription Loading Loading @@ -304,9 +310,19 @@ Post Create subscription Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} Post Create subscription - DUPLICATION Post Create subscription - DUPLICATION Log Trying to create a subscription with an already created content Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 VNFM is not permitting duplication. Skipping the test Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 VNFM is not permitting duplication. Skipping the test Loading @@ -314,9 +330,18 @@ Post Create subscription - DUPLICATION Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} Post Create subscription - NO-DUPLICATION Post Create subscription - NO-DUPLICATION Log Trying to create a subscription with an already created content Log Trying to create a subscription with an already created content Loading @@ -325,9 +350,18 @@ Post Create subscription - NO-DUPLICATION Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} Get subscriptions Get subscriptions Log Get the list of active subscriptions Log Get the list of active subscriptions Loading Loading @@ -504,3 +538,8 @@ Check Response for duplicated subscription Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Status Code Is 201 Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Status Code Is 201 Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Body Json Schema Is FmSubscription Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Body Json Schema Is FmSubscription Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 Check HTTP Response Status Code Is 303 Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 Check HTTP Response Status Code Is 303 Create Sessions Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} SOL002/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json +1 −1 Original line number Original line Diff line number Diff line Loading @@ -6,5 +6,5 @@ ] ] } } }, }, "callbackUri": "http://127.0.0.1/subscribe" "callbackUri": "${callback_uri}:${callback_port}${callback_endpoint}" } } No newline at end of file SOL002/VNFIndicator-API/Subscriptions.robot +12 −6 Original line number Original line Diff line number Diff line Loading @@ -180,11 +180,18 @@ Send Post Request for VNF Indicator Subscription Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File jsons/subscriptions.json ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response ${output}= Output response Set Suite Variable ${response} ${output} Set Global Variable ${response} ${output} Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 Clear Requests ${callback_endpoint} ... Check Notification Endpoint Send Put Request for VNF Indicator Subscriptions Send Put Request for VNF Indicator Subscriptions Log Trying to create a new subscription Log Trying to create a new subscription Loading Loading @@ -251,7 +258,6 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Create Sessions Create Sessions Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not necessary to run Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} Create Mock Session ${callback_uri}:${callback_port} Loading SOL002/VNFIndicator-API/jsons/subscriptions.json +1 −1 Original line number Original line Diff line number Diff line { { "callbackUri": "http://127.0.0.1/subscribe" "callbackUri": "${callback_uri}:${callback_port}${callback_endpoint}" } } No newline at end of file SOL002/VNFLifecycleManagement-API/Subscriptions.robot +3 −0 Original line number Original line Diff line number Diff line Loading @@ -5,6 +5,9 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library OperatingSystem Library JSONLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ Library JSONSchemaLibrary schemas/ Library Process Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** *** Test Cases *** POST Create a new subscription POST Create a new subscription Loading Loading
SOL002/VNFFaultManagement-API/Subscriptions.robot +46 −7 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,12 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library OperatingSystem Library JSONLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ Library JSONSchemaLibrary schemas/ Library String Library Process Library MockServerLibrary Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** *** Test Cases *** Create a new subscription Create a new subscription Loading Loading @@ -304,9 +310,19 @@ Post Create subscription Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} Post Create subscription - DUPLICATION Post Create subscription - DUPLICATION Log Trying to create a subscription with an already created content Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 VNFM is not permitting duplication. Skipping the test Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 VNFM is not permitting duplication. Skipping the test Loading @@ -314,9 +330,18 @@ Post Create subscription - DUPLICATION Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} Post Create subscription - NO-DUPLICATION Post Create subscription - NO-DUPLICATION Log Trying to create a subscription with an already created content Log Trying to create a subscription with an already created content Loading @@ -325,9 +350,18 @@ Post Create subscription - NO-DUPLICATION Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Get File jsons/fmSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} Get subscriptions Get subscriptions Log Get the list of active subscriptions Log Get the list of active subscriptions Loading Loading @@ -504,3 +538,8 @@ Check Response for duplicated subscription Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Status Code Is 201 Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Status Code Is 201 Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Body Json Schema Is FmSubscription Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Body Json Schema Is FmSubscription Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 Check HTTP Response Status Code Is 303 Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 Check HTTP Response Status Code Is 303 Create Sessions Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port}
SOL002/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json +1 −1 Original line number Original line Diff line number Diff line Loading @@ -6,5 +6,5 @@ ] ] } } }, }, "callbackUri": "http://127.0.0.1/subscribe" "callbackUri": "${callback_uri}:${callback_port}${callback_endpoint}" } } No newline at end of file
SOL002/VNFIndicator-API/Subscriptions.robot +12 −6 Original line number Original line Diff line number Diff line Loading @@ -180,11 +180,18 @@ Send Post Request for VNF Indicator Subscription Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File jsons/subscriptions.json ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response ${output}= Output response Set Suite Variable ${response} ${output} Set Global Variable ${response} ${output} Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 Clear Requests ${callback_endpoint} ... Check Notification Endpoint Send Put Request for VNF Indicator Subscriptions Send Put Request for VNF Indicator Subscriptions Log Trying to create a new subscription Log Trying to create a new subscription Loading Loading @@ -251,7 +258,6 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Create Sessions Create Sessions Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not necessary to run Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} Create Mock Session ${callback_uri}:${callback_port} Loading
SOL002/VNFIndicator-API/jsons/subscriptions.json +1 −1 Original line number Original line Diff line number Diff line { { "callbackUri": "http://127.0.0.1/subscribe" "callbackUri": "${callback_uri}:${callback_port}${callback_endpoint}" } } No newline at end of file
SOL002/VNFLifecycleManagement-API/Subscriptions.robot +3 −0 Original line number Original line Diff line number Diff line Loading @@ -5,6 +5,9 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library OperatingSystem Library JSONLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ Library JSONSchemaLibrary schemas/ Library Process Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** *** Test Cases *** POST Create a new subscription POST Create a new subscription Loading