diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index 3fd36dfce7e21f10c2b408f10f88bc4abbb3949c..7640733739f4ecf39b49247f6aec0a92a13e509b 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -1141,6 +1141,8 @@ POST subscriptions Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + Log Verify the tested the notification endpoint + Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} POST subscriptions DUPLICATION @@ -1160,6 +1162,8 @@ POST subscriptions DUPLICATION Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + Log Verify the tested the notification endpoint + Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} POST subscriptions NO DUPLICATION @@ -1179,6 +1183,8 @@ POST subscriptions NO DUPLICATION Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + Log Verify the tested the notification endpoint + Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} GET Subscriptions diff --git a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot index 74ddf0e5b4884261a6e72702a45973229bba3219..a75c59608f90ce4e7d36ac2a5b3893129fc3bf38 100644 --- a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot @@ -45,7 +45,31 @@ Ns Identifier Deletion Notification ... Post-Conditions: none Post Ns Identifier Deletion Notification Check HTTP Response Status Code Is 204 - + +Ns Change Notification + [Documentation] Test ID: 5.3.2.26.4 + ... Test title: Ns Change Notification + ... Test objective: The objective is to test that Ns Change Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for Ns Change notification is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Ns Change Notification + Check HTTP Response Status Code Is 204 + +Ns LCM Capacity Shortage Notification + [Documentation] Test ID: 5.3.2.26.5 + ... Test title: Ns LCM Capacity Shortage Notification + ... Test objective: The objective is to test that Ns LCM Capacity Shortage Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for Ns LCM Capacity Shortage notification is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Ns LCM Capacity Shortage Notification + Check HTTP Response Status Code Is 204 + *** Keywords *** Check resource existence and get CallbackUri Set Headers {"Accept":"${ACCEPT}"} @@ -53,7 +77,7 @@ Check resource existence and get CallbackUri Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 - Validate Json response body subscription.schema.json + Validate Json response body schemas/subscription.schema.json Set Global Variable ${callbackResp} response body callbackUri Post Ns Lcm Operation Occurrence Notification @@ -90,3 +114,25 @@ Post Ns Identifier Deletion Notification Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +Post Ns Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/NsChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsInstanceId=${nsInstanceId} nsLcmOpOccId=${nsLcmOpOccId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Ns LCM Capacity Shortage Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/NsLcmCapacityShortageNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSLifecycleManagement-API/Notifications.robot b/SOL005/NSLifecycleManagement-API/Notifications.robot index 6e1bceaa15674d017ac42dfcdc767ccb671a4371..0e731c89720a780a02c984e67a0aa91ac9f6f2fa 100644 --- a/SOL005/NSLifecycleManagement-API/Notifications.robot +++ b/SOL005/NSLifecycleManagement-API/Notifications.robot @@ -53,7 +53,7 @@ NS Identifier Deletion Notification [Documentation] Test ID: 5.3.2.17.4 ... Test title: NS Identifier Deletion Notification ... Test objective: The objective is to test the dispatch of NS Identifier Deletion Notification when a NS instance resource is deleted in the NFVO, and perform a JSON schema and content validation of the delivered notification.The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A NS instance resource is created, and a subscription for NS identifier creation notifications is available in the NFVO. + ... Pre-conditions: A NS instance resource is created, and a subscription for NS identifier deletion notifications is available in the NFVO. ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -62,6 +62,32 @@ NS Identifier Deletion Notification Check NS Identifier Deletion Notification Http POST Request Body Json Schema Is NsIdentifierDeletionNotification Check NS Identifier Deletion Notification Http POST Request Body notificationType attribute Is NsIdentifierDeletionNotification +NS Change Notification + [Documentation] Test ID: 5.3.2.17.5 + ... Test title: NS Change Notification + ... Test objective: The objective is to test the dispatch of NS Change Notification when a NS instance component is affected by an LCM operation occurrence, and perform a JSON schema and content validation of the delivered notification.The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A NS instance resource is created, and a subscription for NS change notifications is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Trigger a NS LCM operation that affects a NS instance component (external action) + Check NS Change Notification Http POST Request Body Json Schema Is NsChangeNotification + Check NS Change Notification Http POST Request Body notificationType attribute Is NsChangeNotification + +NS LCM Capacity Shortage Notification + [Documentation] Test ID: 5.3.2.17.6 + ... Test title: NS LCM Capacity Shortage Notification + ... Test objective: The objective is to test the dispatch of NS LCM Capacity Shortage Notification when a resource shortage occurs during the execution of an NS LCM operation, and perform a JSON schema and content validation of the delivered notification.The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A NS instance resource is created, and a subscription for NS LCM Capacity Shortage notifications is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v3.5.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Trigger a resource shortage for a NS LCM operation (external action) + Check NS LCM Capacity Shortage Notification Http POST Request Body Json Schema Is NsLcmCapacityShortageNotification + Check NS LCM Capacity Shortage Notification Http POST Request Body notificationType attribute Is NsLcmCapacityShortageNotification + *** Keywords *** Trigger a NS LCM operation (external action) #do nothing @@ -78,7 +104,63 @@ Trigger the creation of a NS instance resource (external action) Trigger the deletion of a NS instance resource (external action) #do nothing Log do nothing + +Trigger a NS LCM operation that affects a NS instance component (external action) + #do nothing + Log do nothing + +Trigger a resource shortage for a NS LCM operation (external action) + #do nothing + Log do nothing + +Check NS LCM Capacity Shortage Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check NS LCM Capacity Shortage Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification NS LCM Capacity Shortage Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification NS LCM Capacity Shortage Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{headers}= Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check NS Change Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} +Check NS Change Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification NS Change Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification NS Change Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{headers}= Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + Check NS LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is [Arguments] ${element} ${schema}= Get File schemas/${element}.schema.json diff --git a/SOL005/NSLifecycleManagement-API/jsons/NsChangeNotification.json b/SOL005/NSLifecycleManagement-API/jsons/NsChangeNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..4de1195793dabcd889ce87061d6a917f0b63d1bb --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/NsChangeNotification.json @@ -0,0 +1,17 @@ +{{ + "id":"123", + "nsInstanceId":"{nsInstanceId}", + "lcmOpOccIdImpactingNsComponent":"{nsLcmOpOccId}", + "lcmOpNameImpactingNsComponent" : "VNF_INSTANTIATE", + "lcmOpOccStatusImpactingNsComponent" : "START", + "nsComponentType" : "VNF", + "nsComponentId" : "abcd", + "notificationType":"NsChangeNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "_links": + {{ + "nsInstance": "", + "subscription": "" + }} +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierCreationNotification.json b/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierCreationNotification.json index 152d85523d8a39e28c76ebdce9f327df2d722a92..fe31b80c2ca6d19d864a56386fd500c9d97bb048 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierCreationNotification.json +++ b/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierCreationNotification.json @@ -1,5 +1,5 @@ {{ - "id":"", + "id":"123", "notificationType":"NsIdentifierCreationNotification", "subscriptionId":"{subscriptionId}", "timeStamp":"", diff --git a/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierDeletionNotification.json b/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierDeletionNotification.json index 320d5ee3b4a29d2ac652bc75930f2b3cb4da2fd4..380c320df37e078a53c42a1177e608e455aea2c3 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierDeletionNotification.json +++ b/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierDeletionNotification.json @@ -1,5 +1,5 @@ {{ - "id":"", + "id":"123", "notificationType":"NsIdentifierDeletionNotification", "subscriptionId":"{subscriptionId}", "timeStamp":"", diff --git a/SOL005/NSLifecycleManagement-API/jsons/NsLcmCapacityShortageNotification.json b/SOL005/NSLifecycleManagement-API/jsons/NsLcmCapacityShortageNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..b668f8dfa2341e7b3b9a7998c33dafcf5ab59987 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/NsLcmCapacityShortageNotification.json @@ -0,0 +1,7 @@ +{{ + "id" : "123", + "notificationType" : "NsLcmCapacityShortageNotification", + "subscriptionId" : "{subscriptionId}", + "timestamp" : "", + "status" : "LCM_RESOURCES_NOT_AVAILABLE" +}} diff --git a/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json b/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json index ee02dd9c7362ae16e7dd1bcbc064decbf152a397..e12f5235a7b5bf85c9f0870a9abf1c8eb6d57d2d 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json +++ b/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json @@ -1,7 +1,7 @@ {{ - "id":"", + "id":"123", "nsInstanceId":"{nsInstanceId}", - "nsLcmOpOccId":"{nsLcmOpOccId}" + "nsLcmOpOccId":"{nsLcmOpOccId}", "operation":"INSTANTIATE", "notificationType":"NsLcmOperationOccurrenceNotification", "subscriptionId":"{subscriptionId}", diff --git a/SOL005/NSLifecycleManagement-API/schemas/NsChangeNotification.schema.json b/SOL005/NSLifecycleManagement-API/schemas/NsChangeNotification.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..87d30f44454cb7ddea2a8dfbc034aff072bb9b78 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/schemas/NsChangeNotification.schema.json @@ -0,0 +1,182 @@ + +{ + "description": "This type represents an NS change notification, which informs the receiver of changes on the NS instance caused by the LCM operation occurrence, which directly or indirectly impacts its NS component and is triggered without any context of this NS instance. This notification is different from the NsLcmOperationOccurenceNotification (see clause 6.5.2.5), which is triggered by the NS LCM operation occurrence on the NS instance itself. It shall comply with the provisions defined in Table 6.5.2.8-1. The support of the notification is mandatory. The trigger conditions include: 1) NS LCM operation occurrence which directly or indirectly impacts the NS component (start and result). If this is a notification about the start of an LCM operation occurrence impacting the NS component, the notification shall be sent as soon as the impact on the NS component is identified. If this is a notification about a final result state of an NS LCM operation occurrence impacting the NS component, the notification shall be sent after the impact on the NS component has been executed.\n", + "type": "object", + "required": [ + "id", + "nsInstanceId", + "nsComponentType", + "nsComponentId", + "lcmOpOccIdImpactingNsComponent", + "lcmOpNameImpactingNsComponent", + "lcmOpOccStatusImpactingNsCompon", + "notificationType", + "subscriptionId", + "timestamp", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "nsInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "nsComponentType": { + "description": "The enumeration NsComponentType represents the NS component type. It shall comply with the provisions defined in Table 6.5.4.5-1. Value | Description ------|------------ VNF | Represents the impacted NS component is a VNF. PNF | Represents the impacted NS component is a PNF. NS | Represents the impacted NS component is a nested NS.\n", + "type": "string", + "enum": [ + "VNF", + "PNF", + "NS" + ] + }, + "nsComponentId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "lcmOpOccIdImpactingNsComponent": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "lcmOpNameImpactingNsComponent": { + "description": "The enumeration LcmOpNameForChangeNotificationType represents the name of the lifecycle operation that impacts the NS component and trigger an NS change notification. It shall comply with the provisions defined in Table 6.5.4.6-1. Value | Description ------|------------ VNF_INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. VNF_SCALE | Represents the \"Scale VNF\" LCM operation. VNF_SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. VNF_CHANGE_FLAVOUR | Represents the \"Change VNF Flavor\" LCM operation. VNF_TERMINATE | Represents the \"Terminate VNF\" LCM operation. VNF_HEAL | Represents the \"Heal VNF\" LCM operation. VNF_OPERATE | Represents the \"Operate VNF\" LCM operation. VNF_CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. VNF_MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation. NS_INSTANTIATE | Represents the \"Instantiate NS\" LCM operation NS_SCALE | Represents the \"Scale NS\" LCM operation. NS_UPDATE | Represents the \"Update NS\" LCM operation. NS_TERMINATE | Represents the \"Terminate NS\" LCM operation. NS_HEAL | Represents the \"Heal NS\" LCM operation.\n", + "type": "string", + "enum": [ + "VNF_INSTANTIATE", + "VNF_SCALE", + "VNF_SCALE_TO_LEVEL", + "VNF_CHANGE_FLAVOUR", + "VNF_TERMINATE", + "VNF_HEAL", + "VNF_OPERATE", + "VNF_CHANGE_EXT_CONN", + "VNF_MODIFY_INFO", + "NS_INSTANTIATE", + "NS_SCALE", + "NS_UPDATE", + "NS_TERMINATE", + "NS_HEAL" + ] + }, + "lcmOpOccStatusImpactingNsComponent": { + "description": "The enumeration LcmOpNameForChangeNotificationType represents the name of the lifecycle operation that impacts the NS component and trigger an NS change notification. It shall comply with the provisions defined in table 6.5.4.6-1.\nValue | Description VNF_INSTANTIATE\t Represents the \"Instantiate VNF\" LCM operation. VNF_SCALE\t Represents the \"Scale VNF\" LCM operation. VNF_SCALE_TO_LEVEL\t Represents the \"Scale VNF to Level\" LCM operation. VNF_CHANGE_FLAVOUR\t Represents the \"Change VNF Flavour\" LCM operation. VNF_TERMINATE\t Represents the \"Terminate VNF\" LCM operation. VNF_HEAL\t Represents the \"Heal VNF\" LCM operation. VNF_OPERATE\t Represents the \"Operate VNF\" LCM operation. VNF_CHANGE_EXT_CONN\t Represents the \"Change external VNF connectivity\" LCM operation. VNF_MODIFY_INFO\t Represents the \"Modify VNF Information\" LCM operation. VNF_CREATE_SNAPSHOT\t Represents the \"Create VNF Snapshot\" LCM operation. VNF_REVERT_TO_SNAPSHOT\tRepresents the \"Revert To VNF Snapshot\" LCM operation. VNF_CHANGE_VNFPKG\t Represents the \"Change current VNF package\" LCM operation. NS_INSTANTIATE\t Represents the \"Instantiate NS\" LCM operation. NS_SCALE\t Represents the \"Scale NS\" LCM operation. NS_UPDATE\t Represents the \"Update NS\" LCM operation. NS_TERMINATE\t Represents the \"Terminate NS\" LCM operation. NS_HEAL\t Represents the \"Heal NS\" LCM operation.\n", + "type": "string", + "enum": [ + "VNF_INSTANTIATE", + "VNF_SCALE", + "VNF_SCALE_TO_LEVEL", + "VNF_CHANGE_FLAVOUR", + "VNF_TERMINATE", + "VNF_HEAL", + "VNF_OPERATE", + "VNF_CHANGE_EXT_CONN", + "VNF_MODIFY_INFO", + "VNF_CREATE_SNAPSHOT", + "VNF_REVERT_TO_SNAPSHOT", + "VNF_CHANGE_VNFPKG", + "NS_INSTANTIATE", + "NS_SCALE", + "NS_UPDATE", + "NS_TERMINATE", + "NS_HEAL" + ] + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"NsChangeNotification\" for this notification type.\n", + "type": "string" + }, + "subscriptionId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "timestamp": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + }, + "error": { + "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced in this structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n", + "type": "object", + "required": [ + "status", + "detail" + ], + "properties": { + "type": { + "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n", + "type": "string", + "format": "URI" + }, + "title": { + "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n", + "type": "string" + }, + "status": { + "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n", + "type": "integer" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the problem.\n", + "type": "string" + }, + "instance": { + "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", + "type": "string", + "format": "URI" + } + } + }, + "_links": { + "type": "object", + "required": [ + "nsInstance" + ], + "properties": { + "nsInstance": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + }, + "subscription": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + }, + "nslcmOpOcc": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/schemas/NsLcmCapacityShortageNotification.schema.json b/SOL005/NSLifecycleManagement-API/schemas/NsLcmCapacityShortageNotification.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..49eae367ef1cff20fe6edec0d6a33df86ec8d82d --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/schemas/NsLcmCapacityShortageNotification.schema.json @@ -0,0 +1,165 @@ +{ + "description": "This type represents an NS LCM capacity shortage notification, which informs the receiver about resource shortage conditions during the execution of NS LCM operations. The notifications are triggered by the NFVO when a capacity shortage condition occurs during the execution of an NS LCM operation, which fails due to the resource shortage, or which succeeds despite the resource shortage because the NFVO has reduced the resource consumption of other NSs by requesting these NSs to be scaled in or terminated.\nThe notification shall comply with the provisions defined in Table 6.5.2.19-1. The support of the notification is mandatory.\nThis notification shall be triggered by the NFVO when there is a capacity shortage condition during the execution of an NS LCM operation which will cause the LCM operation to be not successfully completed, or which will trigger the automatic executing of an LCM operation to reduce the resource consumption of one or more NS instances to resolve a resource shortage situation. The shortage conditions include: •\tNecessary resources could not be allocated during an LCM operation because of resource shortage which causes\n the LCM operation to fail.\n•\tAn LCM operation on an NS instance with higher priority pre-empted an LCM operation on NS instance with lower\n priority because of resource shortage.\n•\tAn LCM operation on an NS instance with higher priority pre-empted an existing NS instance. Resources were\n de-allocated from the lower priority NS instance to allow the LCM operation on a higher priority NS instance.\n•\tThe resource capacity shortage situation has ended, and it can be expected that an LCM operation that had\n failed could succeed now if retried.\n\nNOTE:\tETSI GS NFV-IFA 013 [x] defines further shortage situations.\n These are not supported by the present version of the present document.\n\nThis notification shall also be triggered by the NFVO when a shortage condition has ended that has previously led to NS LCM operation occurrences failing. The notification shall be sent to all API consumers (OSS/BSS) that have subscribed to notifications related to capacity shortage and meeting the filter conditions of all pre-empted (low priority) and all pre-empting (high priority NS instance(s)). See ETSI GS NFV-IFA 010 [2], Annex D.2 for the use cases.\nThe notification about the result of an unsuccessful LCM operation occurrence shall include appropriate information about the resource shortage when the cause for failure is a resource shortage.\nThe notification where a pre-emption occurred due to e.g. a higher priority LCM operation during resource shortage shall include appropriate information about the pre-emption.\nNOTE: Not all operation occurrences that are in \"FAILED_TEMP\" have been pre-empted by a resource shortage.\n When the operation occurrences were pre-empted, the NS instances affected by the resource shortage end\n (“status“ = \"LCM_SHORTAGE_END\") which are pointed by \"affectedNsId\" in the list of \"affectedOpOccs\" structure\n can have the operations retried again (which needs a request by the OSS/BSS).\n\nNOTE 1:\tThe present version of the present document supports only the resource shortage status enumeration\n values “LCM_RESOURCES_NOT_AVAILABLE” and “LCM_SHORTAGE_END” which represent a subset of the trigger conditions\n defined in clause 8.3.5.2 of ETSI GS NFV-IFA 013 [x].\n", + "type": "object", + "required": ["id", "notificationType", "subscriptionId", "timestamp", "status"], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"NsLcmCapacityShortageNotification\" for this notification type.\n", + "type": "string", + "enum": ["NsLcmCapacityShortageNotification"] + }, + "subscriptionId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "timestamp": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + }, + "preemptingNsLcmOpOccId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "highPrioNsInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "status": { + "description": "Indicates the situation of capacity shortage. Permitted values: -\tLCM_RESOURCES_NOT_AVAILABLE: the lifecycle operation identified by the nsLcmOpOccId attribute could not\n be completed because necessary resources were not available.\n-\tLCM_SHORTAGE_END: the shortage situation which has caused the lifecycle management operation identified\n by the nsLcmOpOccId attribute to fail has ended.\n", + "type": "string", + "enum": ["LCM_RESOURCES_NOT_AVAILABLE", "LCM_SHORTAGE_END"] + }, + "shortageType": { + "description": "Indicates whether this notification reports about a resource shortage or NFV-MANO capacity or performance shortage. Permitted values: -\tRESOURCE_SHORTAGE: the notification reports a resource shortage.\nShall be present when a resources shortage situation has been identified starts and the notification is sent with “status“ = “LCM_RESOURCES_NOT_AVAILABLE“ and shall be absent otherwise.\n", + "type": "string", + "enum": ["RESOURCE_SHORTAGE"] + }, + "affectedOpOccs": { + "description": "List of NS LCM operation occurrence(s) that were affected by the resource shortage.\n", + "type": "array", + "items": { + "type": "object", + "required": ["affectedNsId", "affectedOpOccId", "affectedCondition", "_links"], + "properties": { + "affectedNsId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "affectedOpOccId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "affectedCondition": { + "description": "This flag indicates in what condition (pre-empted or triggered) the operation occurrence(s) were affected by the resource shortage.\nPermitted values: -\tPRE_EMPTED: the operation was pre-empted and the \"operationState\" = \"FAILED_TEMP” of the NsLcmOpOcc\n structure identified by \"affectedOpOccId\" attribute.\n-\tTRIGGERED: the operation was triggered by NFVO and the “operationState” = \"FAILED_TEMP” of the\n NsLcmOpOcc structure identified by \"affectedOpOccId\" attribute.\n\nIn case the notification indicates the end of a shortage condition (“status“ = \"LCM_SHORTAGE_END\"), only entries with “affectedCondition“ = \"PRE_EMPTED\" shall be included. See note.\n", + "type": "string", + "enum": ["PRE_EMPTED", "TRIGGERED"] + }, + "_links": { + "description": "Links related to NS resources affected by the shortage of this operation occurrence.\n", + "type": "object", + "required": ["affectedLcmOpOcc", "affectedNs"], + "properties": { + "affectedLcmOpOcc": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": ["href"], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + }, + "affectedNs": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": ["href"], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + } + } + } + } + } + }, + "capacityInformation": { + "description": "References to NFVI capacity information related to the shortage.\n", + "type": "array", + "items": { + "type": "object", + "required": ["vimId", "_link"], + "properties": { + "vimId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "_link": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": ["href"], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + } + } + } + }, + "_links": { + "description": "Links to resources related to this notification.\n", + "type": "object", + "required": ["subscription"], + "properties": { + "preemptingNsLcmOpOcc": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": ["href"], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + }, + "highPrioNsInstance": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": ["href"], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + }, + "subscription": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": ["href"], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + } + } + } + } +} \ No newline at end of file