From 47dfeb563ec5840729b83b2403405bc79c9a3e87 Mon Sep 17 00:00:00 2001 From: Abbas Ahmad Date: Mon, 18 Mar 2019 06:08:37 +0100 Subject: [PATCH] SOL005 NS LCM completion --- .../IndividualSubscription.robot | 31 +++ .../NSLCMOperationKeywords.robot | 65 +++++- .../NotificationEndpoint.robot | 94 ++++++++ ...IdentifierCreationNotification.schema.json | 29 +++ ...IdentifierDeletionNotification.schema.json | 29 +++ ...perationOccurrenceNotification.schema.json | 96 ++++++++ .../schemas/subscription.schema.json | 213 +++--------------- .../schemas/subscriptions.schema.json | 176 +++------------ 8 files changed, 408 insertions(+), 325 deletions(-) create mode 100644 SOL005/NSLifecycleManagement-API/IndividualSubscription.robot create mode 100644 SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot create mode 100644 SOL005/NSLifecycleManagement-API/schemas/NsIdentifierCreationNotification.schema.json create mode 100644 SOL005/NSLifecycleManagement-API/schemas/NsIdentifierDeletionNotification.schema.json create mode 100644 SOL005/NSLifecycleManagement-API/schemas/NsLcmOperationOccurrenceNotification.schema.json diff --git a/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot b/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot new file mode 100644 index 00000000..41c47853 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot @@ -0,0 +1,31 @@ +*** Settings *** +Resource environment/variables.txt +Resource NSLCMOperationKeywords.robot +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +Suite Setup Check subscription existance + +*** Test Cases *** +Post Individual Subscription - Method not implemented + Do POST Individual Subscription + Check HTTP Response Status Code Is 405 + +Get Information about an individual subscription + Do GET Individual subscription + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is subscription.schema.json + +PUT an individual subscription - Method not implemented + Do PUT Individual Subscription + Check HTTP Response Status Code Is 405 + +PATCH an individual subscription - Method not implemented + Do PATCH Individual Subscription + Check HTTP Response Status Code Is 405 + +DELETE an individual subscription + Do DELETE Individual Subscription + Check HTTP Response Status Code Is 204 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index b54ba101..27bf5c5c 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -6,30 +6,43 @@ Library JSONSchemaLibrary schemas/ Library OperatingSystem *** Keywords *** +Create Sessions + Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + +Check subscription 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}/subscriptions/${subscriptionId} + Integer response status 200 + + Check Fail not supported Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} - # how to check if Fail is not supported? Also In Sol002 + # how to check if Fail is not supported? Also In Sol002 Check Cancel not supported Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} - # how to check if Cancel is not supported? Also In Sol002 + # how to check if Cancel is not supported? Also In Sol002 Check Continue not supported Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} - # how to check if Continue is not supported? Also In Sol002 + # how to check if Continue is not supported? Also In Sol002 Check retry not supported Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} - # how to check if retry is not supported? Also In Sol002 + # how to check if retry is not supported? Also In Sol002 Check Rollback not supported Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} - # how to check if rollback is not supported? Also In Sol002 + # how to check if rollback is not supported? Also In Sol002 Check resource FAILED_TEMP Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} @@ -775,3 +788,45 @@ Do GET Subscriptions with filter Set Global Variable @{response} ${outputResponse} +Do POST Individual Subscription + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PUT Individual Subscription + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PATCH Individual Subscription + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Individual subscription + log Trying to get information about an individual subscription + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do DELETE Individual subscription + log Try to delete an individual subscription + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} diff --git a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot new file mode 100644 index 00000000..89379316 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot @@ -0,0 +1,94 @@ +*** Settings *** +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true +Resource environment/variables.txt +Library MockServerLibrary +Library Process +Library OperatingSystem + + +*** Test Cases *** +Deliver a notification - Operation Occurence + log The POST method delivers a notification from the server to the client. + ${json}= Get File schemas/NsLcmOperationOccurrenceNotification.schema.json + ${BODY}= evaluate json.loads('''${json}''') json + Log Creating mock request and response to handle NSLcmOperationOccurrenceNotification + &{req}= Create Mock Request Matcher POST ${callback_endpoint} 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} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} + +Deliver a notification - Id Creation + log The POST method delivers a notification from the server to the client. + ${json}= Get File schemas/NsIdentifierCreationNotification.schema.json + ${BODY}= evaluate json.loads('''${json}''') json + Log Creating mock request and response to handle NsIdentifierCreationNotification + &{req}= Create Mock Request Matcher POST ${callback_endpoint}} 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} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} + +Deliver a notification - Id deletion + log The POST method delivers a notification from the server to the client. + ${json}= Get File schemas/NsIdentifierDeletionNotification.schema.json + ${BODY}= evaluate json.loads('''${json}''') json + Log Creating mock request and response to handle NsIdentifierDeletionNotification + &{req}= Create Mock Request Matcher POST ${callback_endpoint} 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} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} + +Test a notification end point + log The GET method allows the server to test the notification endpoint + &{req}= Create Mock Request Matcher GET ${callback_endpoint} + &{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 ${callback_endpoint} + +PUT notification - Method not implemented + Log PUT Method not implemented + &{req}= Create Mock Request Matcher PUT ${callback_endpoint} + &{rsp}= Create Mock Response status_code=405 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} + +PATCH subscriptions - Method not implemented + Log PATCH Method not implemented + &{req}= Create Mock Request Matcher PATCH ${callback_endpoint} + &{rsp}= Create Mock Response status_code=405 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} + + +DELETE subscriptions - Method not implemented + Log DELETE Method not implemented + &{req}= Create Mock Request Matcher DELETE ${callback_endpoint} + &{rsp}= Create Mock Response status_code=405 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} diff --git a/SOL005/NSLifecycleManagement-API/schemas/NsIdentifierCreationNotification.schema.json b/SOL005/NSLifecycleManagement-API/schemas/NsIdentifierCreationNotification.schema.json new file mode 100644 index 00000000..c3a17a7a --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/schemas/NsIdentifierCreationNotification.schema.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "required": [ + "subscriptionId", + "nsInstanceId" + ], + "properties": { + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"NsIdentifierDeletionNotification\" for this notification type.\n", + "type": "string" + }, + "subscriptionId": { + "description": "Identifier of the subscription that this notification relates to.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "timestamp": { + "description": "Date-time of the generation of the notification.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "nsInstanceId": { + "description": "The created NS instance identifier\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "_links": { + "description": "Links to resources related to this notification.\n", + "$ref": "#/definitions/LccnLinks" + } + } + } \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/schemas/NsIdentifierDeletionNotification.schema.json b/SOL005/NSLifecycleManagement-API/schemas/NsIdentifierDeletionNotification.schema.json new file mode 100644 index 00000000..c3a17a7a --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/schemas/NsIdentifierDeletionNotification.schema.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "required": [ + "subscriptionId", + "nsInstanceId" + ], + "properties": { + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"NsIdentifierDeletionNotification\" for this notification type.\n", + "type": "string" + }, + "subscriptionId": { + "description": "Identifier of the subscription that this notification relates to.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "timestamp": { + "description": "Date-time of the generation of the notification.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "nsInstanceId": { + "description": "The created NS instance identifier\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "_links": { + "description": "Links to resources related to this notification.\n", + "$ref": "#/definitions/LccnLinks" + } + } + } \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/schemas/NsLcmOperationOccurrenceNotification.schema.json b/SOL005/NSLifecycleManagement-API/schemas/NsLcmOperationOccurrenceNotification.schema.json new file mode 100644 index 00000000..dc2155d6 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/schemas/NsLcmOperationOccurrenceNotification.schema.json @@ -0,0 +1,96 @@ +{ + "type": "object", + "required": [ + "id", + "nsInstanceId", + "nsLcmOpOccId", + "subscriptionId" + ], + "properties": { + "id": { + "description": "Identifier of this notification. If a notification is sent multiple times due to multiple subscriptions, the \"id\" attribute of all these notifications shall have the same value.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "nsInstanceId": { + "description": "The identifier of the NS instance affected.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "nsLcmOpOccId": { + "description": "The identifier of the NS lifecycle operation occurrence associated to the notification.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "operation": { + "description": "The lifecycle operation.\n", + "$ref": "#/definitions/NsLcmOpType" + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"NsLcmOperationOccurrenceNotification\" for this notification type.\n", + "type": "string" + }, + "subscriptionId": { + "description": "Identifier of the subscription that this notification relates to.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "timestamp": { + "description": "Date-time of the generation of the notification.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "notificationStatus": { + "description": "Indicates whether this notification reports about the start of a NS lifecycle operation or the result of a NS lifecycle operation. Permitted values: - START: Informs about the start of the NS LCM operation occurrence. - RESULT: Informs about the final or intermediate result of the NS LCM operation occurrence.\n", + "type": "string", + "enum": [ + "START", + "RESULT" + ] + }, + "operationState": { + "description": "The state of the NS lifecycle operation occurrence.\n", + "$ref": "#/definitions/NsLcmOperationStateType" + }, + "isAutomaticInvocation": { + "description": "Set to true if this NS LCM operation occurrence has been automatically triggered by the NFVO. This occurs in case of auto-scaling, auto-healing and when a nested NS is modified as a result of an operation on its composite NS. Set to false otherwise.\n", + "type": "boolean" + }, + "affectedVnf": { + "description": "Information about the VNF instances that were affected during the lifecycle operation.\n", + "$ref": "#/definitions/AffectedVnf" + }, + "affectedPnf": { + "description": "Information about the PNF instances that were affected during the lifecycle operation.\n", + "$ref": "#/definitions/AffectedPnf" + }, + "affectedVl": { + "description": "Information about the VL instances that were affected during the lifecycle operation.\n", + "type": "array", + "items": { + "$ref": "#/definitions/AffectedVirtualLink" + } + }, + "affectedVnffg": { + "description": "Information about the VNFFG instances that were affected during the lifecycle operation.\n", + "type": "array", + "items": { + "$ref": "#/definitions/AffectedVnffg" + } + }, + "affectedNs": { + "description": "Information about the SAP instances that were affected during the lifecycle operation. See note.\n", + "type": "array", + "items": { + "$ref": "#/definitions/AffectedSap" + } + }, + "affectedSap": { + "description": "The lifecycle operation.\n", + "$ref": "#/definitions/NsLcmOpType" + }, + "error": { + "description": "Details of the latest error, if one has occurred during executing the LCM operation (see clause 4.3.5). Shall be present if operationState is \"FAILED_TEMP\" or \"FAILED\", and shall be absent otherwise.\n", + "$ref": "SOL005_def.yaml#/definitions/ProblemDetails" + }, + "_links": { + "description": "Links to resources related to this notification.\n", + "$ref": "#/definitions/LccnLinks" + } + } +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/schemas/subscription.schema.json b/SOL005/NSLifecycleManagement-API/schemas/subscription.schema.json index 952a0734..cb16a220 100644 --- a/SOL005/NSLifecycleManagement-API/schemas/subscription.schema.json +++ b/SOL005/NSLifecycleManagement-API/schemas/subscription.schema.json @@ -1,181 +1,36 @@ { - "type": "object", - "description": "This type represents a subscription related to notifications about VNF lifecycle changes.\n", - "required": [ - "id", - "callbackUri", - "_links" - ], - "properties": { - "id": { - "type": "string", - "description": "An identifier with the intention of being globally unique.\n" - }, - "filter": { - "type": "object", - "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", - "properties": { - "vnfInstanceSubscriptionFilter": { - "type": "object", - "description": "This type represents subscription filter criteria to match VNF instances.\n", - "properties": { - "vnfdIds": { - "type": "array", - "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", - "items": { - "type": "string", - "description": "An identifier with the intention of being globally unique.\n" - } - }, - "vnfProductsFromProviders": { - "type": "array", - "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", - "items": { - "type": "object", - "required": [ - "vnfProvider" - ], - "properties": { - "vnfProvider": { - "type": "string", - "description": "Name of the VNF provider to match.\n" - }, - "vnfProducts": { - "type": "array", - "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n", - "items": { - "type": "object", - "required": [ - "vnfProductName" - ], - "properties": { - "vnfProductName": { - "type": "string", - "description": "Name of the VNF product to match.\n" - }, - "versions": { - "type": "array", - "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n", - "items": { - "type": "object", - "required": [ - "vnfSoftwareVersion" - ], - "properties": { - "vnfSoftwareVersion": { - "type": "string", - "description": "A version.\n" - }, - "vnfdVersions": { - "type": "array", - "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", - "items": { - "type": "string", - "description": "A version.\n" - } - } - } - } - } - } - } - } - } - } - }, - "vnfInstanceIds": { - "type": "array", - "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", - "items": { - "type": "string", - "description": "An identifier with the intention of being globally unique.\n" - } - }, - "vnfInstanceNames": { - "type": "array", - "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", - "items": { - "type": "string" - } - } - } - }, - "notificationTypes": { - "type": "array", - "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", - "items": { - "type": "string", - "enum": [ - "VnfLcmOperationOccurrenceNotification", - "VnfIdentifierCreationNotification", - "VnfIdentifierDeletionNotification" - ] - } - }, - "operationTypes": { - "type": "array", - "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", - "items": { - "type": "string", - "enum": [ - "INSTANTIATE", - "SCALE", - "SCALE_TO_LEVEL", - "CHANGE_FLAVOUR", - "TERMINATE", - "HEAL", - "OPERATE", - "CHANGE_EXT_CONN", - "MODIFY_INFO" - ], - "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" - } - }, - "operationStates": { - "type": "array", - "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", - "items": { - "type": "string", - "enum": [ - "STARTING", - "PROCESSING", - "COMPLETED", - "FAILED_TEMP", - "FAILED", - "ROLLING_BACK", - "ROLLED_BACK" - ], - "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" - } - } - } - }, - "callbackUri": { - "type": "string", - "description": "String formatted according to IETF RFC 3986.\n" - }, - "_links": { - "type": "object", - "description": "Links to resources related to this resource.\n", - "required": [ - "self" - ], - "properties": { - "self": { - "type": "object", - "description": "This type represents a link to a resource.\n", - "required": [ - "href" - ], - "properties": { - "href": { - "type": "string", - "description": "URI of the referenced resource.\n", - "format": "url" - } - } - } - } - } - } + "description": "This type represents a subscription related to notifications about NS lifecycle changes. It shall comply with the provisions defined in Table 6.5.2.4-1.\n", + "type": "object", + "required": [ + "id", + "callbackUri", + "_links" + ], + "properties": { + "id": { + "description": "Identifier of this subscription resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "filter": { + "description": "Filter settings for this subscription, to define the subset of all notifications this subscription relates to. A particular notification is sent to the subscriber if the filter matches, or if there is no filter.\n", + "$ref": "#/definitions/LifecycleChangeNotificationsFilter" + }, + "callbackUri": { + "description": "The URI of the endpoint to send the notification to.\n", + "$ref": "SOL005_def.yaml#/definitions/Uri" + }, + "_links": { + "description": "Links to resources related to this resource.\n", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "URI of this resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + } + } + } + } } \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/schemas/subscriptions.schema.json b/SOL005/NSLifecycleManagement-API/schemas/subscriptions.schema.json index 9a57c533..b532dd5e 100644 --- a/SOL005/NSLifecycleManagement-API/schemas/subscriptions.schema.json +++ b/SOL005/NSLifecycleManagement-API/schemas/subscriptions.schema.json @@ -1,145 +1,39 @@ { "type": "array", "items": { - "description": "This type represents a subscription.", - "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" - } - } - } - } - } - } - } + "description": "This type represents a subscription related to notifications about NS lifecycle changes. It shall comply with the provisions defined in Table 6.5.2.4-1.\n", + "type": "object", + "required": [ + "id", + "callbackUri", + "_links" + ], + "properties": { + "id": { + "description": "Identifier of this subscription resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "filter": { + "description": "Filter settings for this subscription, to define the subset of all notifications this subscription relates to. A particular notification is sent to the subscriber if the filter matches, or if there is no filter.\n", + "$ref": "#/definitions/LifecycleChangeNotificationsFilter" + }, + "callbackUri": { + "description": "The URI of the endpoint to send the notification to.\n", + "$ref": "SOL005_def.yaml#/definitions/Uri" + }, + "_links": { + "description": "Links to resources related to this resource.\n", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "URI of this resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + } + } + } + } + } } \ No newline at end of file -- GitLab