From 5655dbc30c6745410834fa53b5ea8348a57e3a3f Mon Sep 17 00:00:00 2001 From: mxzhao <mengxuan.zhao@eglobalmark.com> Date: Wed, 9 Jan 2019 17:22:18 +0100 Subject: [PATCH] no message --- SOL003/VNFFaultManagement-API/Alarms.robot | 24 ++++++ .../IndividualAlarm.robot | 46 ++++++++--- .../IndividualSubscription.robot | 10 ++- .../Subscriptions.robot | 50 +++++++++++- .../NotificationEndpoint.robot | 53 +++++++++--- .../IndividualVNFInstance.robot | 44 +++++++--- .../ScaleVNFTaskHighLevel.robot | 80 ------------------- .../VNFInstances.robot | 34 +++++++- 8 files changed, 222 insertions(+), 119 deletions(-) delete mode 100644 SOL003/VNFLifecycleManagement-API/ScaleVNFTaskHighLevel.robot diff --git a/SOL003/VNFFaultManagement-API/Alarms.robot b/SOL003/VNFFaultManagement-API/Alarms.robot index 403c96ee..e1559c7b 100644 --- a/SOL003/VNFFaultManagement-API/Alarms.robot +++ b/SOL003/VNFFaultManagement-API/Alarms.robot @@ -17,6 +17,14 @@ POST Alarms - Method not implemented Integer response status 405 Get information about multiple alarms + [Documentation] Test ID: 7.4.2.1 + ... Test title: Get information about multiple alarms + ... Test objective: The objective is to retrieve information about the alarm list + ... Pre-conditions: + ... Reference: section 7.4.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: Log Query VNF The GET method queries information about multiple alarms. Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} @@ -32,6 +40,14 @@ Get information about multiple alarms Log Validation OK Get information about multiple alarms with filters + [Documentation] Test ID: 7.4.2.2 + ... Test title: Get information about multiple alarms - with filters + ... Test objective: The objective is to retrieve information about the alarm list + ... Pre-conditions: + ... Reference: section 7.4.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: Log Query VNF The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} @@ -47,6 +63,14 @@ Get information about multiple alarms with filters Log Validation OK Get information about multiple alarms Bad Request Invalid attribute-based filtering parameters + [Documentation] Test ID: 7.4.2.2-1 + ... Test title: Get information about multiple alarms - with Invalid attribute-based filtering parameters + ... Test objective: The objective is to retrieve information about the alarm list + ... Pre-conditions: + ... Reference: section 7.4.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: Log Query VNF The GET method queries information about multiple alarm instances. Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} diff --git a/SOL003/VNFFaultManagement-API/IndividualAlarm.robot b/SOL003/VNFFaultManagement-API/IndividualAlarm.robot index 0e397e9d..4a392330 100644 --- a/SOL003/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL003/VNFFaultManagement-API/IndividualAlarm.robot @@ -22,8 +22,16 @@ POST Alarm - Method not implemented Output response Integer response status 405 -Get information about an alarm - Log Query VNF The GET method queries information about multiple alarms. +Get information about an alarm + [Documentation] Test ID: 7.4.3.1 + ... Test title: Get information about an alarm + ... Test objective: The objective is to read an individual alarm. + ... Pre-conditions: The related alarm exists + ... Reference: section 7.4.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + Log Query VNF The GET method queries information about an alarm. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} @@ -49,7 +57,14 @@ PUT Alarm - Method not implemented Integer response status 405 PATCH Alarm - [Documentation] This method modifies an individual alarm resource + [Documentation] Test ID: 7.4.3.2 + ... Test title: Modify an individual alarm resource + ... Test objective: The objective is to Modify an individual alarm resource + ... Pre-conditions: The related alarm exists + ... Reference: section 7.4.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: log Trying to perform a PATCH. This method modifies an individual alarm resource Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} @@ -67,11 +82,14 @@ PATCH Alarm Log Validation OK PATCH Alarm - Conflict - [Documentation] Conflict - ... The operation cannot be executed currently, due to a conflict with the state of the “Individual alarm” resource. - ... Typically, this is due to the fact that the alarm is already in the state that is requested to be set (such as trying to acknowledge an already-acknowledged alarm). - ... The response body shall contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error. - Depends On Test PATCH Alarm # If the previous test scceeded, it means that the alarm is in ackownledged state + [Documentation] Test ID: 7.4.3.2-1 + ... Test title: Modify an individual alarm resource - Conflict + ... Test objective: The objective is to Modify an individual alarm resource + ... Pre-conditions: The related alarm exists + ... Reference: section 7.4.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: The alarm resource is not modified log Trying to perform a PATCH. This method modifies an individual alarm resource Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} @@ -86,10 +104,14 @@ PATCH Alarm - Conflict Log Validation OK PATCH Alarm - Precondition failed - [Documentation] Precondition Failed - ... A precondition given in an HTTP request header is not fulfilled. Typically, this is due to an ETag mismatch, - ... indicating that the resource was modified by another entity. The response body should contain a ProblemDetails structure, - ... in which the “detail” attribute should convey more information about the error. + [Documentation] Test ID: 7.4.3.2-1 + ... Test title: Modify an individual alarm resource - Precondition failed + ... Test objective: The objective is to Modify an individual alarm resource + ... Pre-conditions: The related alarm exists + ... Reference: section 7.4.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: The alarm resource is not modified Depends On Test PATCH Alarm # If the previous test scceeded, it means that Etag has been modified log Trying to perform a PATCH. This method modifies an individual alarm resource Set Headers {"Accept":"${ACCEPT}"} diff --git a/SOL003/VNFFaultManagement-API/IndividualSubscription.robot b/SOL003/VNFFaultManagement-API/IndividualSubscription.robot index 4bd82475..a5a1df8f 100644 --- a/SOL003/VNFFaultManagement-API/IndividualSubscription.robot +++ b/SOL003/VNFFaultManagement-API/IndividualSubscription.robot @@ -6,7 +6,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ... spec=SOL003-VNFFaultManagement-API.yaml Documentation This resource represents an individual subscription for VNF alarms. ... The client can use this resource to read and to terminate a subscription to notifications related to VNF fault management. -Suite setup Check resource existance +Suite setup Check resource existance *** Test Cases *** Post Individual Subscription - Method not implemented @@ -19,6 +19,14 @@ Post Individual Subscription - Method not implemented Integer response status 405 Get Information about an individual subscription + [Documentation] Test ID: 7.4.4.5 + ... Test title: Retrieve the alarm subscriptions + ... Test objective: The objective is to read an individual subscription for VNF alarms subscribed by the client + ... Pre-conditions: The subscription with the given id exists + ... Reference: section 7.4.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} diff --git a/SOL003/VNFFaultManagement-API/Subscriptions.robot b/SOL003/VNFFaultManagement-API/Subscriptions.robot index e155a92c..4bce018f 100644 --- a/SOL003/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL003/VNFFaultManagement-API/Subscriptions.robot @@ -2,12 +2,20 @@ Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ... spec=SOL003-VNFFaultManagement-API.yaml -Library OperatingSystem +Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ *** Test Cases *** Create a new subscription + [Documentation] Test ID: 7.4.4.1 + ... Test title: Create a new alarm subscription + ... Test objective: The objective is to create a new subscription. + ... Pre-conditions: no subscription with the same filter and callbackUri exists + ... Reference: section 7.4.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -26,6 +34,14 @@ Create a new subscription Log Validation OK Create a new Subscription - DUPLICATION + [Documentation] Test ID: 7.4.4.2 + ... Test title: Create a new alarm subscription - DUPLICATION + ... Test objective: The objective is to create a new subscription. + ... Pre-conditions: subscription with the same filter and callbackUri exists + ... Reference: section 7.4.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: the VNFM allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists + ... Post-Conditions: Log Trying to create a subscription with an already created content Pass Execution If ${NVFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} @@ -43,6 +59,14 @@ Create a new Subscription - DUPLICATION Log Validation OK Create a new Subscription - NO-DUPLICATION + [Documentation] Test ID: 7.4.4.3 + ... Test title: Create a new alarm subscription - NO DUPLICATION + ... Test objective: The objective is to create a new subscription. + ... Pre-conditions: subscription with the same filter and callbackUri exists + ... Reference: section 7.4.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: the VNFM decides to not create a duplicate subscription resource + ... Post-Conditions: Log Trying to create a subscription with an already created content Pass Execution If ${NVFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} @@ -57,6 +81,14 @@ Create a new Subscription - NO-DUPLICATION Log Validation OK GET Subscriptions + [Documentation] Test ID: 7.4.4.4 + ... Test title: Retrieve a list of alarm subscriptions + ... Test objective: The objective is to retrieve the list of active subscriptions + ... Pre-conditions: + ... Reference: section 7.4.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -71,6 +103,14 @@ GET Subscriptions Log Validation OK GET Subscription - Filter + [Documentation] Test ID: 7.4.4.5 + ... Test title: Retrieve a list of alarm subscriptions + ... Test objective: The objective is to retrieve the list of active subscriptions with filter + ... Pre-conditions: + ... Reference: section 7.4.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -83,6 +123,14 @@ GET Subscription - Filter Log Validation OK GET subscriptions - Bad Request Invalid attribute-based filtering parameters + [Documentation] Test ID: 7.4.4.5-1 + ... Test title: Retrieve a list of alarm subscriptions + ... Test objective: The objective is to retrieve the list of active subscriptions with Invalid attribute-based filtering parameters + ... Pre-conditions: + ... Reference: section 7.4.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: 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}"} diff --git a/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot b/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot index 22e74701..732208c9 100644 --- a/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot +++ b/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot @@ -10,6 +10,14 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${notification_port} *** Test Cases *** Deliver a notification - Alarm + [Documentation] Test ID: 7.4.5.1 + ... Test title: Deliver a notification - Alarm + ... Test objective: The objective is to notify a VNF alarm or that the alarm list has been rebuilt. + ... Pre-conditions: The VNF has subscribed to the VNFM alarm + ... Reference: section 7.4.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: log The POST method delivers a notification - Information of a VNF alarm. ${json}= Get File schemas/alarmNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json @@ -17,13 +25,20 @@ Deliver a notification - Alarm &{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY} &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} Log Verifying results - Verify Mock Expectation ${req} + Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req} Log Cleaning the endpoint Clear Requests ${notification_ep} Deliver a notification - Alarm Clearance + [Documentation] Test ID: 7.4.5.2 + ... Test title: Deliver a notification - Alarm Clearance + ... Test objective: The objective is to notify a VNF alarm or that the alarm list has been rebuilt. + ... Pre-conditions: The VNF has subscribed to the VNFM alarm + ... Reference: section 7.4.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: log The POST method delivers a notification - Information of a VNF alarm. ${json}= Get File schemas/alarmClearedNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json @@ -31,13 +46,20 @@ Deliver a notification - Alarm Clearance &{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY} &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} Log Verifying results - Verify Mock Expectation ${req} + Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req} Log Cleaning the endpoint Clear Requests ${notification_ep} Deliver a notification - Alarm List Rebuilt + [Documentation] Test ID: 7.4.5.3 + ... Test title: Deliver a notification - Alarm List Rebuilt + ... Test objective: The objective is to notify a VNF alarm or that the alarm list has been rebuilt. + ... Pre-conditions: The VNF has subscribed to the VNFM alarm + ... Reference: section 7.4.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: log The POST method delivers a notification - Information of a VNF alarm. ${json}= Get File schemas/alarmListRebuiltNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json @@ -45,20 +67,27 @@ Deliver a notification - Alarm List Rebuilt &{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY} &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} Log Verifying results - Verify Mock Expectation ${req} + Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req} Log Cleaning the endpoint Clear Requests ${notification_ep} Test a notification end point + [Documentation] Test ID: 7.4.5.4 + ... Test title: Test a notification end point + ... Test objective: The objective is to allow the server to test the notification endpoint that is provided by the client, e.g. during subscription + ... Pre-conditions: + ... Reference: section 7.4.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: log The GET method allows the server to test the notification endpoint - &{req}= Create Mock Request Matcher GET ${notification_ep} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Verify Mock Expectation ${req} - Clear Requests ${notification_ep} + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${notification_ep} + Log Validate Status code + Integer response status 204 + Log Validation OK PUT notification - Method not implemented log Trying to perform a PUT. This method should not be implemented diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot index 0c43fd51..3c201e20 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -27,6 +27,14 @@ Post Individual VNFInstance - Method not implemented Integer response status 405 Get Information about an individual VNF Instance + [Documentation] Test ID: 5.4.3.1 + ... Test title: Get Information about an individual VNF Instance + ... Test objective: The objective is to retrieve information about a VNF instance + ... Pre-conditions: The related VNF instance exists + ... Reference: section 5.4.3.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: log Trying to get information about an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -52,10 +60,14 @@ PUT Individual VNFInstance - Method not implemented Integer response status 405 PATCH Individual VNFInstance - [Documentation] Modify VNF Information - ... This method modifies an individual VNF instance resource. - ... Changes to the VNF configurable properties are applied to the configuration in the VNF instance, and are reflected in the representation of this resource. - ... Other changes are applied to the VNF instance information managed by the VNFM, and are reflected in the representation of this resource + [Documentation] Test ID: 5.4.3.2 + ... Test title: Modify individual VNF Information + ... Test objective: The objective is to modify an individual VNF instance resource + ... Pre-conditions: The related VNF instance exists + ... Reference: section 5.4.3.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: The VNF information modified log Trying to modify an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} @@ -70,10 +82,14 @@ PATCH Individual VNFInstance Log Validation OK PATCH Individual VNFInstance Precondition failed - [Documentation] Precondition Failed - ... A precondition given in an HTTP request header is not fulfilled. - ... Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity. - ... The response body should contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error. + [Documentation] Test ID: 5.4.3.2-1 + ... Test title: Modify individual VNF Information - Precondition failed + ... Test objective: The objective is to modify an individual VNF instance resource + ... Pre-conditions: the resource was modified by another entity (Etag modified in the meanwhile). + ... Reference: section 5.4.3.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: Depends On Test PATCH Individual VNFInstance # If the previous test scceeded, it means that Etag has been modified log Trying to modify an individual VNF instance Precondition failed Set Headers {"Accept":"${ACCEPT}"} @@ -90,10 +106,14 @@ PATCH Individual VNFInstance Precondition failed Log Validation OK PATCH Individual VNFInstance Conflict - # TODO: Need to set the pre-condition of the test - [Documentation] Conflict - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that another LCM operation is ongoing. The response body shall contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error. + [Documentation] Test ID: 5.4.3.2-2 + ... Test title: Modify individual VNF Information - Conflict + ... Test objective: The objective is to modify an individual VNF instance resource + ... Pre-conditions: the resource is in a state that PATCH operation is not permitted + ... Reference: section 5.4.3.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: [Setup] Launch another LCM operation log Trying to modify an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFTaskHighLevel.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFTaskHighLevel.robot deleted file mode 100644 index 48c1c19a..00000000 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFTaskHighLevel.robot +++ /dev/null @@ -1,80 +0,0 @@ -*** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt -Library REST http://${VNFM_HOST}:${VNFM_PORT} spec=SOL003-VNFLifecycleManagement-API.yaml -Library OperatingSystem -Library BuiltIn -Library JSONLibrary - -*** Variables *** -${GRANT_POLLING_TOT} 2 -${GRANT_POLLING_INTERVAL} 5s -${SCALE_POLLING_TOT} 10 -${SCALE_POLLING_INTERVAL} 15s -${headers} -${vnfLcmOpOccId} -${status} - -*** Test Cases *** -Scale Out a vnfInstance - [Documentation] Test ID: 5.x.y.x - ... Test title: Scale out VNF operation - ... Test objective: The objective is to test a scale out of an existing VNF instance - ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.a.b.c) - ... Reference: section 5.4.5 - SOL003 v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: Scale operation is supported for the VNF (as capability in the VNFD) - ... NFVO is not subscribed for - ... Post-Conditions: VNF instance still in INSTANTIATED state and VNF was scaled - [Setup] Check resource existance - Send VNFScaleOut request - Check Response Status 202 ${status} - Get VnfLcmOpOccId - Check Operation Status Transition from starting to processing - Check Operation Status Transition from processing to completed - -*** Keywords *** -Check resource existance - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check Response Status - [Arguments] ${expected_status} ${status} - Should Be Equal ${expected_status} ${status} - -Send VNFscaleOut Request - Log Trying to scale 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 json/scaleVnfOutRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - ${headers}= Output response headers - ${headers}= evaluate json.loads('''${headers}''') json - ${status}= Output response status - -Get VnfLcmOpOccId - ${vnfLcmOpOccId}= Get Value From Json ${headers} $..Location - Should Not Be Empty ${vnfLcmOpOccId} - -Check Operation Status Transition from starting to processing - Check Operation Status Transition ${vnfLcmOpOccId} STARTING PROCESSING ${GRANT_POLLING_TOT} ${GRANT_POLLING_INTERVAL} - -Check Operation Status Transition from processing to completed - Check Operation Status Transition ${vnfLcmOpOccId} PROCESSING COMPLETED ${SCALE_POLLING_TOT} ${SCALE_POLLING_INTERVAL} - -Check Operation Status Transition - [Arguments] ${vnfLcmOpOccId} ${initial_status} ${final_status} ${POLLING_TOT} ${POLLING_INTERVAL} - :FOR ${INDEX} IN RANGE 1 ${POLLING_TOT} - \ GET ${apiRoot}/${apiName}/${apiVersion}/${vnfLcmOpOccId} - \ ${status}= Output response status - \ Check Response Status 200 ${status} - \ ${body}= Output response body - \ ${json}= evaluate json.loads('''${body}''') json - \ ${operationState}= Get Value From Json ${json} $..operationState - \ Run Keyword If Should Not Be Equal ${initial_status} ${operationState} Exit For Loop - \ Sleep ${POLLING_INTERVAL} - Should Be Equal ${final_status} ${operationState} diff --git a/SOL003/VNFLifecycleManagement-API/VNFInstances.robot b/SOL003/VNFLifecycleManagement-API/VNFInstances.robot index 9670106c..fda8868e 100644 --- a/SOL003/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL003/VNFLifecycleManagement-API/VNFInstances.robot @@ -11,7 +11,14 @@ Library JSONSchemaLibrary schemas/ *** Test cases *** Create a new vnfInstance - [Setup] #make sure the vnfInstand ${vnfInstanceId} doesn't exist + [Documentation] Test ID: 5.4.2.1 + ... Test title: Create a VNF instance + ... Test objective: The objective is to create a new VNF instance resource + ... Pre-conditions: VNF instance with the given vnfInstanceId doesn't exist + ... Reference: section 5.4.2.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: VNF instance created Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -30,6 +37,14 @@ Create a new vnfInstance Log Validation OK Get information about multiple VNF instances + [Documentation] Test ID: 5.4.2.2 + ... Test title: Get information about multiple VNF instances + ... Test objective: The objective is to query information about multiple VNF instances + ... Pre-conditions: + ... Reference: section 5.4.2.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -46,6 +61,15 @@ Get information about multiple VNF instances Log Validation OK Get information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters + [Documentation] Test ID: 5.4.2.2-1 + ... Test title: Get information about multiple VNF instances - Invalid attribute-based filtering parameters + ... Test objective: The objective is to query information about multiple VNF instances with Invalid attribute-based filtering parameters + ... Pre-conditions: + ... Reference: section 5.4.2.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + Log Query VNF The GET method queries information about multiple VNF instances. Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -59,6 +83,14 @@ Get information about multiple VNF instances Bad Request Invalid attribute-based Log Validation OK Get information about multiple VNF instances Bad Request Invalid attribute selector + [Documentation] Test ID: 5.4.2.2-1 + ... Test title: Get information about multiple VNF instances - Invalid attribute selector + ... Test objective: The objective is to query information about multiple VNF instances with Invalid attribute selector + ... Pre-conditions: + ... Reference: section 5.4.2.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} -- GitLab