Skip to content
Snippets Groups Projects
Commit 21b067fa authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

added doc for SOL005 NS performance mgmt

parent 927a676f
No related branches found
No related tags found
1 merge request!39added doc for SOL005 NS performance mgmt
......@@ -2,84 +2,98 @@
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters
Resource environment/individualSubscription.txt
Resource NSDManagementKeywords.robot
Library OperatingSystem
Library JSONLibrary
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
*** Test Cases ***
GET Individual Subscription
Log Trying to get a single subscription identified by subscriptionId
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 200
Log Received a 200 OK as expected
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
${result}= Output response body
Validate Json NsdmSubscription.schema.json ${result}
Log Validated NsdmSubscription schema
GET Individual NSD Management Subscription
[Documentation] Test ID: 5.3.1.8.1
... Test title: GET Individual NSD Management Subscription
... Test objective: The objective is to test the retrieval of individual NSD Management subscription and perform a JSON schema and content validation of the returned subscription data structure
... Pre-conditions: At least one NSD Management subscription is available in the NFVO.
... Reference: section 5.4.9.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get Individual NSD Management Subscription
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is PkgmSubscription
Check HTTP Response Body Subscription Identifier matches the requested Subscription
GET Subscription - Negative (Not Found)
Log Trying to perform a request on a subscriptionID which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId}
Integer response status 404
Log Received 404 Not Found as expected
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
GET Individual NSD Management Subscription with invalid resource identifier
[Documentation] Test ID: 5.3.1.8.2
... Test title: GET Individual NSD Management Subscription with invalid resource identifier
... Test objective: The objective is to test that the retrieval of an individual NSD Management subscription fails when using an invalid resource identifier
... Pre-conditions: At least one NSD Management subscription is available in the NFVO.
... Reference: section 5.4.9.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET individual NSD Management Subscription with invalid resource identifier
Check HTTP Response Status Code Is 404
DELETE Subscription
Log Trying to perform a DELETE on a subscriptionId
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 204
Log Received 204 No Content as expected
DELETE Individual NSD Management Subscription with invalid resource identifier
[Documentation] Test ID: 5.3.1.8.3
... Test title: DELETE Individual NSD Management Subscription with invalid resource identifier
... Test objective: The objective is to test that the deletion of an individual NSD Management subscription fails when using an invalid resource identifier
... Pre-conditions: At least one NSD Management subscription is available in the NFVO.
... Reference: section 5.4.9.3.5 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send Delete request for individual NSD Management Subscription with invalid resource identifier
Check HTTP Response Status Code Is 404
POST Individual NSD Management Subscription - Method not implemented
[Documentation] Test ID: 5.3.1.8.4
... Test title: POST Individual NSD Management Subscription - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create a new NSD Management Subscription
... Pre-conditions: none
... Reference: section 5.4.9.3.1 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: The NSD Management Subscription is not created on the NFVO
Send Post request for individual NSD Management Subscription
Check HTTP Response Status Code Is 405
Check Postcondition NSD Management Subscription is not Created
DELETE Subscription - Negative (Not Found)
Log Trying to perform a DELETE on a subscriptionId which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId}
Integer response status 404
Log The subscriptionId is not present in database
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
PUT Individual NSD Management Subscription - Method not implemented
[Documentation] Test ID: 5.3.1.8.5
... Test title: PUT Individual NSD Management Subscription - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to update an existing NSD Management subscription
... Pre-conditions: At least one NSD Management subscription is available in the NFVO.
... Reference: section 5.4.9.3.3 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: The NSD Management subscription is not modified by the operation
Send Put request for individual NSD Management Subscription
Check HTTP Response Status Code Is 405
Check Postcondition NSD Management Subscription is Unmodified (Implicit)
PUT Subscription - (Method not implemented)
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 405
Log Received 405 Method not implemented as expected
PATCH Individual NSD Management Subscription - Method not implemented
[Documentation] Test ID: 5.3.1.8.6
... Test title: PATCH Individual NSD Management Subscription - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NSD Management subscription
... Pre-conditions: At least one NSD Management subscription is available in the NFVO.
... Reference: section 5.4.9.3.4 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: The NSD Management subscription is not modified by the operation
Send Patch request for individual NSD Management Subscription
Check HTTP Response Status Code Is 405
Check Postcondition NSD Management Subscription is Unmodified (Implicit)
PATCH Subscription - (Method not implemented)
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 405
Log Received 405 Method not implemented as expected
POST Subscription - (Method not implemented)
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 405
Log Received 405 Method not implemented as expected
DELETE Individual NSD Management Subscription
[Documentation] Test ID: 5.3.1.8.7
... Test title: DELETE Individual NSD Management Subscription
... Test objective: The objective is to test the deletion of an individual NSD Management subscription
... Pre-conditions: At least one NSD Management subscription is available in the NFVO.
... Reference: section 5.4.9.3.5 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: The NSD Management Subscription is not available anymore in the NFVO
Send Delete request for individual NSD Management Subscription
Check HTTP Response Status Code Is 204
Check Postcondition NSD Management Subscription is Deleted
\ No newline at end of file
......@@ -2,7 +2,8 @@
Resource environment/variables.txt
Resource environment/subscriptions.txt
Resource environment/nsDescriptors.txt # Specific nsDescriptors Parameters
Resource environment/pnfDescriptors.txt # Specific nsDescriptors Parameters
Resource environment/pnfDescriptors.txt # Specific pnfDescriptors Parameters
Resource environment/individualSubscription.txt
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false
Library MockServerLibrary
Library OperatingSystem
......@@ -114,7 +115,7 @@ Check HTTP Response Body NsdInfos Matches the requested fields selector
Log Validation for schema OK
GET all Network Service Descriptors Information with exclude_fields attribute selector
Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params
Log Trying to get all NSD Managements present in the NFVO Catalogue, using filter params
Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use exclude_fields option
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
......@@ -344,7 +345,7 @@ Get single file NSD Content in Plain or Zip Format
Set Suite Variable ${response} ${output}
Get multi file NSD Content in Plain or Zip Format
Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue
Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
......@@ -370,7 +371,7 @@ Get NSD Content with invalid resource identifier
Set Suite Variable ${response} ${output}
Get NSD Content with conflict due to onboarding state
Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue
Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
......@@ -890,7 +891,7 @@ Check HTTP Response Body Is Empty
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
Log Check Response includes VNF Package Management according to filter
Log Check Response includes NSD Management Management according to filter
#TODO
......@@ -924,6 +925,88 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab
Validate Json NsdmSubscription.schema.json ${result}
Log Validated NsdmSubscription schema
Get Individual NSD Management Subscription
Log Trying to get a single subscription identified by subscriptionId
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
GET individual NSD Management Subscription with invalid resource identifier
Log Trying to perform a request on a subscriptionID which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send Delete request for individual NSD Management Subscription
Log Trying to perform a DELETE on a subscriptionId
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition NSD Management Subscription is Deleted
Log Check Postcondition Subscription is deleted
GET individual NSD Management Subscription
Check HTTP Response Status Code Is 404
Send Delete request for individual NSD Management Subscription with invalid resource identifier
Log Trying to perform a DELETE on a subscriptionId which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send Post request for individual NSD Management Subscription
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId}
${output}= Output response
Set Suite Variable @{response} ${output}
Send Put request for individual NSD Management Subscription
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${origOutput}= Output response
Set Suite Variable ${origResponse} ${origOutput}
PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable @{response} ${output}
Send Patch request for individual NSD Management Subscription
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${origOutput}= Output response
Set Suite Variable ${origResponse} ${origOutput}
PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable @{response} ${output}
Check Postcondition NSD Management Subscription is Unmodified (Implicit)
Log Check postconidtion subscription not modified
GET individual NSD Management Subscription
Log Check Response matches original VNF Threshold
${subscription}= evaluate json.loads('''${response['body']}''') json
Should Be Equal ${origResponse['body']['id']} ${subscription.id}
Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri}
Check Postcondition NSD Management Subscription is not Created
Log Trying to get a new subscription
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId}
${output}= Output response
Set Suite Variable @{response} ${output}
Check HTTP Response Status Code Is 404
Check HTTP Response Body Subscription Identifier matches the requested Subscription
Log Trying to check response ID
Should Be Equal ${response['body']['id']} ${subscriptionId}
Log Subscription identifier as expected
Check HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE}
......
......@@ -13,7 +13,7 @@ GET all Network Service Descriptors Information
[Documentation] Test ID: 5.3.1.1.1
... Test title: GET all Network Service Descriptors Information
... Test objective: The objective is to test the retrieval of all the Network Service Descriptors information and perform a JSON schema and content validation of the collected data structure
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 5.4.2.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
......@@ -26,7 +26,7 @@ GET Network Service Descriptors Information with attribute-based filter
[Documentation] Test ID: 5.3.1.1.2
... Test title: GET Network Service Descriptors Information with attribute-based filter
... Test objective: The objective is to test the retrieval of Network Service Descriptors information using attribute-based filter, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued attribute-based filter
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 5.4.2.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
......@@ -40,7 +40,7 @@ GET Network Service Descriptors Information with invalid attribute-based filter
[Documentation] Test ID: 5.3.1.1.3
... Test title: GET Network Service Descriptors Information with invalid attribute-based filter
... Test objective: The objective is to test that the retrieval of Network Service Descriptors information fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 5.4.2.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
......@@ -53,7 +53,7 @@ Get all Network Service Descriptors Information with malformed authorization tok
[Documentation] Test ID: 5.3.1.1.4
... Test title: Get all Network Service Descriptors Information with malformed authorization token
... Test objective: The objective is to test that the retrieval of Network Service Descriptors Information fails when using malformed authorization token
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 4.5.3.3, 5.4.2.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests.
......@@ -65,7 +65,7 @@ Get all Network Service Descriptors Information without authorization token
[Documentation] Test ID: 5.3.1.1.5
... Test title: Get all Network Service Descriptors Information without authorization token
... Test objective: The objective is to test that the retrieval of Network Service Descriptors Information fails when omitting the authorization token
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 4.5.3.3, 5.4.2.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests.
......@@ -77,7 +77,7 @@ GET all Network Service Descriptors Information with expired or revoked authoriz
[Documentation] Test ID: 5.3.1.1.6
... Test title: GET all Network Service Descriptors Information with expired or revoked authorization token
... Test objective: The objective is to test that the retrieval of Network Service Descriptors Information fails when using expired or revoked authorization token
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 4.5.3.3, 5.4.2.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests.
......@@ -89,7 +89,7 @@ GET all Network Service Descriptors Information with "all_fields" attribute sele
[Documentation] Test ID: 5.3.1.1.7
... Test title: GET all Network Service Descriptors Information with "all_fields" attribute selector
... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "all_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "all_fileds" selector
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 4.3.3.2.1, 5.4.2.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
......@@ -103,7 +103,7 @@ GET all Network Service Descriptors Information with "exclude_default" attribute
[Documentation] Test ID: 5.3.1.1.8
... Test title: GET all Network Service Descriptors Information with "exclude_default" attribute selector
... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "exclude_default" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_default" selector
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 4.3.3.2.1, 5.4.2.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
......@@ -117,7 +117,7 @@ GET all Network Service Descriptors Information with "fields" attribute selector
[Documentation] Test ID: 5.3.1.1.9
... Test title: GET all Network Service Descriptors Information with "fields" attribute selector
... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "fields" selector
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 4.3.3.2.1, 5.4.2.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO supports the use of "fields" attribute selector
......@@ -131,7 +131,7 @@ GET all Network Service Descriptors Information with "exclude_fields" attribute
[Documentation] Test ID: 5.3.1.1.10
... Test title: GET all Network Service Descriptors Information with "exclude_fields" attribute selector
... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "exclude_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_fields" selector
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 4.3.3.2.1, 5.4.2.3.2 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO supports the use of "exclude_fields" attribute selector
......@@ -160,7 +160,7 @@ PUT all Network Service Descriptors - Method not implemented
[Documentation] Test ID: 5.3.1.1.12
... Test title: PUT all Network Service Descriptors Information - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify Network Service Descriptors Information
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 5.4.2.3.3 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
......@@ -172,7 +172,7 @@ PATCH all Network Service Descriptors - Method not implemented
[Documentation] Test ID: 5.3.1.1.13
... Test title: PATCH all Network Service Descriptors Information - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptors Information
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 5.4.2.3.4 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
......@@ -184,7 +184,7 @@ DELETE all Network Service Descriptors - Method not implemented
[Documentation] Test ID: 5.3.1.1.14
... Test title: DELETE all Network Service Descriptors Information - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptors Information
... Pre-conditions: One or more Network Service Descriptors are set in the NFVO.
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO.
... Reference: section 5.4.2.3.5 - SOL005 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
......
*** Variables ***
${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586
${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions
${newSubscriptionId} newSubsciptionId
${response} httpresponse
${origResponse} httpresponse
*** Settings ***
Resource environment/variables.txt
Resource environment/subscriptions.txt
Resource environment/pmJobs.txt
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false
Library MockServerLibrary
Library OperatingSystem
......@@ -11,6 +12,170 @@ Library JSONSchemaLibrary schemas/
Library Process
*** Keywords ***
GET all NS Performance Monitoring Jobs
Log Trying to get all PM Jobs present in the NFVO
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs
${output}= Output response
Set Suite Variable ${response} ${output}
GET NS Performance Monitoring Jobs with attribute-based filter
Log Trying to get all PM Jobs present in the NFVO, using filter params
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${POS_FILTER}
${output}= Output response
Set Suite Variable ${response} ${output}
GET NS Performance Monitoring Jobs with all_fields attribute selector
Log Trying to get all PM Jobs present in the NFVO, using 'all_fields' filter
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?all_fields
${output}= Output response
Set Suite Variable ${response} ${output}
GET NS Performance Monitoring Jobs with exclude_default attribute selector
Log Trying to get all NS Packages present in the NFVO, using filter params
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
GET NS Performance Monitoring Jobs with include attribute selector
Log Trying to get all NS Packages present in the NFVO, using filter params
Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFVO 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?include=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
GET NS Performance Monitoring Jobs with exclude attribute selector
Log Trying to get all NS Packages present in the NFVO, using filter params
Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFVO 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?exclude=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
GET NS Performance Monitoring Jobs with invalid attribute-based filter
Log Trying to get all PM Jobs present in the NFVO, using an erroneous filter param
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${NEG_FILTER}
${output}= Output response
Set Suite Variable ${response} ${output}
GET NS Performance Monitoring Jobs with invalid resource endpoint
Log Trying to perform a GET on a erroneous URI
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/pm_job # wrong URI /pm_job instead of /pm_jobs
${output}= Output response
Set Suite Variable ${response} ${output}
Send Post Request Create new NS Performance Monitoring Job
Log Creating a new PM 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
POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for all NS Performance Monitoring Jobs
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for all NS Performance Monitoring Jobs
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for all NS Performance Monitoring Jobs
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition NS Performance Monitoring Jobs Exist
Log Checking that Pm Job still exists
GET all NS Performance Monitoring Jobs
Check Postcondition PmJob Exists
Log Checking that Pm Job exists
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${response['body']['id']}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is PmJob
Check HTTP Response Body PmJobs Matches the requested exclude selector
Log Checking that reports element is missing
${reports}= Get Value From Json ${response['body']} $..reports
Should Be Empty ${reports}
Log Checking that reports element is missing
${criteria}= Get Value From Json ${response['body']} $..criteria
Should Be Empty ${criteria}
Log Reports element is empty as expected
Check HTTP Response Body PmJobs Matches the requested include selector
Log Trying to validate criteria schema
${criteria}= Get Value From Json ${response['body']} $..criteria
Validate Json criteria.schema.json ${criteria[0]}
Log Validation for criteria schema OK
Log Trying to validate criteria schema
${reports}= Get Value From Json ${response['body']} $..reports
Validate Json reports.schema.json ${reports[0]}
Log Validation for reports schema OK
Check HTTP Response Body PmJobs Matches the requested exclude_default selector
Log Checking that reports element is missing
${reports}= Get Value From Json ${response['body']} $..reports
Should Be Empty ${reports}
Log Reports element is empty as expected
Check HTTP Response Body PmJobs Matches the requested all_fields selector
Log Trying to validate criteria schema
${criteria}= Get Value From Json ${response['body']} $..criteria
Validate Json criteria.schema.json ${criteria[0]}
Log Validation for criteria schema OK
Log Trying to validate criteria schema
${reports}= Get Value From Json ${response['body']} $..reports
Validate Json reports.schema.json ${reports[0]}
Log Validation for reports schema OK
Log Validating _links schema
${links}= Get Value From Json ${response['body']} $.._links
Validate Json links.schema.json ${links[0]}
Log Validation for _links schema OK
Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter
Log Checking that attribute-based filter is matched
#todo
Check HTTP Response Body PmJobs Do Not Contain reports
Log Checking that field element is missing
${reports}= Get Value From Json ${response['body']} $..reports
Should Be Empty ${reports}
Log Reports element is empty as expected
Get all NSD Performance Subscriptions
[Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications
... subscribed by the client.
......@@ -153,7 +318,7 @@ Check HTTP Response Body Is Empty
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
Log Check Response includes VNF Package Management according to filter
Log Check Response includes NS Package Management according to filter
#TODO
......
This diff is collapsed.
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