{
	"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"
						}
					}
				}
			}
		}
	}
}