From ddf4f7b26b1cee4195a55950039c0c50211ad2bd Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Fri, 22 Nov 2019 09:48:39 +0100 Subject: [PATCH] updated references --- README.md | 3 +- SOL002/VNFFaultManagement-API/Alarms.robot | 3 +- .../VnfLcmOperationKeywords.robot | 3 +- .../FaultManagement-APIKeyword.robot | 4 +-- .../IndividualVnfLcmOperationOccurence.robot | 12 ++++++- .../VnfLcmMntOperationKeywords.robot | 10 ------ .../environment/variables.txt | 2 +- .../Grants.robot | 5 +-- .../NSFaultManagement-API/Subscriptions.robot | 2 +- .../environment/variables.txt | 5 +++ .../NSLCMOperationKeywords.robot | 34 ++++++------------- .../environment/variables.txt | 3 ++ 12 files changed, 41 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 759bbf43..ae514f7d 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ including the scope of the test cases, are still under development. The Test Specification is built as a collection of [Robot Framework](robotframework.org/) Test Description. [Robot Framework](robotframework.org/) is a generic test automation framework for acceptance testing and acceptance test-driven development. -**IMPORTANT: This repository and the NFV API Conformance Test Specification is Work in Progress. The current version focuses on conformance tests of individual SOL002 and SOL003 resource endpoints. The [Robot Framework](robotframework.org/) Test Descriptions are expected to be consolidated and reviewed in the short term, and possibly re-organized to ease automation of NFV workflows testing. SOL005 Test Descriptions are under development and will be contributed during Q1-2019.** +**IMPORTANT: This repository and the NFV API Conformance Test Specification is Work in Progress. The current version focuses on conformance tests of individual SOL002, SOL003 and SOL005 resource endpoints. The [Robot Framework](robotframework.org/) Test +Descriptions are expected to be consolidated and reviewed in the short term, and possibly re-organized to ease automation of NFV workflows testing.** More information at [NFV API Conformance Test Specification wiki](https://forge.etsi.org/gitlab/nfv/api-tests/wikis/NFV-API-Conformance-Test-Specification). diff --git a/SOL002/VNFFaultManagement-API/Alarms.robot b/SOL002/VNFFaultManagement-API/Alarms.robot index 22c32579..617fbb69 100644 --- a/SOL002/VNFFaultManagement-API/Alarms.robot +++ b/SOL002/VNFFaultManagement-API/Alarms.robot @@ -227,7 +227,8 @@ GET Alarms Task with exclude_fields attribute selector Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_fields=${fields} ${output}= Output response - Set Suite Variable ${response} ${output} + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is [Arguments] ${expected_status} Should Be Equal ${response.status_code} ${expected_status} diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index b02e4968..17d33ea6 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -243,13 +243,12 @@ DELETE instantiate individual vnfInstance Set Global Variable @{response} ${outputResponse} POST Scale vnfInstance - [Arguments] ${instanceId} Log Trying to Instantiate a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId}/scale ${body} + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} GET Scale vnfInstance diff --git a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot index 640109b4..d433752a 100644 --- a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot @@ -136,8 +136,8 @@ GET Alarms Task with exclude_default attribute selector GET ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} -GET VNF Packages with fields attribute selector - Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields +GET Alarms Task with fields attribute selector + Log Trying to get all alarms present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index 8c535e75..9a4e3ca0 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -66,4 +66,14 @@ PATCH Individual VNF LCM Operation occurrences - Method not implemented ... Applicability: none ... Post-Conditions: none Delete multiple VNF instances - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 + +*** Keywords *** +Get multiple VNF instances + Log Query status information about multiple VNF lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index 7a37ef9b..f94a5510 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -366,15 +366,6 @@ POST Create a new vnfInstance ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} -Get multiple VNF instances - Log Query status information about multiple VNF lifecycle management operation occurrences. - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - ${outputResponse}= Output response - Set Global Variable @{response} ${outputResponse} - GET multiple vnfInstances Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} @@ -492,7 +483,6 @@ PATCH individual vnfInstance log Trying to modify an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Set Headers {"If-Match": "${original_etag}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/patchBodyRequest.json Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body} diff --git a/SOL003/VNFLifecycleManagement-API/environment/variables.txt b/SOL003/VNFLifecycleManagement-API/environment/variables.txt index 7d2807f1..75ef919b 100644 --- a/SOL003/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL003/VNFLifecycleManagement-API/environment/variables.txt @@ -16,7 +16,7 @@ ${sub_filter_invalid} filter_invalid ${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f - +${fields} criteria,objectInstanceIds ${vnfInstanceName} Test-VnfInstance ${vnfInstanceDescription} description vnf diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index 2a8aff78..854d10f5 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -9,7 +9,8 @@ Documentation This resource represents grants. The client can use this resour *** Variables *** ${response} {} -${wait_time} 2 min 10 sec +${retry} 2 min +${polling} 10 sec *** Test Cases *** Requests a grant for a particular VNF lifecycle operation - Synchronous mode @@ -105,7 +106,7 @@ DELETE Grants - Method not implemented *** Keywords *** Wait for individual grant successful notification - Wait Until Keyword Succeeds ${wait_time} Get an individual grant - Successful + Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful Send Request Grant Request in Synchronous mode Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test diff --git a/SOL005/NSFaultManagement-API/Subscriptions.robot b/SOL005/NSFaultManagement-API/Subscriptions.robot index 07af9073..e371035c 100644 --- a/SOL005/NSFaultManagement-API/Subscriptions.robot +++ b/SOL005/NSFaultManagement-API/Subscriptions.robot @@ -46,7 +46,7 @@ Create a new alarm subscription - NO DUPLICATION ... Config ID: Config_prod_NFVO ... Applicability: the NFVO decides to not create a duplicate subscription resource ... Post-Conditions: none - Post Create 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 diff --git a/SOL005/NSFaultManagement-API/environment/variables.txt b/SOL005/NSFaultManagement-API/environment/variables.txt index 748cfcfa..28166931 100644 --- a/SOL005/NSFaultManagement-API/environment/variables.txt +++ b/SOL005/NSFaultManagement-API/environment/variables.txt @@ -4,6 +4,7 @@ ${NFVO_PORT} 8080 # Listening port of the VNFM ${NFVO_SCHEMA} https ${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== ${ACCEPT} application/json +${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 ${alarm_filter} nsInstanceId ${nsInstanceId} 007c111c-38a1-42c0-a666-7475ecb1567c @@ -15,6 +16,10 @@ ${CONTENT_TYPE} application/json ${NFVO_ALLOWS_DUPLICATE_SUBS} 0 +${fields} criteria,objectInstanceIds + +${VNFM_ALLOWS_DUPLICATE_SUBS} 0 + ${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${invalidAlarmId} invalidAlramID ${Etag}= an etag diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index 27150706..1ad0bf92 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -126,7 +126,7 @@ Check operation resource state is not FAILED_TEMP Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} - String response body instantiationState != FAILED_TEMP + String response body instantiationState not FAILED_TEMP Check resource is finally failed Set Headers {"Accept":"${ACCEPT}"} @@ -954,6 +954,14 @@ GET subscriptions with filter ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} +Get subscriptions - invalid filter + Log Get the list of active subscriptions using an invalid filter + Set Headers {"Accept": "${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + POST Individual Subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} @@ -1057,27 +1065,5 @@ PUT notification Log Verifying results Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - -PATCH subscriptions - Log PATCH Method not implemented - &{req}= Create Mock Request Matcher PATCH ${callback_endpoint} - &{rsp}= Create Mock Response status_code=405 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - -DELETE subscriptions - Log DELETE Method not implemented - &{req}= Create Mock Request Matcher DELETE ${callback_endpoint} - &{rsp}= Create Mock Response status_code=405 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/environment/variables.txt b/SOL005/NSLifecycleManagement-API/environment/variables.txt index dc3f6467..9efaee81 100644 --- a/SOL005/NSLifecycleManagement-API/environment/variables.txt +++ b/SOL005/NSLifecycleManagement-API/environment/variables.txt @@ -9,6 +9,7 @@ ${NFVO_SCHEMA} https ${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== ${CONTENT_TYPE} application/json ${CONTENT_TYPE_PATCH} application/merge-patch+json +${ACCEPT_JSON} application/json ${ACCEPT} application/json ${apiRoot} / ${apiName} nslcm @@ -16,6 +17,7 @@ ${apiVersion} v1 ${AUTH_USAGE} 1 ${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX ${nsInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${ConflictNsInstanceId} 007c111c-e602-4afa-8e13-962fb5a7d81d ${nsInstanceName} Test-nsInstance ${nsInstanceDescription} description ns ${nsInstanceDescription_Update} Updated description ns @@ -31,6 +33,7 @@ ${CancelMode} GRACEFUL ${NFVO_DUPLICATION} 0 ${sub_filter} filter ${sub_filter_invalid} filter_invalid +${fields} criteria,objectInstanceIds ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${VnfLcmOperationOccurrenceNotification} {} ${VnfIdentifierCreationNotification} {} -- GitLab