Skip to content
Snippets Groups Projects
Commit e9893c5f authored by Najam UI Hassan's avatar Najam UI Hassan
Browse files

templating, minor fix and new testcases added

parent ee694009
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -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}
......
*** 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
......
......@@ -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
{
"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
{
"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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment