Loading SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot +20 −3 Original line number Diff line number Diff line Loading @@ -5,6 +5,11 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library String Library MockServerLibrary Library Process Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET individual VNF Performance Job Loading Loading @@ -126,6 +131,11 @@ PATCH Individual VNF Performance Job - Unprocessable Entity *** Keywords *** Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} GET individual VNF Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} Loading Loading @@ -182,10 +192,17 @@ Send Patch request for individual VNF Performance Job Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModifications.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} 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 request Create Mock Expectation ${notification_request} ${notification_response} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Send Patch request for individual VNF Performance Job - Etag mismatch Set Headers {"Accept":"${ACCEPT_JSON}"} Loading @@ -193,7 +210,7 @@ Send Patch request for individual VNF Performance Job - Etag mismatch Set Headers {"If-Match": "${invalid_etag}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModifications.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Loading @@ -204,7 +221,7 @@ Send Patch request for individual VNF Performance Job with unprocessable entity Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModifications.json ${body}= Format String ${template} callback_uri=${unreachable_callback_uri}:${callback_port} ${body}= Format String ${template} callback_uri=${unreachable_callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Loading SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot +18 −2 Original line number Diff line number Diff line Loading @@ -5,6 +5,11 @@ Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library String Library Process Library MockServerLibrary Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET Individual Threshold Loading Loading @@ -125,6 +130,11 @@ PATCH Individual Threshold - Unprocessible Entity *** Keywords *** Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} Loading Loading @@ -180,9 +190,16 @@ Send Patch request for individual VNF Performance Threshold Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/ThresholdModifications.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${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 request Create Mock Expectation ${notification_request} ${notification_response} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Send Patch request for individual VNF Performance Threshold - Etag mismatch Log Trying to PUT threshold Loading @@ -196,14 +213,13 @@ Send Patch request for individual VNF Performance Threshold - Etag mismatch ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Threshold with unprocessable entity Log Trying to PATCH threshold Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/ThresholdModifications.json ${body}= Format String ${template} callback_uri=${unreachable_callback_uri}:${callback_port} ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Loading SOL003/VNFPerformanceManagement-API/PMJobs.robot +18 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,11 @@ Library OperatingSystem Library String Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library MockServerLibrary Library Process Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET all VNF Performance Monitoring Jobs Loading Loading @@ -234,6 +239,11 @@ POST Create new VNF Performance Monitoring Job - Unprocessable Entity Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} GET all VNF Performance Monitoring Jobs Log Trying to get all PM Jobs present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} Loading Loading @@ -335,10 +345,17 @@ Send Post Request Create new VNF Performance Monitoring Job Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/CreatePmJobRequest.json ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri} callback_port=${callback_port} 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 request Create Mock Expectation ${notification_request} ${notification_response} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} ${output}= Output response Set Suite Variable ${response} ${output} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Send PUT Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Loading SOL003/VNFPerformanceManagement-API/Thresholds.robot +19 −3 Original line number Diff line number Diff line Loading @@ -5,6 +5,11 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library Process Library MockServerLibrary Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET All Performance Thresholds Loading Loading @@ -151,6 +156,11 @@ POST create new Performance Threshold - Unprocessable Entity Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} Loading Loading @@ -200,11 +210,17 @@ Send Post Request Create new Performance Threshold with unprocessable entity Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/CreateThresholdRequest.json ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${unreachable_callback_uri}:${callback_port} POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${body} ${request}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${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 request Create Mock Expectation ${notification_request} ${notification_response} POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${request} ${output}= Output response Set Suite Variable ${response} ${output} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Send PUT Request for all Performance Thresholds Log PUT THresholds Loading SOL003/VNFPerformanceManagement-API/environment/variables.txt +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ ${apiMajorVersion} v1 ${apiName} vnfpm ${callback_port} 9091 ${callback_uri} http://172.22.1.7:${callback_port} ${callback_uri} http://172.22.1.7 ${unreachable_callback_uri} http://not-reachable-uri ${callback_endpoint} /vnfpm/subscriptions ${callback_endpoint_error} /subs_404 Loading Loading
SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot +20 −3 Original line number Diff line number Diff line Loading @@ -5,6 +5,11 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library String Library MockServerLibrary Library Process Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET individual VNF Performance Job Loading Loading @@ -126,6 +131,11 @@ PATCH Individual VNF Performance Job - Unprocessable Entity *** Keywords *** Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} GET individual VNF Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} Loading Loading @@ -182,10 +192,17 @@ Send Patch request for individual VNF Performance Job Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModifications.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} 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 request Create Mock Expectation ${notification_request} ${notification_response} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Send Patch request for individual VNF Performance Job - Etag mismatch Set Headers {"Accept":"${ACCEPT_JSON}"} Loading @@ -193,7 +210,7 @@ Send Patch request for individual VNF Performance Job - Etag mismatch Set Headers {"If-Match": "${invalid_etag}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModifications.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Loading @@ -204,7 +221,7 @@ Send Patch request for individual VNF Performance Job with unprocessable entity Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModifications.json ${body}= Format String ${template} callback_uri=${unreachable_callback_uri}:${callback_port} ${body}= Format String ${template} callback_uri=${unreachable_callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Loading
SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot +18 −2 Original line number Diff line number Diff line Loading @@ -5,6 +5,11 @@ Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library String Library Process Library MockServerLibrary Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET Individual Threshold Loading Loading @@ -125,6 +130,11 @@ PATCH Individual Threshold - Unprocessible Entity *** Keywords *** Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} Loading Loading @@ -180,9 +190,16 @@ Send Patch request for individual VNF Performance Threshold Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/ThresholdModifications.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${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 request Create Mock Expectation ${notification_request} ${notification_response} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Send Patch request for individual VNF Performance Threshold - Etag mismatch Log Trying to PUT threshold Loading @@ -196,14 +213,13 @@ Send Patch request for individual VNF Performance Threshold - Etag mismatch ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Threshold with unprocessable entity Log Trying to PATCH threshold Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/ThresholdModifications.json ${body}= Format String ${template} callback_uri=${unreachable_callback_uri}:${callback_port} ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Loading
SOL003/VNFPerformanceManagement-API/PMJobs.robot +18 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,11 @@ Library OperatingSystem Library String Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library MockServerLibrary Library Process Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET all VNF Performance Monitoring Jobs Loading Loading @@ -234,6 +239,11 @@ POST Create new VNF Performance Monitoring Job - Unprocessable Entity Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} GET all VNF Performance Monitoring Jobs Log Trying to get all PM Jobs present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} Loading Loading @@ -335,10 +345,17 @@ Send Post Request Create new VNF Performance Monitoring Job Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/CreatePmJobRequest.json ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri} callback_port=${callback_port} 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 request Create Mock Expectation ${notification_request} ${notification_response} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} ${output}= Output response Set Suite Variable ${response} ${output} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Send PUT Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Loading
SOL003/VNFPerformanceManagement-API/Thresholds.robot +19 −3 Original line number Diff line number Diff line Loading @@ -5,6 +5,11 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library Process Library MockServerLibrary Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET All Performance Thresholds Loading Loading @@ -151,6 +156,11 @@ POST create new Performance Threshold - Unprocessable Entity Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} Loading Loading @@ -200,11 +210,17 @@ Send Post Request Create new Performance Threshold with unprocessable entity Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/CreateThresholdRequest.json ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${unreachable_callback_uri}:${callback_port} POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${body} ${request}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${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 request Create Mock Expectation ${notification_request} ${notification_response} POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${request} ${output}= Output response Set Suite Variable ${response} ${output} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Send PUT Request for all Performance Thresholds Log PUT THresholds Loading
SOL003/VNFPerformanceManagement-API/environment/variables.txt +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ ${apiMajorVersion} v1 ${apiName} vnfpm ${callback_port} 9091 ${callback_uri} http://172.22.1.7:${callback_port} ${callback_uri} http://172.22.1.7 ${unreachable_callback_uri} http://not-reachable-uri ${callback_endpoint} /vnfpm/subscriptions ${callback_endpoint_error} /subs_404 Loading