X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frestapi%2Fembedded_spec.go;h=4506519874ac91d736fc1722308da746f60cd4bf;hb=refs%2Fchanges%2F29%2F6729%2F2;hp=dd678436195e56120974fe159bbfa3b938e32932;hpb=413abf5f6de7c1808a2dd716ef52ed586c04d8f6;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/restapi/embedded_spec.go b/pkg/restapi/embedded_spec.go index dd67843..4506519 100644 --- a/pkg/restapi/embedded_spec.go +++ b/pkg/restapi/embedded_spec.go @@ -29,7 +29,7 @@ func init() { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.0.1" + "version": "0.0.2" }, "host": "hostname", "basePath": "/ric/v1", @@ -64,7 +64,7 @@ func init() { "application/json" ], "tags": [ - "query" + "common" ], "summary": "Returns list of subscriptions", "operationId": "getAllSubscriptions", @@ -79,48 +79,7 @@ func init() { "description": "Internal error" } } - } - }, - "/subscriptions/policy": { - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "policy" - ], - "summary": "Subscribe and send \"POLICY\" message to RAN to execute a specific POLICY during call processing in RAN after each occurrence of a defined SUBSCRIPTION", - "operationId": "subscribePolicy", - "parameters": [ - { - "description": "Subscription policy parameters", - "name": "PolicyParams", - "in": "body", - "schema": { - "$ref": "#/definitions/PolicyParams" - } - } - ], - "responses": { - "201": { - "description": "Subscription successfully created", - "schema": { - "$ref": "#/definitions/SubscriptionResponse" - } - }, - "400": { - "description": "Invalid input" - }, - "500": { - "description": "Internal error" - } - } - } - }, - "/subscriptions/report": { + }, "post": { "consumes": [ "application/json" @@ -129,17 +88,17 @@ func init() { "application/json" ], "tags": [ - "report" + "common" ], - "summary": "Subscribe a list of X2AP event triggers to receive \"REPORT\" messages sent by RAN or Subscribe to receive the content of gNB NRT table in REPORT message sent by RAN", - "operationId": "subscribeReport", + "summary": "Subscribe a list of X2AP event triggers to receive messages sent by RAN", + "operationId": "Subscribe", "parameters": [ { - "description": "Subscription report parameters", - "name": "ReportParams", + "description": "Subscription parameters", + "name": "SubscriptionParams", "in": "body", "schema": { - "$ref": "#/definitions/ReportParams" + "$ref": "#/definitions/SubscriptionParams" } } ], @@ -196,21 +155,46 @@ func init() { } }, "definitions": { - "ActionParameters": { + "ActionDefinition": { + "description": "E2SM byte array. ActionDefinition is an OPTIONAL IE", + "type": "array", + "items": { + "type": "integer" + } + }, + "ActionToBeSetup": { "type": "object", "required": [ - "ActionParameterID", - "ActionParameterValue" + "ActionID", + "ActionType" ], "properties": { - "ActionParameterID": { - "type": "integer" + "ActionDefinition": { + "$ref": "#/definitions/ActionDefinition" + }, + "ActionID": { + "type": "integer", + "maximum": 255 }, - "ActionParameterValue": { - "type": "boolean" + "ActionType": { + "type": "string", + "enum": [ + "insert", + "policy", + "report" + ] + }, + "SubsequentAction": { + "$ref": "#/definitions/SubsequentAction" } } }, + "ActionsToBeSetup": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionToBeSetup" + } + }, "ConfigMetadata": { "type": "object", "required": [ @@ -233,237 +217,136 @@ func init() { } } }, - "EventTrigger": { - "type": "object", - "properties": { - "ENBId": { - "type": "string" - }, - "InterfaceDirection": { - "type": "integer" - }, - "PlmnId": { - "type": "string" - }, - "ProcedureCode": { - "type": "integer" - }, - "TriggerNature": { - "type": "string", - "enum": [ - "now", - "on change" - ] - }, - "TypeOfMessage": { - "type": "integer" - } - } - }, - "EventTriggerList": { + "EventTriggerDefinition": { + "description": "E2SM byte array", "type": "array", "items": { - "$ref": "#/definitions/EventTrigger" + "type": "integer" } }, - "Format1ActionDefinition": { + "SubscriptionData": { "type": "object", - "required": [ - "StyleID", - "ActionParameters" - ], "properties": { - "ActionParameters": { + "ClientEndpoint": { "type": "array", "items": { - "$ref": "#/definitions/ActionParameters" + "type": "string" } }, - "StyleID": { + "Meid": { + "type": "string" + }, + "SubscriptionId": { "type": "integer" - } - } - }, - "Format2ActionDefinition": { - "type": "object", - "required": [ - "RANUeGroupParameters" - ], - "properties": { - "RANUeGroupParameters": { + }, + "SubscriptionInstances": { "type": "array", "items": { - "$ref": "#/definitions/RANUeGroupList" + "$ref": "#/definitions/SubscriptionInstance" } } } }, - "ImperativePolicyDefinition": { + "SubscriptionDetail": { "type": "object", "required": [ - "PolicyParameterID", - "PolicyParameterValue" - ], - "properties": { - "PolicyParameterID": { - "type": "integer" - }, - "PolicyParameterValue": { - "type": "integer" - } - } - }, - "PolicyActionDefinition": { - "type": "object", - "properties": { - "ActionDefinitionFormat2": { - "$ref": "#/definitions/Format2ActionDefinition" - } - } - }, - "PolicyParams": { - "type": "object", - "required": [ - "Meid", - "RANFunctionID", - "ClientEndpoint", + "XappEventInstanceId", "EventTriggers", - "PolicyActionDefinitions" + "ActionToBeSetupList" ], "properties": { - "ClientEndpoint": { - "type": "string" + "ActionToBeSetupList": { + "$ref": "#/definitions/ActionsToBeSetup" }, "EventTriggers": { - "$ref": "#/definitions/EventTriggerList" - }, - "Meid": { - "type": "string" - }, - "PolicyActionDefinitions": { - "$ref": "#/definitions/PolicyActionDefinition" + "$ref": "#/definitions/EventTriggerDefinition" }, - "RANFunctionID": { - "type": "integer" + "XappEventInstanceId": { + "type": "integer", + "maximum": 65535 } } }, - "RANUeGroupList": { - "type": "object", - "required": [ - "RANUeGroupID", - "RANUeGroupDefinition", - "RANImperativePolicy" - ], - "properties": { - "RANImperativePolicy": { - "$ref": "#/definitions/ImperativePolicyDefinition" - }, - "RANUeGroupDefinition": { - "$ref": "#/definitions/RANUeGroupParams" - }, - "RANUeGroupID": { - "type": "integer" - } + "SubscriptionDetailsList": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionDetail" } }, - "RANUeGroupParams": { + "SubscriptionInstance": { "type": "object", "required": [ - "RANParameterID", - "RANParameterValue" + "XappEventInstanceId", + "E2EventInstanceId", + "ErrorCause" ], "properties": { - "RANParameterID": { - "type": "integer" + "E2EventInstanceId": { + "type": "integer", + "maximum": 65535 }, - "RANParameterTestCondition": { - "type": "string", - "enum": [ - "equal", - "greaterthan", - "lessthan", - "contains", - "present" - ] + "ErrorCause": { + "description": "Empty string when no error.", + "type": "string" }, - "RANParameterValue": { - "type": "integer" + "XappEventInstanceId": { + "type": "integer", + "maximum": 65535 } } }, - "ReportActionDefinition": { - "type": "object", - "properties": { - "ActionDefinitionFormat1": { - "$ref": "#/definitions/Format1ActionDefinition" - } + "SubscriptionList": { + "description": "A list of subscriptions", + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionData" } }, - "ReportParams": { + "SubscriptionParams": { "type": "object", "required": [ - "RANFunctionID", "ClientEndpoint", - "EventTriggers" + "Meid", + "RANFunctionID", + "SubscriptionDetails" ], "properties": { "ClientEndpoint": { - "type": "string" - }, - "EventTriggers": { - "$ref": "#/definitions/EventTriggerList" + "description": "xApp service address and port", + "type": "object", + "properties": { + "HTTPPort": { + "description": "xApp HTTP service address port", + "type": "integer", + "maximum": 65535 + }, + "Host": { + "description": "xApp service address name like 'service-ricxapp-xappname-http.ricxapp'", + "type": "string" + }, + "RMRPort": { + "description": "xApp RMR service address port", + "type": "integer", + "maximum": 65535 + } + } }, "Meid": { "type": "string" }, "RANFunctionID": { - "type": "integer" - }, - "ReportActionDefinitions": { - "$ref": "#/definitions/ReportActionDefinition" - } - } - }, - "SubscriptionData": { - "type": "object", - "properties": { - "Endpoint": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "maximum": 4095 }, - "Meid": { - "type": "string" + "SubscriptionDetails": { + "$ref": "#/definitions/SubscriptionDetailsList" }, "SubscriptionId": { - "type": "integer" - } - } - }, - "SubscriptionInstance": { - "type": "object", - "required": [ - "RequestorId", - "InstanceId" - ], - "properties": { - "InstanceId": { - "type": "integer" - }, - "RequestorId": { - "type": "integer" + "description": "Optional subscription ID (Submgr allocates if not given)", + "type": "string" } } }, - "SubscriptionList": { - "description": "A list of subscriptions", - "type": "array", - "items": { - "$ref": "#/definitions/SubscriptionData" - } - }, "SubscriptionResponse": { "type": "object", "required": [ @@ -482,13 +365,45 @@ func init() { } } }, - "SubscriptionType": { - "type": "string", - "enum": [ - "insert", - "policy", - "report" - ] + "SubsequentAction": { + "description": "SubsequentAction is an OPTIONAL IE", + "type": "object", + "required": [ + "SubsequentActionType", + "TimeToWait" + ], + "properties": { + "SubsequentActionType": { + "type": "string", + "enum": [ + "continue", + "wait" + ] + }, + "TimeToWait": { + "type": "string", + "enum": [ + "zero", + "w1ms", + "w2ms", + "w5ms", + "w10ms", + "w20ms", + "w30ms", + "w40ms", + "w50ms", + "w100ms", + "w200ms", + "w500ms", + "w1s", + "w2s", + "w5s", + "w10s", + "w20s", + "w60s" + ] + } + } }, "XAppConfig": { "type": "object", @@ -526,7 +441,7 @@ func init() { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.0.1" + "version": "0.0.2" }, "host": "hostname", "basePath": "/ric/v1", @@ -561,7 +476,7 @@ func init() { "application/json" ], "tags": [ - "query" + "common" ], "summary": "Returns list of subscriptions", "operationId": "getAllSubscriptions", @@ -576,48 +491,7 @@ func init() { "description": "Internal error" } } - } - }, - "/subscriptions/policy": { - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "policy" - ], - "summary": "Subscribe and send \"POLICY\" message to RAN to execute a specific POLICY during call processing in RAN after each occurrence of a defined SUBSCRIPTION", - "operationId": "subscribePolicy", - "parameters": [ - { - "description": "Subscription policy parameters", - "name": "PolicyParams", - "in": "body", - "schema": { - "$ref": "#/definitions/PolicyParams" - } - } - ], - "responses": { - "201": { - "description": "Subscription successfully created", - "schema": { - "$ref": "#/definitions/SubscriptionResponse" - } - }, - "400": { - "description": "Invalid input" - }, - "500": { - "description": "Internal error" - } - } - } - }, - "/subscriptions/report": { + }, "post": { "consumes": [ "application/json" @@ -626,17 +500,17 @@ func init() { "application/json" ], "tags": [ - "report" + "common" ], - "summary": "Subscribe a list of X2AP event triggers to receive \"REPORT\" messages sent by RAN or Subscribe to receive the content of gNB NRT table in REPORT message sent by RAN", - "operationId": "subscribeReport", + "summary": "Subscribe a list of X2AP event triggers to receive messages sent by RAN", + "operationId": "Subscribe", "parameters": [ { - "description": "Subscription report parameters", - "name": "ReportParams", + "description": "Subscription parameters", + "name": "SubscriptionParams", "in": "body", "schema": { - "$ref": "#/definitions/ReportParams" + "$ref": "#/definitions/SubscriptionParams" } } ], @@ -693,21 +567,47 @@ func init() { } }, "definitions": { - "ActionParameters": { + "ActionDefinition": { + "description": "E2SM byte array. ActionDefinition is an OPTIONAL IE", + "type": "array", + "items": { + "type": "integer" + } + }, + "ActionToBeSetup": { "type": "object", "required": [ - "ActionParameterID", - "ActionParameterValue" + "ActionID", + "ActionType" ], "properties": { - "ActionParameterID": { - "type": "integer" + "ActionDefinition": { + "$ref": "#/definitions/ActionDefinition" + }, + "ActionID": { + "type": "integer", + "maximum": 255, + "minimum": 0 + }, + "ActionType": { + "type": "string", + "enum": [ + "insert", + "policy", + "report" + ] }, - "ActionParameterValue": { - "type": "boolean" + "SubsequentAction": { + "$ref": "#/definitions/SubsequentAction" } } }, + "ActionsToBeSetup": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionToBeSetup" + } + }, "ConfigMetadata": { "type": "object", "required": [ @@ -730,237 +630,164 @@ func init() { } } }, - "EventTrigger": { - "type": "object", - "properties": { - "ENBId": { - "type": "string" - }, - "InterfaceDirection": { - "type": "integer" - }, - "PlmnId": { - "type": "string" - }, - "ProcedureCode": { - "type": "integer" - }, - "TriggerNature": { - "type": "string", - "enum": [ - "now", - "on change" - ] - }, - "TypeOfMessage": { - "type": "integer" - } - } - }, - "EventTriggerList": { + "EventTriggerDefinition": { + "description": "E2SM byte array", "type": "array", "items": { - "$ref": "#/definitions/EventTrigger" + "type": "integer" } }, - "Format1ActionDefinition": { + "SubscriptionData": { "type": "object", - "required": [ - "StyleID", - "ActionParameters" - ], "properties": { - "ActionParameters": { + "ClientEndpoint": { "type": "array", "items": { - "$ref": "#/definitions/ActionParameters" + "type": "string" } }, - "StyleID": { + "Meid": { + "type": "string" + }, + "SubscriptionId": { "type": "integer" - } - } - }, - "Format2ActionDefinition": { - "type": "object", - "required": [ - "RANUeGroupParameters" - ], - "properties": { - "RANUeGroupParameters": { + }, + "SubscriptionInstances": { "type": "array", "items": { - "$ref": "#/definitions/RANUeGroupList" + "$ref": "#/definitions/SubscriptionInstance" } } } }, - "ImperativePolicyDefinition": { + "SubscriptionDetail": { "type": "object", "required": [ - "PolicyParameterID", - "PolicyParameterValue" - ], - "properties": { - "PolicyParameterID": { - "type": "integer" - }, - "PolicyParameterValue": { - "type": "integer" - } - } - }, - "PolicyActionDefinition": { - "type": "object", - "properties": { - "ActionDefinitionFormat2": { - "$ref": "#/definitions/Format2ActionDefinition" - } - } - }, - "PolicyParams": { - "type": "object", - "required": [ - "Meid", - "RANFunctionID", - "ClientEndpoint", + "XappEventInstanceId", "EventTriggers", - "PolicyActionDefinitions" + "ActionToBeSetupList" ], "properties": { - "ClientEndpoint": { - "type": "string" + "ActionToBeSetupList": { + "$ref": "#/definitions/ActionsToBeSetup" }, "EventTriggers": { - "$ref": "#/definitions/EventTriggerList" - }, - "Meid": { - "type": "string" - }, - "PolicyActionDefinitions": { - "$ref": "#/definitions/PolicyActionDefinition" + "$ref": "#/definitions/EventTriggerDefinition" }, - "RANFunctionID": { - "type": "integer" + "XappEventInstanceId": { + "type": "integer", + "maximum": 65535, + "minimum": 0 } } }, - "RANUeGroupList": { - "type": "object", - "required": [ - "RANUeGroupID", - "RANUeGroupDefinition", - "RANImperativePolicy" - ], - "properties": { - "RANImperativePolicy": { - "$ref": "#/definitions/ImperativePolicyDefinition" - }, - "RANUeGroupDefinition": { - "$ref": "#/definitions/RANUeGroupParams" - }, - "RANUeGroupID": { - "type": "integer" - } + "SubscriptionDetailsList": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionDetail" } }, - "RANUeGroupParams": { + "SubscriptionInstance": { "type": "object", "required": [ - "RANParameterID", - "RANParameterValue" + "XappEventInstanceId", + "E2EventInstanceId", + "ErrorCause" ], "properties": { - "RANParameterID": { - "type": "integer" + "E2EventInstanceId": { + "type": "integer", + "maximum": 65535, + "minimum": 0 }, - "RANParameterTestCondition": { - "type": "string", - "enum": [ - "equal", - "greaterthan", - "lessthan", - "contains", - "present" - ] + "ErrorCause": { + "description": "Empty string when no error.", + "type": "string" }, - "RANParameterValue": { - "type": "integer" + "XappEventInstanceId": { + "type": "integer", + "maximum": 65535, + "minimum": 0 } } }, - "ReportActionDefinition": { - "type": "object", - "properties": { - "ActionDefinitionFormat1": { - "$ref": "#/definitions/Format1ActionDefinition" - } + "SubscriptionList": { + "description": "A list of subscriptions", + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionData" } }, - "ReportParams": { + "SubscriptionParams": { "type": "object", "required": [ - "RANFunctionID", "ClientEndpoint", - "EventTriggers" + "Meid", + "RANFunctionID", + "SubscriptionDetails" ], "properties": { "ClientEndpoint": { - "type": "string" - }, - "EventTriggers": { - "$ref": "#/definitions/EventTriggerList" + "description": "xApp service address and port", + "type": "object", + "properties": { + "HTTPPort": { + "description": "xApp HTTP service address port", + "type": "integer", + "maximum": 65535, + "minimum": 0 + }, + "Host": { + "description": "xApp service address name like 'service-ricxapp-xappname-http.ricxapp'", + "type": "string" + }, + "RMRPort": { + "description": "xApp RMR service address port", + "type": "integer", + "maximum": 65535, + "minimum": 0 + } + } }, "Meid": { "type": "string" }, "RANFunctionID": { - "type": "integer" - }, - "ReportActionDefinitions": { - "$ref": "#/definitions/ReportActionDefinition" - } - } - }, - "SubscriptionData": { - "type": "object", - "properties": { - "Endpoint": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "maximum": 4095, + "minimum": 0 }, - "Meid": { - "type": "string" + "SubscriptionDetails": { + "$ref": "#/definitions/SubscriptionDetailsList" }, "SubscriptionId": { - "type": "integer" + "description": "Optional subscription ID (Submgr allocates if not given)", + "type": "string" } } }, - "SubscriptionInstance": { + "SubscriptionParamsClientEndpoint": { + "description": "xApp service address and port", "type": "object", - "required": [ - "RequestorId", - "InstanceId" - ], "properties": { - "InstanceId": { - "type": "integer" + "HTTPPort": { + "description": "xApp HTTP service address port", + "type": "integer", + "maximum": 65535, + "minimum": 0 }, - "RequestorId": { - "type": "integer" + "Host": { + "description": "xApp service address name like 'service-ricxapp-xappname-http.ricxapp'", + "type": "string" + }, + "RMRPort": { + "description": "xApp RMR service address port", + "type": "integer", + "maximum": 65535, + "minimum": 0 } } }, - "SubscriptionList": { - "description": "A list of subscriptions", - "type": "array", - "items": { - "$ref": "#/definitions/SubscriptionData" - } - }, "SubscriptionResponse": { "type": "object", "required": [ @@ -979,13 +806,45 @@ func init() { } } }, - "SubscriptionType": { - "type": "string", - "enum": [ - "insert", - "policy", - "report" - ] + "SubsequentAction": { + "description": "SubsequentAction is an OPTIONAL IE", + "type": "object", + "required": [ + "SubsequentActionType", + "TimeToWait" + ], + "properties": { + "SubsequentActionType": { + "type": "string", + "enum": [ + "continue", + "wait" + ] + }, + "TimeToWait": { + "type": "string", + "enum": [ + "zero", + "w1ms", + "w2ms", + "w5ms", + "w10ms", + "w20ms", + "w30ms", + "w40ms", + "w50ms", + "w100ms", + "w200ms", + "w500ms", + "w1s", + "w2s", + "w5s", + "w10s", + "w20s", + "w60s" + ] + } + } }, "XAppConfig": { "type": "object",