diff --git a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot index 7e39e348e77e070f467d9d65adf25b7eb3ad6cb5..5a84a17476b9bc58dbdae0643085ef324caf5203 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -7,7 +7,6 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library DependencyLibrary - *** Test Cases *** GET individual VNF Performance Job [Documentation] Test ID: 6.3.3.2.1 @@ -96,7 +95,7 @@ PATCH Individual VNF Performance Job ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Send Patch request for individual VNF Performance Job Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PMJobModifications diff --git a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot index 7520167c466ebbe33e0ea4a1acb1489cee56c92c..d68f09617df929956bfa1b6a772e7bcfdc2a6597 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -96,8 +96,7 @@ PATCH Individual Threshold Send Patch request for individual VNF Performance Threshold Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ThresholdModifications - - + PATCH Individual Threshold - Precondition failed [Documentation] Test ID: 6.3.3.5.8 ... Test title: PATCH Individual Threshold - Preconition failed diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index 4552d9ef1e142fa8eb3e3160bd797ecd4e3adbce..78883d7579a691f2e928420310e6587f0a940599 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -195,7 +195,18 @@ GET VNF Performance Monitoring Jobs for Bad Request Response too big Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails - +GET all VNF Performance Monitoring Jobs with exclude_default and fields attribute selector + [Documentation] Test ID: 6.3.3.1.15 + ... Test title: GET all VNF Performance Monitoring Jobs with exclude_default and fields attribute selector + ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs with exclude_default and fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued exclude_default selector + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET VNF Performance Monitoring Jobs with exclude_default and fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs *** Keywords *** GET all VNF Performance Monitoring Jobs Log Trying to get all PM Jobs present in the VNFM @@ -237,6 +248,14 @@ GET VNF Performance Monitoring Jobs with fields attribute selector GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} + +GET VNF Performance Monitoring Jobs with exclude_default and fields attribute selector + Log Trying to get all VNF Packages present in the VNFM, using filter params + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields}&exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with exclude_fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params @@ -268,7 +287,8 @@ Send Post Request Create new VNF Performance Monitoring Job Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/CreatePmJobRequest.json + ${template}= Get File jsons/CreatePmJobRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callbackuri=${callback_uri} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -384,6 +404,4 @@ Check HTTP Response Body Json Schema Is Check LINK in Header ${linkURL}= Get Value From Json ${response['headers']} $..Link - Should Not Be Empty ${linkURL} - - + Should Not Be Empty ${linkURL} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index e3be8ce01eb0431b06609527bee67d718d91c6dc..a0fb710e97b180d3a36cfbc937f2b944b9d453c0 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -176,8 +176,9 @@ Send Post Request Create new Performance Threshold 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 - POST ${apiRoot}/${apiName}/${apiVersion}/thresholds ${request} + ${template}= Get File jsons/CreateThresholdRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri} + POST ${apiRoot}/${apiName}/${apiVersion}/thresholds ${body} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt b/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt index f1675679ea49b7e4deb60fa76129a081f6390f25..7d16002b34c7486c6ce758ff8fa75f0f88538478 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt @@ -1,5 +1,7 @@ +*** Settings *** +Resource variables.txt # Generic Parameters *** Variables *** -${POS_FILTER} objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${POS_FILTER} objectInstanceIds=${objectInstanceIds} ${NEG_FILTER} criteriaPmJob=erroneousAttributeName ${fields} criteria,reports ${response}= httpresponse diff --git a/SOL002/VNFPerformanceManagement-API/environment/variables.txt b/SOL002/VNFPerformanceManagement-API/environment/variables.txt index 1b6fb6dbc341eed0b9e5665f7e3a669ecdb26735..debf7b6a0c67158d528098df2cdd506254a9c144 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/variables.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/variables.txt @@ -23,4 +23,6 @@ ${callback_endpoint_error} /endpoint_404 ${sleep_interval} 20s ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -${response} http-response \ No newline at end of file +${response} http-response + +${objectInstanceIds} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json b/SOL002/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json index 1f34fa20d22293a31973719cde3c5fb9a451385b..587c3fba7a90c832d6dc62fca2c2407108b02fcb 100644 --- a/SOL002/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json +++ b/SOL002/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json @@ -1,10 +1,10 @@ -{ - "objectInstanceIds" : ["1f50d68b-82e8-4deb-bd40-c934d4d1ac0a"], - "criteria" : { +{{ + "objectInstanceIds" : ["{objectInstanceIds}"], + "criteria" : {{ "performanceMetric": [], "performanceMetricGroup": [], "collectionPeriod": 10, "reportingPeriod": 30 - }, - "callbackuri": "127.0.0.1" -} \ No newline at end of file + }}, + "callbackuri": "{callback_uri}" +}} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json b/SOL002/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json index c42c3773fd02260e4563bc85df42f261c8d1e1b9..9f7640468d28840400225ce13e6c2525cb09dd48 100644 --- a/SOL002/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json +++ b/SOL002/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json @@ -1,13 +1,13 @@ -{ - "objectInstanceIds" : "1f50d68b-82e8-4deb-bd40-c934d4d1ac0a", - "criteria" : { +{{ + "objectInstanceIds" : "{objectInstanceIds}", + "criteria" : {{ "performanceMetric": "cpu_util", "thresholdType": "SIMPLE", - "simpleThresholdDetails": { + "simpleThresholdDetails": {{ "thresholdValue": 10, "hysteresis": 50 - } + }} - }, - "callbackuri": "127.0.0.1" -} \ No newline at end of file + }}, + "callbackuri": "{callback_uri}" +}} \ No newline at end of file