From 853737b10a79a81a4411abe686826e3dda939d90 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Fri, 11 Dec 2020 15:19:36 +0100 Subject: [PATCH 1/7] Fix issue #20 --- .../Subscriptions.robot | 110 ++++++++++-------- .../NSFMOperationKeywords.robot | 49 ++++---- .../NSFaultManagement-API/Subscriptions.robot | 52 ++++++--- .../environment/variables.txt | 2 - 4 files changed, 124 insertions(+), 89 deletions(-) diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index 3c6434819..7885715f0 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -22,33 +22,46 @@ Create a new subscription Check HTTP Response Header Contain Link Check Postcondition resource exists -Create a new Subscription - DUPLICATION - [Documentation] Test ID: 6.3.4.4.2 - ... Test title: Create a new Subscription - DUPLICATION - ... Test objective: The objective is to create a duplicate subscription. - ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: the VNFM does not allow creation of a subscription resource if another subscription resource with the same filter and callbackUri already exists - ... Post-Conditions: duplicated subscription is created - Post Create subscription - DUPLICATION - Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is FmSubscription - Check HTTP Response Header Contain Link - Check Postcondition Duplicate Subscription exsist +# Create a new Subscription - DUPLICATION + # [Documentation] Test ID: 6.3.4.4.2 + # ... Test title: Create a new Subscription - DUPLICATION + # ... Test objective: The objective is to create a duplicate subscription. + # ... Pre-conditions: subscription with the same filter and callbackUri exists + # ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + # ... Config ID: Config_prod_VNFM + # ... Applicability: the VNFM does not allow creation of a subscription resource if another subscription resource with the same filter and callbackUri already exists + # ... Post-Conditions: duplicated subscription is created + # Post Create subscription - DUPLICATION + # Check HTTP Response Status Code Is 201 + # Check HTTP Response Body Json Schema Is FmSubscription + # Check HTTP Response Header Contain Link + # Check Postcondition Duplicate Subscription exsist -Create a new Subscription - NO-DUPLICATION - [Documentation] Test ID: 6.3.4.4.3 - ... Test title: Create a new Subscription - NO-DUPLICATION - ... Test objective: The objective is to create a subscription in case of not allowed DUPLICATION. +# Create a new Subscription - NO-DUPLICATION + # [Documentation] Test ID: 6.3.4.4.3 + # ... Test title: Create a new Subscription - NO-DUPLICATION + # ... Test objective: The objective is to create a subscription in case of not allowed DUPLICATION. + # ... Pre-conditions: subscription with the same filter and callbackUri exists + # ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + # ... Config ID: Config_prod_VNFM + # ... Applicability: the VNFM does not allow creation of a duplicate subscription resource + # ... Post-Conditions: duplicated subscription is not created + # Post Create subscription - DUPLICATION + # Check HTTP Response Status Code Is 303 + # Check HTTP Response Header Contain Link + +Create a duplicated Subscription + [Documentation] Test ID: 6.3.4.4.2a + ... Test title: Create a duplicated Subscription + ... Test objective: The objective is to create a duplicate subscription. ... Pre-conditions: subscription with the same filter and callbackUri exists ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: the VNFM does not allow creation of a duplicate subscription resource - ... Post-Conditions: duplicated subscription is not created - Post Create subscription - DUPLICATION - Check HTTP Response Status Code Is 303 - Check HTTP Response Header Contain Link + ... Applicability: + ... Post-Conditions: duplicated subscription is created if the IUT allows duplications, otherwise the duplicated subscription is not created + Post Create subscription + Check Response for duplicated subscription + GET Subscriptions [Documentation] Test ID: 6.3.4.4.4 @@ -311,28 +324,28 @@ Post Create subscription Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Post Create subscription - DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${template}= Get File jsons/fmSubscriptionRequest.json - ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} -Post Create subscription - NO-DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 VNFM permits duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${template}= Get File jsons/fmSubscriptionRequest.json - ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} +# Post Create subscription - DUPLICATION + # Log Trying to create a subscription with an already created content + # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test + # Set Headers {"Accept": "${ACCEPT}"} + # Set Headers {"Content-Type": "${CONTENT_TYPE}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + # ${template}= Get File jsons/fmSubscriptionRequest.json + # ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + # ${outputResponse}= Output response + # Set Global Variable ${response} ${outputResponse} +# Post Create subscription - NO-DUPLICATION + # Log Trying to create a subscription with an already created content + # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 VNFM permits duplication. Skipping the test + # Set Headers {"Accept": "${ACCEPT}"} + # Set Headers {"Content-Type": "${CONTENT_TYPE}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + # ${template}= Get File jsons/fmSubscriptionRequest.json + # ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + # ${outputResponse}= Output response + # Set Global Variable ${response} ${outputResponse} Get subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} @@ -505,4 +518,9 @@ Check Postcondition resource exists Integer response status 200 Check Postcondition Duplicate Subscription exsist - Should Not Be Equal As Strings ${response['body']['callbackUri']} ${subscriptionId} \ No newline at end of file + Should Not Be Equal As Strings ${response['body']['callbackUri']} ${subscriptionId} + +Check Response for duplicated subscription + Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Status Code Is 201 + Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Body Json Schema Is FmSubscription + Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 Check HTTP Response Status Code Is 303 diff --git a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot index ab113914a..4d9893ce8 100644 --- a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot +++ b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot @@ -219,29 +219,29 @@ POST Subscription ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Post Create subscription - DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${template}= Get File jsons/fmSubscriptionRequest.json - ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} +# Post Create subscription - DUPLICATION + # Log Trying to create a subscription with an already created content + # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test + # Set Headers {"Accept": "${ACCEPT}"} + # Set Headers {"Content-Type": "${CONTENT_TYPE}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + # ${template}= Get File jsons/fmSubscriptionRequest.json + # ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + # ${outputResponse}= Output response + # Set Global Variable ${response} ${outputResponse} -Post Create subscription - NO-DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 NVFO permits duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${template}= Get File jsons/fmSubscriptionRequest.json - ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} +# Post Create subscription - NO-DUPLICATION + # Log Trying to create a subscription with an already created content + # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 NVFO permits duplication. Skipping the test + # Set Headers {"Accept": "${ACCEPT}"} + # Set Headers {"Content-Type": "${CONTENT_TYPE}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + # ${template}= Get File jsons/fmSubscriptionRequest.json + # ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + # ${outputResponse}= Output response + # Set Global Variable ${response} ${outputResponse} GET Subscriptions Log Get the list of active subscriptions @@ -617,3 +617,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri :FOR ${item} IN @{response['body']} Should Contain Match ${item['filter']['probableCauses']} ${probableCause} case_insensitive=True END + +Check Response for duplicated subscription + Run Keyword If ${NFVO_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Status Code Is 201 + Run Keyword If ${NFVO_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Body Json Schema Is FmSubscription + Run Keyword If ${NFVO_ALLOWS_DUPLICATE_SUBS} == 0 Check HTTP Response Status Code Is 303 diff --git a/SOL005/NSFaultManagement-API/Subscriptions.robot b/SOL005/NSFaultManagement-API/Subscriptions.robot index 4b7e352fa..b8e00065e 100644 --- a/SOL005/NSFaultManagement-API/Subscriptions.robot +++ b/SOL005/NSFaultManagement-API/Subscriptions.robot @@ -22,32 +22,46 @@ Create a new alarm subscription Check Operation Occurrence Id Check HTTP Response Body Json Schema Is FmSubscription -Create a new alarm subscription - DUPLICATION - [Documentation] Test ID: 5.3.3.3.2 - ... Test title: Create a new alarm subscription - DUPLICATION +# Create a new alarm subscription - DUPLICATION + # [Documentation] Test ID: 5.3.3.3.2 + # ... Test title: Create a new alarm subscription - DUPLICATION + # ... Test objective: The objective is to create a new subscription with the NFV allowing duplication and perform a JSON schema and content validation of the returned fault management alarms subscription data structure.. + # ... Pre-conditions: subscription with the same filter and callbackUri exists + # ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + # ... Config ID: Config_prod_NFVO + # ... Applicability: the NFVO allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists + # ... Post-Conditions: none + # Post Create subscription - DUPLICATION + # Check HTTP Response Status Code Is 201 + # Check Operation Occurrence Id + # Check HTTP Response Body Json Schema Is FmSubscription + +# Create a new alarm subscription - NO DUPLICATION + # [Documentation] Test ID: 5.3.3.3.3 + # ... Test title: Create a new alarm subscription - NO DUPLICATION + # ... Test objective: The objective is to create a new subscription with the NFV not allowing duplication and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. + # ... Pre-conditions: subscription with the same filter and callbackUri exists + # ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + # ... Config ID: Config_prod_NFVO + # ... Applicability: the NFVO decides to not create a duplicate subscription resource + # ... Post-Conditions: none + # Post Create subscription - NO-DUPLICATION + # Check HTTP Response Status Code Is 303 + # Check Operation Occurrence Id + +Create a duplicated Subscription + [Documentation] Test ID: 5.3.3.3.2a + ... Test title: Create a duplicated alarm subscription ... Test objective: The objective is to create a new subscription with the NFV allowing duplication and perform a JSON schema and content validation of the returned fault management alarms subscription data structure.. ... Pre-conditions: subscription with the same filter and callbackUri exists ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: the NFVO allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists + ... Applicability: ... Post-Conditions: none - Post Create subscription - DUPLICATION - Check HTTP Response Status Code Is 201 + POST Subscription + Check Response for duplicated subscription Check Operation Occurrence Id - Check HTTP Response Body Json Schema Is FmSubscription -Create a new alarm subscription - NO DUPLICATION - [Documentation] Test ID: 5.3.3.3.3 - ... Test title: Create a new alarm subscription - NO DUPLICATION - ... Test objective: The objective is to create a new subscription with the NFV not allowing duplication and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. - ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: the NFVO decides to not create a duplicate subscription resource - ... Post-Conditions: none - Post Create subscription - NO-DUPLICATION - Check HTTP Response Status Code Is 303 - Check Operation Occurrence Id Retrieve a list of alarm subscriptions [Documentation] Test ID: 5.3.3.3.4 diff --git a/SOL005/NSFaultManagement-API/environment/variables.txt b/SOL005/NSFaultManagement-API/environment/variables.txt index 848b78e97..0ae86d8e1 100644 --- a/SOL005/NSFaultManagement-API/environment/variables.txt +++ b/SOL005/NSFaultManagement-API/environment/variables.txt @@ -18,8 +18,6 @@ ${NFVO_ALLOWS_DUPLICATE_SUBS} 0 ${fields} criteria,objectInstanceIds -${VNFM_ALLOWS_DUPLICATE_SUBS} 0 - ${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${faultyNestedNsInstanceId} faultyNestedNsInstanceId ${faultyNsVirtualLinkInstanceId} faultyNsVirtualLinkInstanceId -- GitLab From 6fb7569d3eeb57cf0b3ac90c5930eb89e8587cc2 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Fri, 11 Dec 2020 15:19:54 +0100 Subject: [PATCH 2/7] Fix issue #44 --- .../schemas/subscriptions.schema.json | 149 +++++++++++++++++- 1 file changed, 148 insertions(+), 1 deletion(-) diff --git a/SOL003/VNFLifecycleManagement-API/schemas/subscriptions.schema.json b/SOL003/VNFLifecycleManagement-API/schemas/subscriptions.schema.json index fefb142da..75ab7eb89 100644 --- a/SOL003/VNFLifecycleManagement-API/schemas/subscriptions.schema.json +++ b/SOL003/VNFLifecycleManagement-API/schemas/subscriptions.schema.json @@ -1 +1,148 @@ -{ "type": "array", "items": { "description": "This type represents a subscription.\n", "type": "object", "required": [ "id", "callbackUri", "_links" ], "properties": { "id": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" }, "filter": { "description": "This type represents a filter that can be used to subscribe for notifications related to performance management events.\n", "type": "object", "properties": { "vnfInstanceSubscriptionFilter": { "description": "This type represents subscription filter criteria to match VNF instances.\n", "type": "object", "properties": { "vnfdIds": { "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfProductsFromProviders": { "description": "If present, match VNF instances that belong to VNF products from certain providers. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProvider" ], "properties": { "vnfProvider": { "description": "Name of the VNF provider to match.\n", "type": "string" }, "vnfProducts": { "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProductName" ], "properties": { "vnfProductName": { "description": "Name of the VNF product to match.\n", "type": "string" }, "versions": { "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfSoftwareVersion" ], "properties": { "vnfSoftwareVersion": { "description": "A version.\n", "type": "string" }, "vnfdVersions": { "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n", "type": "array", "items": { "description": "A version.\n", "type": "string" } } } } } } } } } } }, "vnfInstanceIds": { "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfInstanceNames": { "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "type": "string" } } } }, "notificationTypes": { "description": "Match particular notification types. Permitted values: * ThresholdCrossedNotification * PerformanceInformationAvailableNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n", "type": "string", "enum": [ "ThresholdCrossedNotification", "PerformanceInformationAvailableNotification" ] } } }, "callbackUri": { "description": "The URI of the endpoint to send the notification to.\n", "type": "string", "format": "url" }, "_links": { "description": "Links to resources related to this resource.\n", "type": "object", "required": [ "self" ], "properties": { "self": { "description": "This type represents a link to a resource.\n", "type": "object", "required": [ "href" ], "properties": { "href": { "description": "URI of the referenced resource.\n", "type": "string", "format": "url" } } } } } } }} \ No newline at end of file +{ + "type": "array", + "items": { + "description": "This type represents a subscription related to notifications about VNF lifecycle changes.\n", + "type": "object", + "required": ["id", "callbackUri", "_links"], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "filter": { + "description": "This type represents a subscription filter related to notifications about VNF lifecycle changes. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n", + "type": "object", + "properties": { + "vnfInstanceSubscriptionFilter": { + "description": "This type represents subscription filter criteria to match VNF instances.\n", + "type": "object", + "properties": { + "vnfdIds": { + "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "vnfProductsFromProviders": { + "description": "If present, match VNF instances that belong to VNF products from certain providers. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "type": "object", + "required": ["vnfProvider"], + "properties": { + "vnfProvider": { + "description": "Name of the VNF provider to match.\n", + "type": "string" + }, + "vnfProducts": { + "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n", + "type": "array", + "items": { + "type": "object", + "required": ["vnfProductName"], + "properties": { + "vnfProductName": { + "description": "Name of the VNF product to match.\n", + "type": "string" + }, + "versions": { + "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n", + "type": "array", + "items": { + "type": "object", + "required": ["vnfSoftwareVersion"], + "properties": { + "vnfSoftwareVersion": { + "description": "A version.\n", + "type": "string" + }, + "vnfdVersions": { + "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n", + "type": "array", + "items": { + "description": "A version.\n", + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "vnfInstanceIds": { + "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "vnfInstanceNames": { + "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "notificationTypes": { + "description": "Match particular notification types. Permitted values: * VnfLcmOperationOccurrenceNotification * VnfIdentifierCreationNotification * VnfIdentifierDeletionNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n", + "type": "array", + "items": { + "type": "string", + "enum": ["VnfLcmOperationOccurrenceNotification", "VnfIdentifierCreationNotification", "VnfIdentifierDeletionNotification"] + } + }, + "operationTypes": { + "description": "Match particular VNF lifecycle operation types for the notification of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n", + "type": "array", + "items": { + "description": "Value | Description ------|------------ INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. SCALE | Represents the \"Scale VNF\" LCM operation. SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. CHANGE_FLAVOUR | Represents the \"Change VNF Flavour\" LCM operation. TERMINATE | Represents the \"Terminate VNF\" LCM operation. HEAL | Represents the \"Heal VNF\" LCM operation. OPERATE | Represents the \"Operate VNF\" LCM operation. CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation. \n", + "type": "string", + "enum": ["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"] + } + }, + "operationStates": { + "description": "Match particular LCM operation state values as reported in notifications of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n", + "type": "array", + "items": { + "description": "Value | Description ------|------------ STARTING | The LCM operation is starting. PROCESSING | The LCM operation is currently in execution. COMPLETED | he LCM operation has been completed successfully. FAILED_TEMP | The LCM operation has failed and execution has stopped, but the execution of the operation is not considered to be closed. FAILED | The LCM operation has failed and it cannot be retried or rolled back, as it is determined that such action won't succeed. ROLLING_BACK | The LCM operation is currently being rolled back. ROLLED_BACK | The LCM operation has been successfully rolled back, i.e. The state of the VNF prior to the original operation invocation has been restored as closely as possible.\n", + "type": "string", + "enum": ["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"] + } + } + } + }, + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "_links": { + "description": "Links to resources related to this resource.\n", + "type": "object", + "required": ["self"], + "properties": { + "self": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": ["href"], + "properties": { + "href": { + "description": "URI of the referenced resource.\n", + "type": "string", + "format": "url" + } + } + } + } + } + } + } +} -- GitLab From 0d00a9b3cd92652e41177b3e61651a9cccc1ceca Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Fri, 11 Dec 2020 15:33:54 +0100 Subject: [PATCH 3/7] Fix issue #73 --- SOL002/VNFConfiguration-API/ApiVersion.robot | 2 +- SOL002/VNFFaultManagement-API/ApiVersion.robot | 2 +- SOL002/VNFIndicator-API/ApiVersion.robot | 2 +- SOL002/VNFLifecycleManagement-API/ApiVersion.robot | 2 +- SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot | 2 +- SOL002/VNFPerformanceManagement-API/ApiVersion.robot | 2 +- SOL003/VNFFaultManagement-API/ApiVersion.robot | 2 +- SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot | 2 +- SOL003/VNFIndicator-API/ApiVersion.robot | 2 +- SOL003/VNFLifecycleManagement-API/ApiVersion.robot | 2 +- SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot | 2 +- SOL003/VNFLifecycleOperationGranting-API/Grants.robot | 2 +- SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot | 2 +- SOL003/VNFPackageManagement-API/ApiVersion.robot | 2 +- SOL003/VNFPerformanceManagement-API/ApiVersion.robot | 2 +- .../ApiVersion.robot | 2 +- .../VRQANOperationKeywords.robot | 2 +- SOL005/NSDManagement-API/ApiVersion.robot | 2 +- SOL005/NSFaultManagement-API/ApiVersion.robot | 2 +- SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot | 2 +- SOL005/NSLifecycleManagement-API/ApiVersion.robot | 2 +- SOL005/NSPerformanceManagement-API/ApiVersion.robot | 2 +- SOL005/VNFPackageManagement-API/ApiVersion.robot | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/SOL002/VNFConfiguration-API/ApiVersion.robot b/SOL002/VNFConfiguration-API/ApiVersion.robot index 43b857994..108cbe0d9 100644 --- a/SOL002/VNFConfiguration-API/ApiVersion.robot +++ b/SOL002/VNFConfiguration-API/ApiVersion.robot @@ -206,6 +206,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL002/VNFFaultManagement-API/ApiVersion.robot b/SOL002/VNFFaultManagement-API/ApiVersion.robot index 2f4b46c4a..48a593c97 100644 --- a/SOL002/VNFFaultManagement-API/ApiVersion.robot +++ b/SOL002/VNFFaultManagement-API/ApiVersion.robot @@ -208,6 +208,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/ApiVersion.robot b/SOL002/VNFIndicator-API/ApiVersion.robot index 9a60cbe3f..a89c0b19d 100644 --- a/SOL002/VNFIndicator-API/ApiVersion.robot +++ b/SOL002/VNFIndicator-API/ApiVersion.robot @@ -208,6 +208,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/ApiVersion.robot b/SOL002/VNFLifecycleManagement-API/ApiVersion.robot index 2b94beca1..1c1ea5db5 100644 --- a/SOL002/VNFLifecycleManagement-API/ApiVersion.robot +++ b/SOL002/VNFLifecycleManagement-API/ApiVersion.robot @@ -206,6 +206,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 210784c18..8cd37ad8b 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -33,7 +33,7 @@ Check Operation Occurrence Id Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/ApiVersion.robot b/SOL002/VNFPerformanceManagement-API/ApiVersion.robot index 168033e8d..0e98a8396 100644 --- a/SOL002/VNFPerformanceManagement-API/ApiVersion.robot +++ b/SOL002/VNFPerformanceManagement-API/ApiVersion.robot @@ -206,6 +206,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/ApiVersion.robot b/SOL003/VNFFaultManagement-API/ApiVersion.robot index 943898e57..b265a9a56 100644 --- a/SOL003/VNFFaultManagement-API/ApiVersion.robot +++ b/SOL003/VNFFaultManagement-API/ApiVersion.robot @@ -208,6 +208,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot index 1f9b5e86e..cbf26efb8 100644 --- a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot @@ -60,7 +60,7 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFIndicator-API/ApiVersion.robot b/SOL003/VNFIndicator-API/ApiVersion.robot index bcb0549b0..4c8aa20c1 100644 --- a/SOL003/VNFIndicator-API/ApiVersion.robot +++ b/SOL003/VNFIndicator-API/ApiVersion.robot @@ -208,6 +208,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ApiVersion.robot b/SOL003/VNFLifecycleManagement-API/ApiVersion.robot index 46cba71dd..e19b65ac9 100644 --- a/SOL003/VNFLifecycleManagement-API/ApiVersion.robot +++ b/SOL003/VNFLifecycleManagement-API/ApiVersion.robot @@ -207,6 +207,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot index 0e97091ce..b9291d316 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot @@ -208,6 +208,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index 4f9ce5172..6b791381a 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -172,7 +172,7 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Get an individual grant - Successful diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index 52b961997..f4f267ef1 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -158,5 +158,5 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} diff --git a/SOL003/VNFPackageManagement-API/ApiVersion.robot b/SOL003/VNFPackageManagement-API/ApiVersion.robot index 689766575..41eeca71b 100644 --- a/SOL003/VNFPackageManagement-API/ApiVersion.robot +++ b/SOL003/VNFPackageManagement-API/ApiVersion.robot @@ -210,6 +210,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/ApiVersion.robot b/SOL003/VNFPerformanceManagement-API/ApiVersion.robot index b975fc71f..88ba224c7 100644 --- a/SOL003/VNFPerformanceManagement-API/ApiVersion.robot +++ b/SOL003/VNFPerformanceManagement-API/ApiVersion.robot @@ -209,6 +209,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot index 37cd37715..45cf503da 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot @@ -206,6 +206,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot index f33ff0732..8aab471ed 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot @@ -34,7 +34,7 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL005/NSDManagement-API/ApiVersion.robot b/SOL005/NSDManagement-API/ApiVersion.robot index 0d34a455b..aa117f09b 100644 --- a/SOL005/NSDManagement-API/ApiVersion.robot +++ b/SOL005/NSDManagement-API/ApiVersion.robot @@ -208,6 +208,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/ApiVersion.robot b/SOL005/NSFaultManagement-API/ApiVersion.robot index 5038878de..5b8291f74 100644 --- a/SOL005/NSFaultManagement-API/ApiVersion.robot +++ b/SOL005/NSFaultManagement-API/ApiVersion.robot @@ -208,6 +208,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot index 4d9893ce8..20e4d62ac 100644 --- a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot +++ b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot @@ -35,7 +35,7 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL005/NSLifecycleManagement-API/ApiVersion.robot b/SOL005/NSLifecycleManagement-API/ApiVersion.robot index 76b1e5d1c..fcbaad59f 100644 --- a/SOL005/NSLifecycleManagement-API/ApiVersion.robot +++ b/SOL005/NSLifecycleManagement-API/ApiVersion.robot @@ -208,6 +208,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL005/NSPerformanceManagement-API/ApiVersion.robot b/SOL005/NSPerformanceManagement-API/ApiVersion.robot index 8b20e5a67..8619b4931 100644 --- a/SOL005/NSPerformanceManagement-API/ApiVersion.robot +++ b/SOL005/NSPerformanceManagement-API/ApiVersion.robot @@ -208,6 +208,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/ApiVersion.robot b/SOL005/VNFPackageManagement-API/ApiVersion.robot index 640b20e7c..5dc01749c 100644 --- a/SOL005/VNFPackageManagement-API/ApiVersion.robot +++ b/SOL005/VNFPackageManagement-API/ApiVersion.robot @@ -207,6 +207,6 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file -- GitLab From 01a6bea91158f0160d3ade1115fde1129537d5e7 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Fri, 11 Dec 2020 15:42:42 +0100 Subject: [PATCH 4/7] Fix issue #71 --- .../ScaleVNFTask.robot | 6 ++-- .../VnfLcmOperationKeywords.robot | 30 ++++++++++++++++--- .../environment/variables.txt | 3 +- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot b/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot index f34e1bf96..e545c237d 100644 --- a/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot @@ -17,7 +17,7 @@ POST Scale a vnfInstance ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - POST Scale vnfInstance + POST Scale vnfInstance 0 Check HTTP Response Status Code Is 202 Check Operation Occurrence Id @@ -30,7 +30,7 @@ POST Scale a vnfInstance Conflict (Not-Instantiated) ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - POST Scale vnfInstance + POST Scale vnfInstance 1 Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -43,7 +43,7 @@ POST Scale a vnfInstance Not Found ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - POST Scale vnfInstance + POST Scale vnfInstance 2 Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 8cd37ad8b..f4dd79745 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -252,16 +252,38 @@ DELETE instantiate individual vnfInstance ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -POST Scale vnfInstance + +POST Scale vnfInstance + [Arguments] ${vnf_state} + [Documentation] ${vnf_state} differentiate the VNF ID to be used in the different POST requests + ... ${vnf_state} == 0 -> VNF in instantiated state + ... ${vnf_state} == 1 -> VNF in not_instantiated state + ... ${vnf_state} == 2 -> VNF ID not stored + ... 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}"} - ${template}= Get File jsons/scaleVnfRequest.json - ${body}= Format String ${template} scaleVnfRequesttype=${scaleVnfRequesttype} scaleVnfRequestAspect=${scaleVnfRequestAspect} + ${body}= Get File jsons/scaleVnfRequest.json + Run Keyword If ${vnf_state} == 0 Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${instantiatedVnfInstanceId}/scale ${body} + Run Keyword If ${vnf_state} == 1 Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/scale ${body} + Run Keyword If ${vnf_state} == 2 Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${NOT_EXISTANT_VNF_INSTANCE_ID}/scale ${body} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - ${outputResponse}= Output response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + + +# POST Scale vnfInstance + # 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}"} + # ${template}= Get File jsons/scaleVnfRequest.json + # ${body}= Format String ${template} scaleVnfRequesttype=${scaleVnfRequesttype} scaleVnfRequestAspect=${scaleVnfRequestAspect} + # Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body} + # ${outputResponse}= Output response + # Set Global Variable ${response} ${outputResponse} GET Scale vnfInstance Log Trying to get a scale a vnf Instance Set Headers {"Accept":"${ACCEPT}"} diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index 29e211d27..922dc705f 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -38,7 +38,8 @@ ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${VnfLcmOperationOccurrenceNotification} {} ${VnfIdentifierCreationNotification} {} ${VnfIdentifierDeletionNotification} {} - +${notInstantiatedVnfInstanceId} NOT_INSTANTIATED_VNF_INSTANCE_ID +${NOT_EXISTANT_VNF_INSTANCE_ID} NOT_EXISTANT_VNF_INSTANCE_ID ${SYNC_MODE} 0 ${callback_uri} http://localhost -- GitLab From 71076f1736ac5b09fc4ba1ea82822f85763d34ba Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Fri, 11 Dec 2020 18:04:10 +0100 Subject: [PATCH 5/7] Fix issue #77 --- .../VNFPackageManagementKeywords.robot | 6 +++--- .../IndividualReport.robot | 12 ++++++------ .../IndividualThreshold.robot | 12 ++++++------ SOL003/VNFPerformanceManagement-API/Thresholds.robot | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 88032d975..d751124a8 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -691,13 +691,13 @@ Send Delete request for individual VNF Package Subscription with invalid resourc Set Suite Variable ${response} ${output} Send Post request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -706,7 +706,7 @@ Send Put request for individual VNF Package Subscription Set Suite Variable ${response} ${output} Send Patch request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} diff --git a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot index 62be3b6fc..48017858d 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot @@ -83,7 +83,7 @@ DELETE Individual Performance Report - Method not implemented Get Individual Performance Report Log Trying to get a performance report present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -91,21 +91,21 @@ Get Individual Performance Report Get Individual Performance Report with invalid resource endpoint Log Trying to get a performance report with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -115,7 +115,7 @@ Send Put request for Individual Performance Report Send Patch request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -125,7 +125,7 @@ Send Patch request for Individual Performance Report Send Delete request for Individual Performance Report Log Trying to delete performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot index b34edb3a9..1790d9cd4 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -113,7 +113,7 @@ PATCH Individual Threshold - Precondition failed GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -121,28 +121,28 @@ GET Individual VNF Performance Threshold GET individual VNF Performance Threshold with invalid resource identifier Log Trying to get a Threhsold with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold Log Trying to delete a Threhsold in the VNFM - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold with invalid resource identifier Log Trying to delete a Threhsold in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Threshold Log Trying to create new threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${newThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -150,7 +150,7 @@ Send Post request for individual VNF Performance Threshold Send Put request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} diff --git a/SOL003/VNFPerformanceManagement-API/Thresholds.robot b/SOL003/VNFPerformanceManagement-API/Thresholds.robot index b43be7c97..1555adaa8 100644 --- a/SOL003/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL003/VNFPerformanceManagement-API/Thresholds.robot @@ -140,7 +140,7 @@ GET Performance Thresholds - Bad Request Response too Big GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -148,7 +148,7 @@ GET all Performance Thresholds GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the VNFM with filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_OK} ${output}= Output response Set Suite Variable ${response} ${output} @@ -156,7 +156,7 @@ GET Performance Thresholds with attribute-based filter GET Performance Thresholds with invalid attribute-based filter Log Trying to get thresholds present in the VNFM with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_KO} ${output}= Output response Set Suite Variable ${response} ${output} @@ -164,7 +164,7 @@ GET Performance Thresholds with invalid attribute-based filter GET VNF Performance Thresholds with invalid resource endpoint Log Trying to get thresholds present in the VNFM with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/threshold ${output}= Output response Set Suite Variable ${response} ${output} @@ -200,7 +200,7 @@ Send PATCH Request for all Performance Thresholds Send DELETE Request for all Performance Thresholds Log DELETE THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} -- GitLab From 86bfa3cb8e646bd3f85309b5c463912b9212c37d Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Fri, 11 Dec 2020 18:05:50 +0100 Subject: [PATCH 6/7] Fix issue #83 --- .../schemas/{vnfLcmOpOcc.schema.json => VnfLcmOpOcc.schema.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename SOL003/VNFLifecycleManagement-API/schemas/{vnfLcmOpOcc.schema.json => VnfLcmOpOcc.schema.json} (100%) diff --git a/SOL003/VNFLifecycleManagement-API/schemas/vnfLcmOpOcc.schema.json b/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOpOcc.schema.json similarity index 100% rename from SOL003/VNFLifecycleManagement-API/schemas/vnfLcmOpOcc.schema.json rename to SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOpOcc.schema.json -- GitLab From d2d76d7b2ae197ebd2dcdd917b9699b78bb4339f Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Fri, 11 Dec 2020 18:50:53 +0100 Subject: [PATCH 7/7] Fix issue #89 --- .../VNFLifecycleManagement-API/RetryOperationWorkflow.robot | 4 ---- .../RollBackOperationWorkflow.robot | 4 ---- 2 files changed, 8 deletions(-) diff --git a/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot index 8544fc162..bf4db381d 100644 --- a/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot @@ -21,8 +21,6 @@ Retry VNF LCM Operation - Successful ... Post-Conditions: The VNF lifecycle management operation occurrence is in COMPLETED state Send Retry Operation Request Check HTTP Response Status Code Is 202 - Check HTTP Response Header Contains Location - Check Operation Occurrence Id existence Check Operation Notification For Retry PROCESSING Check Operation Notification For Retry COMPLETED Check Postcondition VNF Retry Successful @@ -38,8 +36,6 @@ Retry VNF LCM Operation - Unsuccessful ... Post-Conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state Send Retry Operation Request Check HTTP Response Status Code Is 202 - Check HTTP Response Header Contains Location - Check Operation Occurrence Id existence Check Operation Notification For Retry PROCESSING Check Operation Notification For Retry FAILED_TEMP Check Postcondition VNF Retry Unsuccessful diff --git a/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot index f401cc094..3e42be057 100644 --- a/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot @@ -23,8 +23,6 @@ Rollback a VNF LCM Operation - Successful ... Post-Conditions: The VNF lifecycle management operation occurrence is in ROLLED_BACK state Send Roll back Operation Request Check HTTP Response Status Code Is 202 - Check HTTP Response Header Contains Location - Check Operation Occurrence Id existence Check Operation Notification For Roll Back ROLLING_BACK Check Operation Notification For Roll Back ROLLED_BACK Check Postcondition VNF Roll Back Successful @@ -40,8 +38,6 @@ Rollback VNF LCM Operation - Unsuccessful ... Post-Conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state Send Roll back Operation Request Check HTTP Response Status Code Is 202 - Check HTTP Response Header Contains Location - Check Operation Occurrence Id existence Check Operation Notification For Roll Back ROLLING_BACK Check Operation Notification For Roll Back FAILED_TEMP Check Postcondition VNF Roll Back UnSuccessful -- GitLab