Commit 2135fca5 authored by Najam UI Hassan's avatar Najam UI Hassan
Browse files

templating and minor bugs fix added

parent 1df2ac74
......@@ -58,6 +58,7 @@ DELETE Individual VNF Performance Job with invalid resource identifier
... Post-Conditions: none
Send Delete request for individual VNF Performance Job with invalid resource identifier
Check HTTP Response Status Code Is 404
Check HTTP Response Body Json Schema Is ProblemDetails
POST Individual VNF Performance Job - Method not implemented
[Documentation] Test ID: 7.3.4.2.5
......@@ -67,10 +68,9 @@ POST Individual VNF Performance Job - Method not implemented
... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF Performance Job is not created on the VNFM
... Post-Conditions: none
Send Post request for individual VNF Performance Job
Check HTTP Response Status Code Is 405
Check Postcondition VNF Performance Job is not Created
PUT Individual VNF Performance Job - Method not implemented
[Documentation] Test ID: 7.3.4.2.6
......@@ -80,10 +80,9 @@ PUT Individual VNF Performance Job - Method not implemented
... Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF Performance Job is not modified by the operation
... Post-Conditions: none
Send Put request for individual VNF Performance Job
Check HTTP Response Status Code Is 405
Check Postcondition VNF Performance Job is Unmodified (Implicit)
PATCH Individual VNF Performance Job
[Documentation] Test ID: 7.3.4.2.7
......
......@@ -30,6 +30,7 @@ Get Individual Performance Report with invalid resource endpoint
... Post-Conditions: none
Get Individual Performance Report with invalid resource endpoint
Check HTTP Response Status Code Is 404
Check HTTP Response Body Json Schema Is ProblemDetails
POST Individual Performance Report - Method not implemented
[Documentation] Test ID: 7.3.4.3.3
......@@ -39,10 +40,9 @@ POST Individual Performance Report - Method not implemented
... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF performance report is not created on the VNFM
... Post-Conditions: none
Send Post request for Individual Performance Report
Check HTTP Response Status Code Is 405
Check Postcondition VNF Individual Performance Report is not Created
PUT Individual Performance Report - Method not implemented
[Documentation] Test ID: 7.3.4.3.4
......@@ -52,10 +52,9 @@ PUT Individual Performance Report - Method not implemented
... Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF performance report is not modified by the operation
... Post-Conditions: none
Send Put request for Individual Performance Report
Check HTTP Response Status Code Is 405
Check Postcondition VNF Individual Performance Report is Unmodified (Implicit)
PATCH Individual Performance Report - Method not implemented
[Documentation] Test ID: 7.3.4.3.5
......@@ -65,10 +64,9 @@ PATCH Individual Performance Report - Method not implemented
... Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF performance report is not modified by the operation
... Post-Conditions: none
Send Patch request for Individual Performance Report
Check HTTP Response Status Code Is 405
Check Postcondition VNF Individual Performance Report is Unmodified (Implicit)
DELETE Individual Performance Report - Method not implemented
[Documentation] Test ID: 7.3.4.3.6
......@@ -78,10 +76,9 @@ DELETE Individual Performance Report - Method not implemented
... Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF performance report is not deleted by the operation
... Post-Conditions: none
Send Delete request for Individual Performance Report
Check HTTP Response Status Code Is 405
Check Postcondition VNF Individual Performance Report Exists
*** Keywords ***
Get Individual Performance Report
......@@ -134,26 +131,6 @@ Send Delete request for Individual Performance Report
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition VNF Individual Performance Report Exists
Log Checking that report still exists
Get Individual Performance Report
Check Postcondition VNF Individual Performance Report is not Created
Log Trying to get a new report
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 404
Check Postcondition VNF Individual Performance Report is Unmodified (Implicit)
Log Check Postcondition VNF PM job is not modified
Get Individual Performance Report
Log Check Response matches original VNF report
${report}= evaluate json.loads('''${response['body']}''') json
Should Be Equal ${origResponse['body']['entries'][0]['objectInstanceId']} ${report['entries'][0]['objectInstanceId']}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
${status}= Convert To Integer ${expected_status}
......
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library OperatingSystem
Library JSONLibrary
Resource environment/individualSubscription.txt
Resource VNFPerformanceManagementKeywords.robot
*** Test Cases ***
GET Individual VNF Performance Subscription
[Documentation] Test ID: 7.3.4.7.1
... Test title: GET Individual VNF Performance Subscription
... Test objective: The objective is to test the retrieval of individual VNF performance subscription and perform a JSON schema and content validation of the returned subscription data structure
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.8.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get Individual VNF Performance Subscription
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Subscription Identifier matches the requested Subscription
GET Individual VNF Performance Subscription with invalid resource identifier
[Documentation] Test ID: 7.3.4.7.2
... Test title: GET Individual VNF Performance Subscription with invalid resource identifier
... Test objective: The objective is to test that the retrieval of an individual VNF performance subscription fails when using an invalid resource identifier
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.8.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET individual VNF Performance Subscription with invalid resource identifier
Check HTTP Response Status Code Is 404
DELETE Individual VNF Performance Subscription
[Documentation] Test ID: 7.3.4.7.3
... Test title: DELETE Individual VNF Performance Subscription
... Test objective: The objective is to test the deletion of an individual VNF performance subscription
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF Performance Subscription is not available anymore in the VNFM
Send Delete request for individual VNF Performance Subscription
Check HTTP Response Status Code Is 204
Check Postcondition VNF Performance Subscription is Deleted
DELETE Individual VNF Performance Subscription with invalid resource identifier
[Documentation] Test ID: 7.3.4.7.4
... Test title: DELETE Individual VNF Performance Subscription with invalid resource identifier
... Test objective: The objective is to test that the deletion of an individual VNF performance subscription fails when using an invalid resource identifier
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send Delete request for individual VNF Performance Subscription with invalid resource identifier
Check HTTP Response Status Code Is 404
POST Individual VNF Performance Subscription - Method not implemented
[Documentation] Test ID: 7.3.4.7.5
... Test title: POST Individual VNF Performance Subscription - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Subscription
... Pre-conditions: A VNF instance is instantiated
... Reference: Clause 6.4.8.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF Performance Subscription is not created on the VNFM
Send Post request for individual VNF Performance Subscription
Check HTTP Response Status Code Is 405
Check Postcondition VNF Performance Subscription is not Created
PUT Individual VNF Performance Subscription - Method not implemented
[Documentation] Test ID: 7.3.4.7.6
... Test title: PUT Individual VNF Performance Subscription - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance subscription
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.8.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF Performance subscription is not modified by the operation
Send Put request for individual VNF Performance Threshold
Check HTTP Response Status Code Is 405
Check Postcondition VNF Performance Subscription is Unmodified (Implicit)
PATCH Individual VNF Performance Subscription - Method not implemented
[Documentation] Test ID: 7.3.4.7.7
... Test title: PATCH Individual VNF Performance Subscription - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF Performance subscription
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.8.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF Performance subscription is not modified by the operation
Send Patch request for individual VNF Performance Threshold
Check HTTP Response Status Code Is 405
Check Postcondition VNF Performance Subscription is Unmodified (Implicit)
......@@ -32,6 +32,7 @@ GET Individual Threshold with invalid resource identifier
... Post-Conditions: none
GET individual VNF Performance Threshold with invalid resource identifier
Check HTTP Response Status Code Is 404
Check HTTP Response Body Json Schema Is ProblemDetails
DELETE Individual Threshold
[Documentation] Test ID: 7.3.4.5.3
......@@ -57,6 +58,7 @@ DELETE Individual Threshold with invalid resource identifier
... Post-Conditions: none
Send Delete request for individual VNF Performance Threshold with invalid resource identifier
Check HTTP Response Status Code Is 404
Check HTTP Response Body Json Schema Is ProblemDetails
POST Individual Threshold - Method not implemented
[Documentation] Test ID: 7.3.4.5.5
......@@ -66,10 +68,9 @@ POST Individual Threshold - Method not implemented
... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF Performance Threshold is not created on the VNFM
... Post-Conditions: none
Send Post request for individual VNF Performance Threshold
Check HTTP Response Status Code Is 405
Check Postcondition VNF Performance Threshold is not Created
PUT Individual Threshold - Method not implemented
[Documentation] Test ID: 7.3.4.5.6
......@@ -79,10 +80,9 @@ PUT Individual Threshold - Method not implemented
... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF Performance Threshold is not modified by the operation
... Post-Conditions: none
Send Put request for individual VNF Performance Threshold
Check HTTP Response Status Code Is 405
Check Postcondition VNF Performance Threshold is Unmodified (Implicit)
PATCH Individual Threshold
[Documentation] Test ID: 7.3.4.5.7
......@@ -176,15 +176,6 @@ Check Postcondition VNF Performance Threshold is Unmodified (Implicit)
${threshold}= evaluate json.loads('''${response['body']}''') json
Should Be Equal ${origresponse['body']['id']} ${threshold.id}
Should Be Equal ${origresponse['body']['criteria']} ${threshold.criteria}
Check Postcondition VNF Performance Threshold is not Created
Log Trying to get a new Threshold
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 404
Check Postcondition VNF Performance Threshold is Deleted
Log Check Postcondition Threshold is deleted
......
......@@ -195,6 +195,20 @@ GET VNF Performance Monitoring Jobs - 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 fields and exclude_default attribute selector
[Documentation] Test ID: 7.3.4.1.15
... Test title: GET all VNF Performance Monitoring Jobs with fields and exclude_default attribute selector
... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs fields and exclude_default attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued fields selector
... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF.
... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: The VNFM supports the use of fields and exclude_fields attribute selector
... Post-Conditions: none
GET VNF Performance Monitoring Jobs with fields and exclude_default attribute selector
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is PmJobs
Check HTTP Response Body PmJobs Matches the requested fields selector
*** Keywords ***
GET all VNF Performance Monitoring Jobs
Log Trying to get all PM Jobs present in the VNFM
......@@ -237,6 +251,15 @@ GET VNF Performance Monitoring Jobs with fields attribute selector
${output}= Output response
Set Suite Variable ${response} ${output}
GET VNF Performance Monitoring Jobs with fields and exclude_default attribute selector
Log Trying to get all VNF Packages present in the VNFM, using filter params
Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields'
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
Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields'
......@@ -267,7 +290,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}
POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
......
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library OperatingSystem
Library JSONLibrary
Resource VNFPerformanceManagementKeywords.robot
Resource environment/subscriptions.txt
Library MockServerLibrary
Library Process
Suite Setup Create Sessions
Suite Teardown Terminate All Processes kill=true
*** Test Cases ***
GET all VNF Performance Subscriptions
[Documentation] Test ID: 7.3.4.6.1
... Test title: GET all VNF Performance Subscriptions
... Test objective: The objective is to test the retrieval of all VNF performance subscriptions and perform a JSON schema validation of the returned subscriptions data structure
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get all VNF Performance Subscriptions
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is PmSubscriptions
GET VNF Performance Subscriptions with attribute-based filter
[Documentation] Test ID: 7.3.4.6.2
... Test title: GET VNF Performance Subscriptions with attribute-based filter
... Test objective: The objective is to test the retrieval of VNF performance subscriptions using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get VNF Performance Subscriptions with attribute-based filters
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is PmSubscriptions
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
GET VNF Performance Management Subscriptions with invalid attribute-based filter
[Documentation] Test ID: 7.3.4.6.3
... Test title: GET VNF Performance Management Subscriptions with invalid attribute-based filter
... Test objective: The objective is to test that the retrieval of VNF performance subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response.
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get VNF Performance Subscriptions with invalid attribute-based filters
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
GET VNF Performance Subscriptions with invalid resource endpoint
[Documentation] Test ID: 7.3.4.6.4
... Test title: GET VNF Performance Subscriptions with invalid resource endpoint
... Test objective: The objective is to test that the retrieval of all VNF performance subscriptions fails when using invalid resource endpoint.
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get VNF Performance Subscriptions with invalid resource endpoint
Check HTTP Response Status Code Is 404
Create new VNF Performance subscription
[Documentation] Test ID: 7.3.4.6.5
... Test title: Create new VNF Performance subscription
... Test objective: The objective is to test the creation of a new VNF performance subscription and perform a JSON schema and content validation of the returned subscription data structure
... Pre-conditions: A VNF instance is instantiated.
... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF performance subscription is successfully set and it matches the issued subscription
Send Post Request for VNF Performance Subscription
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Check Postcondition VNF Performance Subscription Is Set
Create duplicated VNF Performance subscription with VNFM not creating duplicated subscriptions
[Tags] no-duplicated-subs
[Documentation] Test ID: 7.3.4.6.6
... Test title: Create duplicated VNF Performance subscription with VNFM not creating duplicated subscriptions
... Test objective: The objective is to test the attempt of a creation of a duplicated VNF performance subscription and check that no new subscription is created by the VNFM and a link to the original subscription is returned
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: The VNFM does not support the creation of duplicated subscriptions
... Post-Conditions: The existing VNF performance subscription returned is available in the VNFM
Send Post Request for Duplicated VNF Performance Subscription
Check HTTP Response Status Code Is 303
Check HTTP Response Body Is Empty
Check HTTP Response Header Contains Location
Check Postcondition Subscription Resource Returned in Location Header Is Available
Create duplicated VNF Performance subscription with VNFM creating duplicated subscriptions
[Tags] duplicated-subs
[Documentation] Test ID: 7.3.4.6.7
... Test title: Create duplicated VNF Performance subscription with VNFM creating duplicated subscriptions
... Test objective: The objective is to test the creation of a duplicated VNF performance subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: The VNFM supports the creation of duplicated subscriptions
... Post-Conditions: The duplicated VNF performance subscription is successfully set and it matches the issued subscription
Send Post Request for Duplicated VNF Performance Subscription
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Check Postcondition VNF Performance Subscription Is Set
PUT VNF Performance Subscriptions - Method not implemented
[Documentation] Test ID: 7.3.4.6.8
... Test title: PUT VNF Performance Subscriptions - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify VNF performance subscriptions
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send Put Request for VNF Performance Subscriptions
Check HTTP Response Status Code Is 405
PATCH VNF Performance Subscriptions - Method not implemented
[Documentation] Test ID: 7.3.4.6.9
... Test title: PATCH VNF Performance Subscriptions - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update VNF performance subscriptions
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send Patch Request for VNF Performance Subscriptions
Check HTTP Response Status Code Is 405
DELETE VNF Performance Subscriptions - Method not implemented
[Documentation] Test ID: 7.3.4.6.10
... Test title: DELETE VNF Performance Subscriptions - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete VNF performance subscriptions
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF performance subscriptions are not deleted by the failed operation
Send Delete Request for VNF Performance Subscriptions
Check HTTP Response Status Code Is 405
Check Postcondition VNF Performance Subscriptions Exists
GET all VNF Performance Subscriptions as Paged Response
[Documentation] Test ID: 7.3.4.6.11
... Test title: GET all VNF Performance Subscriptions as Paged Response
... Test objective: The objective is to test the retrieval of all VNF performance subscriptions as Paged Response.
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get all VNF Performance Subscriptions
Check HTTP Response Status Code Is 200
Check LINK in Header
GET VNF Performance Management Subscriptions - Bad Request Response too Big
[Documentation] Test ID: 7.3.4.6.12
... Test title: GET VNF Performance Management Subscriptions - Bad Request Response too Big
... Test objective: The objective is to test that the retrieval of VNF performance subscriptions fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response.
... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get all VNF Performance Subscriptions
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
\ No newline at end of file
*** Settings ***
Library String
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters
Library JSONLibrary
......@@ -174,7 +175,8 @@ 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
${template}= Get File jsons/CreateThresholdRequest.json
${request}= Format String ${template} objectInstanceIds=${objectInstanceIds}
POST ${apiRoot}/${apiName}/${apiVersion}/thresholds ${request}
${output}= Output response
Set Suite Variable ${response} ${output}
......
*** Variables ***
${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa
${erroneousSubscriptionId} erroneousSubscriptionId
${newSubscriptionId} newSubsciptionId
${response} httpresponse
${origResponse} httpresponse
\ No newline at end of file
*** Settings ***
Resource variables.txt
*** Variables ***
${POS_FILTER} objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a
${POS_FILTER} objectInstanceIds=${objectInstanceIds}
${NEG_FILTER} criteriaPmJob=erroneousAttributeName
${fields} criteria,objectInstanceIds
${response} httpresponse
......
*** Variables ***
${callbackUri_Sub} http://172.22.1.7:9091/vnfpm/subscriptions
${filter_ok} callbackUri=${callbackUri_Sub}
${filter_ko} erroneousFilter=erroneous
${total_polling_time} 2 min
${polling_interval} 10 sec
${response} httpresponse
*** Settings ***
Resource variables.txt
*** Variables ***
${FILTER_OK} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a
${FILTER_OK} objectInstanceId=${objectInstanceIds}
${FILTER_KO} criterias=erroneousFilter
${response}= httpresponse
\ No newline at end of file
......@@ -30,4 +30,6 @@ ${polling_interval} 10 sec
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
${response}
\ No newline at end of file
${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
}
}
\ No newline at end of file
}}
}}
\ 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
}
}}