From 0ec9147bfa95014129fefbfdb14bcd70f89520ab Mon Sep 17 00:00:00 2001 From: root <root@DESKTOP-A5SJGL5.localdomain> Date: Wed, 12 Feb 2020 10:23:35 +0500 Subject: [PATCH] bug-fixes --- SOL002/VNFIndicator-API/Subscriptions.robot | 2 +- SOL002/VNFIndicator-API/VNFIndicators.robot | 3 ++- .../VnfIndicatorsInVnfInstanceId.robot | 12 +++++++---- .../VNFPerformanceManagement-API/PMJobs.robot | 2 +- .../Thresholds.robot | 2 +- .../VNFPerformanceManagementKeywords.robot | 3 +-- .../FaultManagement-APIKeyword.robot | 9 ++++++++- .../Subscriptions.robot | 2 +- .../VNFIndicatorsKeywords.robot | 14 ++++++++----- .../VNFPackageManagementKeywords.robot | 4 ++-- .../VNFPerformanceManagement-API/PMJobs.robot | 2 +- .../VNFPerformanceManagementKeywords.robot | 3 +-- SOL005/NSDManagement-API/NSDContent.robot | 5 ++++- .../NSDManagementKeywords.robot | 20 +++++++++++++------ .../environment/variables.txt | 2 ++ .../NSFaultManagement-API/Subscriptions.robot | 1 - .../NSInstances.robot | 8 ++++---- .../NSPerformanceManagementKeywords.robot | 9 ++++++--- .../Subscriptions.robot | 2 +- .../VNFPackageManagementKeywords.robot | 4 ++-- 20 files changed, 69 insertions(+), 40 deletions(-) diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index 21f4d4ac..51353f63 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -220,7 +220,7 @@ Check Postcondition VNF Indicator Subscription Is Set Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Indicators according to filter - #todo + Should Be Equal As Strings ${response[0]['body']['callbackUri']} ${POS_FILTER['callbackUri']} Create Sessions diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index 92edb2aa..3af5adf1 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -269,4 +269,5 @@ Check Postcondition VNF Indicators Exist Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter Log Check Response includes VNF Indicators according to filter - #todo \ No newline at end of file + Should Be True "${response[0]['body']['name']}"=="${POS_FILTER['name']}" and "${response[0]['body']['vnfInstanceId']}"=="${POS_FILTER['vnfInstanceId']}" + \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 70bd4ab9..79a4b97c 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -196,12 +196,16 @@ Check HTTP Response Body Json Schema Is Check HTTP Response Body Includes Requested VNF Instance ID Log Check Response includes Indicators according to resource identifier - #todo + Should Be Equal As Strings ${response['body']['vnfInstanceId']} ${vnfInstanceId} Check HTTP Response Body Matches Attribute-Based Filter Log Check Response includes VNF Indicators according to filter - #todo + Should Be Equal As Strings ${response[0]['body']['name']} ${POS_FIELDS['name']} Check Postcondition Indicators for VNF instance Exist - Log Check Response includes VNF Indicators according to filter - #todo + Log Check Postcondition Indicators for VNF instance Exist + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Should Be Equal ${response.status_code} 200 + diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index bc6f070f..4446a1f7 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -324,7 +324,7 @@ Check HTTP Response Body Matches all_fields selector Check HTTP Response Body Matches filter Log Checking that attribute-based filter is matched - #todo + Should Be Equal As Strings ${response[0]['body']['objectInstanceIds']} ${POS_FILTER['objectInstanceIds']} Check HTTP Response Body Does Not Contain reports Log Checking that field element is missing diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index fd436b22..c0a67c90 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -195,7 +195,7 @@ Check Postcondition Threshold Exists Check HTTP Response Body Thresholds match the requested attribute-based filter Log Checking that attribute-based filter is matched - #todo + Should Be Equal As Strings ${response[0]['body']['objectInstanceId']} ${FILTER_OK['objectInstanceId']} Check HTTP Response Status Code Is [Arguments] ${expected_status} diff --git a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index 11f17fb7..ad37a2c9 100644 --- a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -283,8 +283,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Performance Management according to filter - # Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri} - #TODO + Should Be Equal As Strings ${response[0]['body']['callbackUri']} ${callbackUri} Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription diff --git a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot index 14a1c93d..4823d6ee 100644 --- a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot @@ -17,7 +17,14 @@ Check created Subscription existance Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 200 + Integer response status 200 +Check Postcondition FaultManagement Subscription Is Set + Log Check Postcondition subscription exist + Set Headers {"Accept": "${ACCEPT_JSON}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 200 Check Operation Occurrence Id ${opOccId}= Get Value From Json ${response.headers} $..Location Should Not Be Empty ${opOccId} diff --git a/SOL003/VNFFaultManagement-API/Subscriptions.robot b/SOL003/VNFFaultManagement-API/Subscriptions.robot index 9892d09d..dc922d31 100644 --- a/SOL003/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL003/VNFFaultManagement-API/Subscriptions.robot @@ -37,7 +37,7 @@ Create a new alarm subscription - DUPLICATION Check HTTP Response Status Code Is 201 Check Operation Occurrence Id Check HTTP Response Body Json Schema Is FmSubscription - Check created Subscription existance + Check Postcondition FaultManagement Subscription Is Set Create a new alarm subscription - NO DUPLICATION [Documentation] Test ID: 7.3.5.3.3 diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index 426ba2c0..4b1e7758 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -183,7 +183,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Performance Management according to filter - #TODO + Should Be Equal As Strings ${response[0]['body']['callbackUri']} ${filter_ok['callbackUri']} Check HTTP Response Body Matches the Subscription Log Check Response matches subscription @@ -329,7 +329,7 @@ Check Postcondition VNF Indicators Exist Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter Log Check Response includes VNF Indicators according to filter - #todo + Should Be True "${response[0]['body']['name']}"=="${POS_FIELDS['name']}" and "${response[0]['body']['vnfInstanceId']}"=="${POS_FIELDS['vnfInstanceId']}" Get all indicators for a VNF instance Log This resource represents VNF indicators related to a VNF instance. @@ -397,11 +397,15 @@ Send DELETE Request for indicators in VNF instance Check HTTP Response Body Includes Requested VNF Instances ID Log Check Response includes Indicators according to resource identifier - #todo + Should Be Equal As Strings ${response['body']['vnfInstanceId']} ${vnfInstanceId} Check Postcondition Indicators for VNF instance Exist - Log Check Response includes VNF Indicators according to filter - #todo + Log Check Postcondition Indicators for VNF instance Exist + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Should Be Equal ${response.status_code} 200 + Get Individual Indicator for a VNF instance Log This resource represents a VNF indicator related to a VNF instance. diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 62bd86a7..ce939f4a 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -54,7 +54,7 @@ GET VNF Packages with attribute-based filter Check HTTP Response Body VnfPkgsInfo Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - #todo + Should Be True "${response[0]['body']['vnfdId']}"=="${POS_FILTER['vnfdId']}" and "${response[0]['body']['vnfProvider']}"=="${POS_FILTER['vnfProvider']}" GET VNF Packages with invalid attribute-based filter Log Trying to perform a negative get, filtering by the inexistent filter 'nfvId' @@ -631,7 +631,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 - #TODO + Should Be Equal As Strings ${response[0]['body']['callbackUri']} ${filter_ok['callbackUri']} Check HTTP Response Body PkgmSubscription Attributes Values Match the Issued Subscription diff --git a/SOL003/VNFPerformanceManagement-API/PMJobs.robot b/SOL003/VNFPerformanceManagement-API/PMJobs.robot index 801655db..d21247a5 100644 --- a/SOL003/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL003/VNFPerformanceManagement-API/PMJobs.robot @@ -324,7 +324,7 @@ Check HTTP Response Body PmJobs Matches the requested all_fields selector Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - #todo + Should Be Equal As Strings ${response[0]['body']['objectInstanceIds']} ${POS_FILTER['objectInstanceIds']} Check HTTP Response Body Does Not Contain reports Log Checking that field element is missing diff --git a/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index 15d256da..dd4afd07 100644 --- a/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -283,8 +283,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Performance Management according to filter - # Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri} - #TODO + Should Be Equal As Strings ${response[0]['body']['callbackUri']} ${filter_ok['callbackUri']} Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription diff --git a/SOL005/NSDManagement-API/NSDContent.robot b/SOL005/NSDManagement-API/NSDContent.robot index 6b01def2..40f52985 100644 --- a/SOL005/NSDManagement-API/NSDContent.robot +++ b/SOL005/NSDManagement-API/NSDContent.robot @@ -147,9 +147,11 @@ Upload NSD Content as Zip file in asynchronous mode ... Reference: clause 5.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the upload of NSD contents in asynchronous mode - ... Post-Conditions: none + ... Post-Conditions: NSD Uploaded Send PUT Request to upload NSD Content as zip file in asynchronous mode Check HTTP Response Status Code Is 202 + Check Post Condition NSD Content has been Uploaded + Upload NSD Content as plain text file in asynchronous mode [Documentation] Test ID: 5.3.1.3.12 @@ -162,6 +164,7 @@ Upload NSD Content as plain text file in asynchronous mode ... Post-Conditions: none Send PUT Request to upload NSD Content as plain text file in asynchronous mode Check HTTP Response Status Code Is 202 + Check Post Condition NSD Content has been Uploaded Upload NSD Content as Zip file in synchronous mode [Documentation] Test ID: 5.3.1.3.13 diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index bbdc8f7c..962bfbf3 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -32,7 +32,7 @@ GET Network Service Descriptors Information with attribute-based filter Check HTTP Response Body NsdInfos Matches the requested attribute-based filter Log Checking that attribute-based filter is matched - #todo + GET Network Service Descriptors Information with invalid attribute-based filter Log The GET method queries multiple NS descriptors using Attribute-based filtering parameters. Negative case, with erroneous attribute name @@ -421,6 +421,17 @@ Send PUT Request to upload NSD Content as plain text file in asynchronous mode ${output}= Output response Set Suite Variable ${response} ${output} +Check Post Condition NSD Content has been Uploaded + Log Checking NsdOnboardingNotification Recieved + Wait Untill Keyword Succeeds ${retry} ${interval} Check Response is NsdOnboardingNotification + +Check Response is NsdOnboardingNotification + ${response}= Output response body + Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = NsdOnboardingNotification.schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK + Send PUT Request to upload NSD Content as zip file in synchronous mode Log Trying to perform a PUT. This method upload the content of a NSD Set Headers {"Accept": "${ACCEPT_ZIP}"} @@ -501,7 +512,6 @@ GET PNF Descriptors Information with attribute-based filter Check HTTP Response Body PnfdInfos Matches the requested attribute-based filter Log Checking that attribute-based filter is matched - #todo GET PNF Descriptors Information with invalid attribute-based filter Log The GET method queries multiple PNF descriptors using Attribute-based filtering parameters. Negative case, with erroneous attribute name @@ -888,12 +898,10 @@ Check HTTP Response Body Json Schema Is Check HTTP Response Body Is Empty Should Be Empty ${response['body']} Log No json schema is provided. Validation OK - - + Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes NSD Management Management according to filter - #TODO - + Should Be Equal As Strings ${response[0]['body']['callbackUri']} ${filter_ok['callbackUri']} Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription diff --git a/SOL005/NSDManagement-API/environment/variables.txt b/SOL005/NSDManagement-API/environment/variables.txt index 9f9d5956..9de18926 100644 --- a/SOL005/NSDManagement-API/environment/variables.txt +++ b/SOL005/NSDManagement-API/environment/variables.txt @@ -37,3 +37,5 @@ ${NFVO_ALLOWS_DUPLICATE_SUBS} 1 ${total_polling_time} 2 min ${polling_interval} 10 sec ${response} +${retry} 5x +${interval} 5 sec \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/Subscriptions.robot b/SOL005/NSFaultManagement-API/Subscriptions.robot index 960ac1b1..fb8de853 100644 --- a/SOL005/NSFaultManagement-API/Subscriptions.robot +++ b/SOL005/NSFaultManagement-API/Subscriptions.robot @@ -49,7 +49,6 @@ Create a new alarm subscription - NO DUPLICATION Post Create subscription - NO-DUPLICATION Check HTTP Response Status Code Is 303 Check Operation Occurrence Id - Check HTTP Response Body Json Schema Is FmSubscription Retrieve a list of alarm subscriptions [Documentation] Test ID: 5.3.3.3.4 diff --git a/SOL005/NSLifecycleManagement-API/NSInstances.robot b/SOL005/NSLifecycleManagement-API/NSInstances.robot index be75709a..38a41e51 100644 --- a/SOL005/NSLifecycleManagement-API/NSInstances.robot +++ b/SOL005/NSLifecycleManagement-API/NSInstances.robot @@ -70,7 +70,7 @@ GET NSInstances with "all_fields" attribute selector ... Post-Conditions: Get NSInstances with all_fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions + Check HTTP Response Body Json Schema Is NsInstances GET NSInstances with "exclude_default" attribute selector [Documentation] Test ID: 5.3.2.1.6 @@ -83,7 +83,7 @@ GET NSInstances with "exclude_default" attribute selector ... Post-Conditions: Get NSInstances with exclude_default attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions + Check HTTP Response Body Json Schema Is NsInstances GET NSInstances with "fields" attribute selector [Documentation] Test ID: 5.3.2.1.7 @@ -96,7 +96,7 @@ GET NSInstances with "fields" attribute selector ... Post-Conditions: Get NSInstances with fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions + Check HTTP Response Body Json Schema Is NsInstances GET NSInstances with "exclude_fields" attribute selector [Documentation] Test ID: 5.3.2.1.8 @@ -109,7 +109,7 @@ GET NSInstances with "exclude_fields" attribute selector ... Post-Conditions: Get NSInstances with exclude_fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions + Check HTTP Response Body Json Schema Is NsInstances PUT NSInstances - Method not implemented [Documentation] Test ID: 5.3.2.1.9 diff --git a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot index e688ea43..afdae114 100644 --- a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot +++ b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot @@ -172,7 +172,9 @@ Check HTTP Response Body PmJobs Matches the requested all_fields selector Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - #todo + ${user}= Get Value From Json ${response['body']} $..userDefinedData + Validate Json UserDefinedData.schema.json ${user[0]} + Log Validation for schema OK Check HTTP Response Body PmJobs Do Not Contain reports Log Checking that field element is missing @@ -420,7 +422,8 @@ Check Postcondition Threshold Exists Check HTTP Response Body Thresholds match the requested attribute-based filter Log Checking that attribute-based filter is matched - #todo + Should Be Equal As Strings ${response[0]['body']['objectInstanceId']} ${filter_ok['objectInstanceId']} + GET Individual NS performance Threshold Log Trying to get a Threhsold present in the NFVO @@ -653,7 +656,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes NS Package Management according to filter - #TODO + Should Be Equal As Strings ${response[0]['body']['callbackUri']} ${filter_ok['callbackUri']} Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription diff --git a/SOL005/VNFPackageManagement-API/Subscriptions.robot b/SOL005/VNFPackageManagement-API/Subscriptions.robot index 32fd85cc..df40b105 100644 --- a/SOL005/VNFPackageManagement-API/Subscriptions.robot +++ b/SOL005/VNFPackageManagement-API/Subscriptions.robot @@ -37,7 +37,7 @@ Get VNF Package Subscriptions with attribute-based filter ... Post-Conditions: none Get VNF Package Subscriptions with attribute-based filters Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PkgmSubscription + Check HTTP Response Body Json Schema Is PkgmSubscriptions Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 618ef76f..6d06f792 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -59,7 +59,7 @@ GET VNF Packages with attribute-based filter Check HTTP Response Body VnfPkgsInfo Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - #todo + Should Be True "${response[0]['body']['vnfdId']}"=="${POS_FILTER['vnfdId']}" and "${response[0]['body']['vnfProvider']}"=="${POS_FILTER['vnfProvider']}" GET VNF Packages with invalid attribute-based filter Log Trying to perform a negative get, filtering by the inexistent filter 'nfvId' @@ -907,7 +907,7 @@ Check HTTP Response Body Json Schema Is Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Package Management according to filter - #TODO + Should Be Equal As Strings ${response[0]['body']['callbackUri']} ${filter_ok['callbackUri']} Check HTTP Response Body Subscription Identifier matches the requested Subscription Log Trying to check response ID -- GitLab