X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frestapi%2Fembedded_spec.go;h=4506519874ac91d736fc1722308da746f60cd4bf;hb=40bc000e6cafe3a7eea32e4361268574050c12c4;hp=79f78696dd710358f6709d1086cb4e7169bc5bab;hpb=429da19d53224135082f8b6f65470ae3ee8df176;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/restapi/embedded_spec.go b/pkg/restapi/embedded_spec.go index 79f7869..4506519 100644 --- a/pkg/restapi/embedded_spec.go +++ b/pkg/restapi/embedded_spec.go @@ -29,26 +29,27 @@ 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", "paths": { - "/subscriptions": { + "/config": { "get": { "produces": [ - "application/json" + "application/json", + "application/xml" ], "tags": [ - "query" + "xapp" ], - "summary": "Returns list of subscriptions", - "operationId": "getAllSubscriptions", + "summary": "Returns the configuration of all xapps", + "operationId": "getXappConfigList", "responses": { "200": { - "description": "successful query of subscriptions", + "description": "successful query of xApp config", "schema": { - "$ref": "#/definitions/SubscriptionList" + "$ref": "#/definitions/XappConfigList" } }, "500": { @@ -57,46 +58,28 @@ func init() { } } }, - "/subscriptions/policy": { - "post": { - "consumes": [ - "application/json" - ], + "/subscriptions": { + "get": { "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" - } - } + "common" ], + "summary": "Returns list of subscriptions", + "operationId": "getAllSubscriptions", "responses": { - "201": { - "description": "Subscription successfully created", + "200": { + "description": "successful query of subscriptions", "schema": { - "$ref": "#/definitions/SubscriptionResponse" + "$ref": "#/definitions/SubscriptionList" } }, - "400": { - "description": "Invalid input" - }, "500": { "description": "Internal error" } } - } - }, - "/subscriptions/report": { + }, "post": { "consumes": [ "application/json" @@ -105,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" } } ], @@ -137,6 +120,12 @@ func init() { }, "/subscriptions/{subscriptionId}": { "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ "common" ], @@ -166,269 +155,277 @@ 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" }, - "ActionParameterValue": { - "type": "boolean" + "ActionID": { + "type": "integer", + "maximum": 255 + }, + "ActionType": { + "type": "string", + "enum": [ + "insert", + "policy", + "report" + ] + }, + "SubsequentAction": { + "$ref": "#/definitions/SubsequentAction" } } }, - "EventTrigger": { + "ActionsToBeSetup": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionToBeSetup" + } + }, + "ConfigMetadata": { "type": "object", + "required": [ + "xappName", + "configType" + ], "properties": { - "ENBId": { - "type": "string" - }, - "InterfaceDirection": { - "type": "integer" - }, - "PlmnId": { - "type": "string" - }, - "ProcedureCode": { - "type": "integer" - }, - "TriggerNature": { + "configType": { + "description": "The type of the content", "type": "string", "enum": [ - "now", - "on change" + "json", + "xml", + "other" ] }, - "TypeOfMessage": { - "type": "integer" + "xappName": { + "description": "Name of the xApp", + "type": "string" } } }, - "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" + }, + "SubscriptionInstances": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionInstance" + } } } }, - "Format2ActionDefinition": { + "SubscriptionDetail": { "type": "object", "required": [ - "RANUeGroupParameters" + "XappEventInstanceId", + "EventTriggers", + "ActionToBeSetupList" ], "properties": { - "RANUeGroupParameters": { - "type": "array", - "items": { - "$ref": "#/definitions/RANUeGroupList" - } + "ActionToBeSetupList": { + "$ref": "#/definitions/ActionsToBeSetup" + }, + "EventTriggers": { + "$ref": "#/definitions/EventTriggerDefinition" + }, + "XappEventInstanceId": { + "type": "integer", + "maximum": 65535 } } }, - "ImperativePolicyDefinition": { + "SubscriptionDetailsList": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionDetail" + } + }, + "SubscriptionInstance": { "type": "object", "required": [ - "PolicyParameterID", - "PolicyParameterValue" + "XappEventInstanceId", + "E2EventInstanceId", + "ErrorCause" ], "properties": { - "PolicyParameterID": { - "type": "integer" + "E2EventInstanceId": { + "type": "integer", + "maximum": 65535 }, - "PolicyParameterValue": { - "type": "integer" + "ErrorCause": { + "description": "Empty string when no error.", + "type": "string" + }, + "XappEventInstanceId": { + "type": "integer", + "maximum": 65535 } } }, - "PolicyActionDefinition": { - "type": "object", - "properties": { - "ActionDefinitionFormat2": { - "$ref": "#/definitions/Format2ActionDefinition" - } + "SubscriptionList": { + "description": "A list of subscriptions", + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionData" } }, - "PolicyParams": { + "SubscriptionParams": { "type": "object", "required": [ + "ClientEndpoint", "Meid", "RANFunctionID", - "ClientEndpoint", - "EventTriggers", - "PolicyActionDefinitions" + "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" }, - "PolicyActionDefinitions": { - "$ref": "#/definitions/PolicyActionDefinition" - }, "RANFunctionID": { - "type": "integer" + "type": "integer", + "maximum": 4095 + }, + "SubscriptionDetails": { + "$ref": "#/definitions/SubscriptionDetailsList" + }, + "SubscriptionId": { + "description": "Optional subscription ID (Submgr allocates if not given)", + "type": "string" } } }, - "RANUeGroupList": { + "SubscriptionResponse": { "type": "object", "required": [ - "RANUeGroupID", - "RANUeGroupDefinition", - "RANImperativePolicy" + "SubscriptionId", + "SubscriptionInstances" ], "properties": { - "RANImperativePolicy": { - "$ref": "#/definitions/ImperativePolicyDefinition" - }, - "RANUeGroupDefinition": { - "$ref": "#/definitions/RANUeGroupParams" + "SubscriptionId": { + "type": "string" }, - "RANUeGroupID": { - "type": "integer" + "SubscriptionInstances": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionInstance" + } } } }, - "RANUeGroupParams": { + "SubsequentAction": { + "description": "SubsequentAction is an OPTIONAL IE", "type": "object", "required": [ - "RANParameterID", - "RANParameterValue" + "SubsequentActionType", + "TimeToWait" ], "properties": { - "RANParameterID": { - "type": "integer" - }, - "RANParameterTestCondition": { + "SubsequentActionType": { "type": "string", "enum": [ - "equal", - "greaterthan", - "lessthan", - "contains", - "present" + "continue", + "wait" ] }, - "RANParameterValue": { - "type": "integer" - } - } - }, - "ReportActionDefinition": { - "type": "object", - "properties": { - "ActionDefinitionFormat1": { - "$ref": "#/definitions/Format1ActionDefinition" + "TimeToWait": { + "type": "string", + "enum": [ + "zero", + "w1ms", + "w2ms", + "w5ms", + "w10ms", + "w20ms", + "w30ms", + "w40ms", + "w50ms", + "w100ms", + "w200ms", + "w500ms", + "w1s", + "w2s", + "w5s", + "w10s", + "w20s", + "w60s" + ] } } }, - "ReportParams": { + "XAppConfig": { "type": "object", "required": [ - "RANFunctionID", - "ClientEndpoint", - "EventTriggers" + "metadata", + "config" ], "properties": { - "ClientEndpoint": { - "type": "string" + "config": { + "description": "Configuration in JSON format", + "type": "object" }, - "EventTriggers": { - "$ref": "#/definitions/EventTriggerList" - }, - "Meid": { - "type": "string" - }, - "RANFunctionID": { - "type": "integer" - }, - "ReportActionDefinitions": { - "$ref": "#/definitions/ReportActionDefinition" - } - } - }, - "SubscriptionData": { - "type": "object", - "properties": { - "Endpoint": { - "type": "array", - "items": { - "type": "string" - } - }, - "Meid": { - "type": "string" - }, - "SubscriptionId": { - "type": "integer" + "metadata": { + "$ref": "#/definitions/ConfigMetadata" } } }, - "SubscriptionList": { - "description": "A list of subscriptions", + "XappConfigList": { "type": "array", "items": { - "$ref": "#/definitions/SubscriptionData" + "$ref": "#/definitions/XAppConfig" } - }, - "SubscriptionResponse": { - "type": "array", - "items": { - "$ref": "#/definitions/SubscriptionResponseItem" - } - }, - "SubscriptionResponseItem": { - "type": "object", - "required": [ - "SubscriptionId", - "RequestorId", - "InstanceId" - ], - "properties": { - "InstanceId": { - "type": "integer" - }, - "RequestorId": { - "type": "integer" - }, - "SubscriptionId": { - "type": "string" - } - } - }, - "SubscriptionType": { - "type": "string", - "enum": [ - "insert", - "policy", - "report" - ] } } }`)) @@ -444,26 +441,27 @@ 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", "paths": { - "/subscriptions": { + "/config": { "get": { "produces": [ - "application/json" + "application/json", + "application/xml" ], "tags": [ - "query" + "xapp" ], - "summary": "Returns list of subscriptions", - "operationId": "getAllSubscriptions", + "summary": "Returns the configuration of all xapps", + "operationId": "getXappConfigList", "responses": { "200": { - "description": "successful query of subscriptions", + "description": "successful query of xApp config", "schema": { - "$ref": "#/definitions/SubscriptionList" + "$ref": "#/definitions/XappConfigList" } }, "500": { @@ -472,46 +470,28 @@ func init() { } } }, - "/subscriptions/policy": { - "post": { - "consumes": [ - "application/json" - ], + "/subscriptions": { + "get": { "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" - } - } + "common" ], + "summary": "Returns list of subscriptions", + "operationId": "getAllSubscriptions", "responses": { - "201": { - "description": "Subscription successfully created", + "200": { + "description": "successful query of subscriptions", "schema": { - "$ref": "#/definitions/SubscriptionResponse" + "$ref": "#/definitions/SubscriptionList" } }, - "400": { - "description": "Invalid input" - }, "500": { "description": "Internal error" } } - } - }, - "/subscriptions/report": { + }, "post": { "consumes": [ "application/json" @@ -520,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" } } ], @@ -552,6 +532,12 @@ func init() { }, "/subscriptions/{subscriptionId}": { "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ "common" ], @@ -581,269 +567,306 @@ 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" }, - "ActionParameterValue": { - "type": "boolean" + "ActionID": { + "type": "integer", + "maximum": 255, + "minimum": 0 + }, + "ActionType": { + "type": "string", + "enum": [ + "insert", + "policy", + "report" + ] + }, + "SubsequentAction": { + "$ref": "#/definitions/SubsequentAction" } } }, - "EventTrigger": { + "ActionsToBeSetup": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionToBeSetup" + } + }, + "ConfigMetadata": { "type": "object", + "required": [ + "xappName", + "configType" + ], "properties": { - "ENBId": { - "type": "string" - }, - "InterfaceDirection": { - "type": "integer" - }, - "PlmnId": { - "type": "string" - }, - "ProcedureCode": { - "type": "integer" - }, - "TriggerNature": { + "configType": { + "description": "The type of the content", "type": "string", "enum": [ - "now", - "on change" + "json", + "xml", + "other" ] }, - "TypeOfMessage": { - "type": "integer" + "xappName": { + "description": "Name of the xApp", + "type": "string" } } }, - "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" + }, + "SubscriptionInstances": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionInstance" + } } } }, - "Format2ActionDefinition": { + "SubscriptionDetail": { "type": "object", "required": [ - "RANUeGroupParameters" + "XappEventInstanceId", + "EventTriggers", + "ActionToBeSetupList" ], "properties": { - "RANUeGroupParameters": { - "type": "array", - "items": { - "$ref": "#/definitions/RANUeGroupList" - } + "ActionToBeSetupList": { + "$ref": "#/definitions/ActionsToBeSetup" + }, + "EventTriggers": { + "$ref": "#/definitions/EventTriggerDefinition" + }, + "XappEventInstanceId": { + "type": "integer", + "maximum": 65535, + "minimum": 0 } } }, - "ImperativePolicyDefinition": { + "SubscriptionDetailsList": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionDetail" + } + }, + "SubscriptionInstance": { "type": "object", "required": [ - "PolicyParameterID", - "PolicyParameterValue" + "XappEventInstanceId", + "E2EventInstanceId", + "ErrorCause" ], "properties": { - "PolicyParameterID": { - "type": "integer" + "E2EventInstanceId": { + "type": "integer", + "maximum": 65535, + "minimum": 0 }, - "PolicyParameterValue": { - "type": "integer" + "ErrorCause": { + "description": "Empty string when no error.", + "type": "string" + }, + "XappEventInstanceId": { + "type": "integer", + "maximum": 65535, + "minimum": 0 } } }, - "PolicyActionDefinition": { - "type": "object", - "properties": { - "ActionDefinitionFormat2": { - "$ref": "#/definitions/Format2ActionDefinition" - } + "SubscriptionList": { + "description": "A list of subscriptions", + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionData" } }, - "PolicyParams": { + "SubscriptionParams": { "type": "object", "required": [ + "ClientEndpoint", "Meid", "RANFunctionID", - "ClientEndpoint", - "EventTriggers", - "PolicyActionDefinitions" + "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" }, - "PolicyActionDefinitions": { - "$ref": "#/definitions/PolicyActionDefinition" - }, "RANFunctionID": { - "type": "integer" - } - } - }, - "RANUeGroupList": { - "type": "object", - "required": [ - "RANUeGroupID", - "RANUeGroupDefinition", - "RANImperativePolicy" - ], - "properties": { - "RANImperativePolicy": { - "$ref": "#/definitions/ImperativePolicyDefinition" + "type": "integer", + "maximum": 4095, + "minimum": 0 }, - "RANUeGroupDefinition": { - "$ref": "#/definitions/RANUeGroupParams" + "SubscriptionDetails": { + "$ref": "#/definitions/SubscriptionDetailsList" }, - "RANUeGroupID": { - "type": "integer" + "SubscriptionId": { + "description": "Optional subscription ID (Submgr allocates if not given)", + "type": "string" } } }, - "RANUeGroupParams": { + "SubscriptionParamsClientEndpoint": { + "description": "xApp service address and port", "type": "object", - "required": [ - "RANParameterID", - "RANParameterValue" - ], "properties": { - "RANParameterID": { - "type": "integer" - }, - "RANParameterTestCondition": { - "type": "string", - "enum": [ - "equal", - "greaterthan", - "lessthan", - "contains", - "present" - ] + "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" }, - "RANParameterValue": { - "type": "integer" + "RMRPort": { + "description": "xApp RMR service address port", + "type": "integer", + "maximum": 65535, + "minimum": 0 } } }, - "ReportActionDefinition": { - "type": "object", - "properties": { - "ActionDefinitionFormat1": { - "$ref": "#/definitions/Format1ActionDefinition" - } - } - }, - "ReportParams": { + "SubscriptionResponse": { "type": "object", "required": [ - "RANFunctionID", - "ClientEndpoint", - "EventTriggers" + "SubscriptionId", + "SubscriptionInstances" ], "properties": { - "ClientEndpoint": { - "type": "string" - }, - "EventTriggers": { - "$ref": "#/definitions/EventTriggerList" - }, - "Meid": { + "SubscriptionId": { "type": "string" }, - "RANFunctionID": { - "type": "integer" - }, - "ReportActionDefinitions": { - "$ref": "#/definitions/ReportActionDefinition" + "SubscriptionInstances": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionInstance" + } } } }, - "SubscriptionData": { + "SubsequentAction": { + "description": "SubsequentAction is an OPTIONAL IE", "type": "object", + "required": [ + "SubsequentActionType", + "TimeToWait" + ], "properties": { - "Endpoint": { - "type": "array", - "items": { - "type": "string" - } - }, - "Meid": { - "type": "string" + "SubsequentActionType": { + "type": "string", + "enum": [ + "continue", + "wait" + ] }, - "SubscriptionId": { - "type": "integer" + "TimeToWait": { + "type": "string", + "enum": [ + "zero", + "w1ms", + "w2ms", + "w5ms", + "w10ms", + "w20ms", + "w30ms", + "w40ms", + "w50ms", + "w100ms", + "w200ms", + "w500ms", + "w1s", + "w2s", + "w5s", + "w10s", + "w20s", + "w60s" + ] } } }, - "SubscriptionList": { - "description": "A list of subscriptions", - "type": "array", - "items": { - "$ref": "#/definitions/SubscriptionData" - } - }, - "SubscriptionResponse": { - "type": "array", - "items": { - "$ref": "#/definitions/SubscriptionResponseItem" - } - }, - "SubscriptionResponseItem": { + "XAppConfig": { "type": "object", "required": [ - "SubscriptionId", - "RequestorId", - "InstanceId" + "metadata", + "config" ], "properties": { - "InstanceId": { - "type": "integer" - }, - "RequestorId": { - "type": "integer" + "config": { + "description": "Configuration in JSON format", + "type": "object" }, - "SubscriptionId": { - "type": "string" + "metadata": { + "$ref": "#/definitions/ConfigMetadata" } } }, - "SubscriptionType": { - "type": "string", - "enum": [ - "insert", - "policy", - "report" - ] + "XappConfigList": { + "type": "array", + "items": { + "$ref": "#/definitions/XAppConfig" + } } } }`))