Date: Thu, 28 Mar 2024 11:55:00 +0000 (UTC) Message-ID: <1450487591.10059.1711626900633@aws-us-west-2-oran-confluence-1.web.codeaurora.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10058_1157793653.1711626900632" ------=_Part_10058_1157793653.1711626900632 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Obsolete Note
<= /span>We are in the process of moving this xApp writing guide to https://docs.o-ran-sc.org.
Please refer to App = Writing Guide for latest guide.
JSON schema is used to describe the attributes and values in the xApp de= scriptor JSON file. The xApp onboarding process verifies the types and valu= es of the xApp parameters in the descriptor.
If mismatches are found, xApp onboarding will return failure.
The schema file consists of two parts: sections that are static and cann= ot be changed for different xApp, and xApp specific controls section.
When an operator is onboarding an = xApp that defines a control section, he/she will provide the controls secti= on schema with together with the xApp descriptor.
The xapp_onboarder will combine the schema files into one.
You can submit arbitrary schema for the controls section. However, if th= e xApp descriptor contains a controls section, you have to provide the corr= ect schema that describes it.
If the xApp does not require a control section, you can ignore the contr= ol section schema.
It is highly recommended to use draft-07 schema. The following is a skel= eton schema that you can use
{ =09"$schema": "http://json-schema.org/draft-07/schema#", =09"$id": "#/controls", =09"type": "object", =09"title": "Controls Section Schema", =09"required": [ =09=09"REQUIRED_ITEM_1", =09=09"REQUIRED_ITEM_2" =09], =09"properties": { =09=09"REQUIRED_ITEM_1": {REQUIRED_ITEM_1_SUB_SCHEMA}, =09=09"REQUIRED_ITEM_2": {REQUIRED_ITEM_2_SUB_SCHEMA} =09} }
Please include the list of required items in the required section, and p= rovide the corresponding sub_schema in the properties section.
You can download the skeleton schema file here
The overall schema file includes the following sections.
xapp_name: xapp_name i= s a string variable. properties are as follows.
=09= =09"xapp_name": { =09=09=09"$id": "#/properties/xapp_name", =09=09=09"type": "string", =09=09=09"title": "The xApp Name", =09=09=09"default": "xapp", =09=09=09"examples": [ =09=09=09=09"example_xapp"=09 =09=09=09] =09=09},
version: version is a = string variable that follows the semantic versioning syntax.
=09= =09"version": { =09=09=09"$id": "#/properties/version", =09=09=09"type": "string", =09=09=09"title": "The xApp version", =09=09=09"default": "1.0.0", =09=09=09"examples": [ =09=09=09=09"1.0.0"=09 =09=09=09], =09=09=09"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-= ((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z= -][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" =09=09},
containers: containers= is a list of container objects that includes name of the container, contai= ner image name, registry, tag, and entry command . It has a structure of
"contai= ners": [ { "name": "example_container_1", "image": { "registry": "example_image_registry_1", "name": "example_image_name_1", "tag": "example_image_tag_1" }, "command": "example_command_1" }, { "name": "example_container_2", "image": { "registry": "example_image_registry_2", "name": "example_image_name_2", "tag": "example_image_tag_2" } } ]
The following schema defines the abov= e structure
=09=09"= containers": { =09=09=09"$id": "#/properties/containers", =09=09=09"type": "array", =09=09=09"title": "The Container Schema", =09=09=09"items": { =09=09=09=09"$id": "#/properties/containers/items", =09=09=09=09"type": "object", =09=09=09=09"title": "The Container Items Schema", =09=09=09=09"required": [ =09=09=09=09=09"name", =09=09=09=09=09"image" =09=09=09=09], =09=09=09=09"properties": { =09=09=09=09=09"name": { =09=09=09=09=09=09"$id": "#/properties/containers/items/properties/name", =09=09=09=09=09=09"type": "string", =09=09=09=09=09=09"title": "The xApp Container Name", =09=09=09=09=09=09"default": "xapp", =09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09"xapp" =09=09=09=09=09=09] =09=09=09=09=09}, =09=09=09=09=09"image": { =09=09=09=09=09=09"$id": "#/properties/containers/items/properties/image", =09=09=09=09=09=09"type": "object", =09=09=09=09=09=09"title": "The Container Image", =09=09=09=09=09=09"required": [ =09=09=09=09=09=09=09"registry", =09=09=09=09=09=09=09"name", =09=09=09=09=09=09=09"tag" =09=09=09=09=09=09], =09=09=09=09=09=09"properties": { =09=09=09=09=09=09=09"registry": { =09=09=09=09=09=09=09=09"$id": "#/properties/containers/items/properties/im= age/properties/registry", =09=09=09=09=09=09=09=09"type": "string", =09=09=09=09=09=09=09=09"title": "The xApp Image Registry", =09=09=09=09=09=09=09=09"default": "nexus3.o-ran-sc.org:10002", =09=09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09=09"nexus3.o-ran-sc.org:10002" =09=09=09=09=09=09=09=09], =09=09=09=09=09=09=09=09"pattern": "^[A-Za-z0-9\\.-]{1,}\\.[A-Za-z]{1,}(?:\= \:\\d+)?$" =09=09=09=09=09=09=09}, =09=09=09=09=09=09=09"name": { =09=09=09=09=09=09=09=09"$id": "#/properties/containers/items/properties/im= age/properties/name", =09=09=09=09=09=09=09=09"type": "string", =09=09=09=09=09=09=09=09"title": "The xApp Image Name", =09=09=09=09=09=09=09=09"default": "xapp", =09=09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09=09"xapp" =09=09=09=09=09=09=09=09] =09=09=09=09=09=09=09}, =09=09=09=09=09=09=09"tag": { =09=09=09=09=09=09=09=09"$id": "#/properties/containers/items/properties/im= age/properties/tag", =09=09=09=09=09=09=09=09"type": "string", =09=09=09=09=09=09=09=09"title": "The xApp Image Tag", =09=09=09=09=09=09=09=09"default": "latest", =09=09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09=09"latest" =09=09=09=09=09=09=09=09] =09=09=09=09=09=09=09} =09=09=09=09=09=09} =09=09=09=09=09}, =09=09=09=09=09"command": { =09=09=09=09=09=09"$id": "#/properties/containers/items/properties/command"= , =09=09=09=09=09=09"type": "string", =09=09=09=09=09=09"title": "Command To Run The xApp Container", =09=09=09=09=09=09"default": "command", =09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09"command" =09=09=09=09=09=09] =09=09=09=09=09} =09=09=09=09} =09=09=09} =09=09},
livenessProbe: livenes= sProbe defines the k8s liveness probe for the xApp pod. It follows the foll= owing schema
= "livenessProbe": { =09 "$id": "#/properties/livenessprobe", "type": "object", =09=09=09"title": "The Liveness Probe Definition", "properties": { "exec": { =09=09=09=09=09"$id": "#/properties/livenessprobe/exec", "type": "object", =09=09=09=09=09"title": "Script of Liveness Probe", "properties": { "command": { =09=09=09=09=09=09=09 "$id": "#/properties/livenessprobe/exec/command", "type": "array", "items": [ { =09 =09=09=09=09=09=09=09=09"$id": "#/properties/livenessprobe/exec/command= /item", =09 =09=09=09=09=09=09=09=09"type": "string", =09 =09=09=09=09=09=09=09=09"title": "The Command Item", =09 =09=09=09=09=09=09=09=09"default": "/bin/sh", =09 =09=09=09=09=09=09=09=09"examples": [ =09 =09=09=09=09=09=09=09=09=09"/bin/sh" =09 =09=09=09=09=09=09=09=09] } ] } }, "required": [ "command" ] }, "httpGet": { =09=09=09=09=09"$id": "#/properties/livenessprobe/httpget", "type": "object", =09=09=09=09=09"title": "Http of Liveness Probe", "properties": { "path": { =09=09=09=09=09=09=09"$id": "#/properties/livenessprobe/httpget/path", =09=09=09=09=09=09=09"type": "string", =09=09=09=09=09=09=09"title": "The Path of Http Liveness Probe", =09=09=09=09=09=09=09"default": "/health", =09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09"/health" =09=09=09=09=09=09=09] }, =09=09=09=09=09=09 "port": { =09=09=09=09=09=09=09"$id": "#/properties/livenessprobe/httpget/port", =09=09=09=09=09=09=09"type": "integer", =09=09=09=09=09=09=09"title": "The Port of Http Liveness Probe", =09=09=09=09=09=09=09"default": 80, =09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=0980 =09=09=09=09=09=09=09] } }, "required": [ "path", =09=09=09=09 "port" ] }, "initialDelaySeconds": { "$id": "#/properties/livenessprobe/initialdelayseconds"= , =09=09=09=09=09"type": "integer", =09=09=09=09=09"title": "Initial Delay of Liveness Probe", =09=09=09=09=09"default": 5, =09=09=09=09=09"examples": [ =09=09=09=09=09=095 =09=09=09=09=09] }, "periodSeconds": { "$id": "#/properties/livenessprobe/periodseconds", =09=09=09=09=09"type": "integer", =09=09=09=09=09"title": "Period of Liveness Probe", =09=09=09=09=09"default": 15, =09=09=09=09=09"examples": [ =09=09=09=09=09=0915 =09=09=09=09=09] } }, =09=09 "oneOf": [ =09=09 {=20 =09=09=09=09 "$id": "#/properties/livenessprobe/oneof/exec", =09=09=09=09 "required": ["exec", "initialDelaySeconds", "periodSeconds"] =09=09=09 }, =09=09 {=20 =09=09=09=09 "$id": "#/properties/livenessprobe/oneof/httpget", =09=09=09=09 "required": ["httpGet", "initialDelaySeconds", "periodSeconds= "] =09=09=09 } =09=09 ] },
readinessProbe: readin= essProbe defines the k8s readiness probe for the xApp pod. It follows the f= ollowing schema
= "readinessProbe": { =09 "$id": "#/properties/readinessprobe", "type": "object", =09=09=09"title": "The Readiness Probe Definition", "properties": { "exec": { =09=09=09=09=09"$id": "#/properties/readinessprobe/exec", "type": "object", =09=09=09=09=09"title": "Script of Readiness Probe", "properties": { "command": { =09=09=09=09=09=09=09 "$id": "#/properties/readinessprobe/exec/command", "type": "array", "items": [ { "type": "string" } ] } }, "required": [ "command" ] }, "httpGet": { =09=09=09=09=09"$id": "#/properties/readinessprobe/httpget", "type": "object", =09=09=09=09=09"title": "Http of Readiness Probe", "properties": { "path": { =09=09=09=09=09=09=09"$id": "#/properties/readinessprobe/httpget/path", =09=09=09=09=09=09=09"type": "string", =09=09=09=09=09=09=09"title": "The Path of Http Readiness Probe", =09=09=09=09=09=09=09"default": "/health", =09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09"/health" =09=09=09=09=09=09=09] }, =09=09=09=09=09=09 "port": { =09=09=09=09=09=09=09"$id": "#/properties/readinessprobe/httpget/port", =09=09=09=09=09=09=09"type": "integer", =09=09=09=09=09=09=09"title": "The Port of Http Readiness Probe", =09=09=09=09=09=09=09"default": 80, =09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=0980 =09=09=09=09=09=09=09] } }, "required": [ "path", =09=09=09=09 "port" ] }, "initialDelaySeconds": { "$id": "#/properties/readinessprobe/initialdelayseconds= ", =09=09=09=09=09"type": "integer", =09=09=09=09=09"title": "Initial Delay of Readiness Probe", =09=09=09=09=09"default": 5, =09=09=09=09=09"examples": [ =09=09=09=09=09=095 =09=09=09=09=09] }, "periodSeconds": { "$id": "#/properties/readinessprobe/periodseconds", =09=09=09=09=09"type": "integer", =09=09=09=09=09"title": "Period of Readiness Probe", =09=09=09=09=09"default": 15, =09=09=09=09=09"examples": [ =09=09=09=09=09=0915 =09=09=09=09=09] } }, =09=09 "oneOf": [ =09=09 {=20 =09=09=09=09 "$id": "#/properties/readinessprobe/oneof/exec", =09=09=09=09 "required": ["exec", "initialDelaySeconds", "periodSeconds"] =09=09=09 }, =09=09 {=20 =09=09=09=09 "$id": "#/properties/readinessprobe/oneof/httpget", =09=09=09=09 "required": ["httpGet", "initialDelaySeconds", "periodSeconds= "] =09=09=09 } =09=09 ] },=09
messaging: this schema= defines the messaging parameters structure
=09 = "messaging": { =09=09=09"type": "object", =09=09=09"$id": "#/properties/messaging", =09=09=09"title": "The Messaging Schema", =09=09=09"properties": { =09=09=09=09"ports": { =09 =09 =09 =09"$id": "#/properties/messaging/ports", =09 =09=09=09=09"type": "array", =09 =09=09=09=09"title": "The Ports for Messaging", =09=09=09=09=09"items":{ =09 =09=09=09=09=09"$id": "#/properties/messaging/ports/items", =09 =09=09=09=09=09"type": "object", =09 =09=09=09=09=09"title": "The Item of Port", =09=09=09=09=09=09"required": ["name", "container", "port"],=09=09 =09=09=09=09=09 "dependencies": { =09=09=09=09=09 "txMessages": ["rxMessages", "policies"], =09=09=09=09=09=09 "rxMessages": ["txMessages", "policies"], =09=09=09=09=09=09 "policies": ["rxMessages", "txMessages"] =09=09=09=09=09 }, =09 =09=09=09=09=09"properties": { =09=09=09=09=09=09=09"name": { =09=09=09=09=09=09=09=09"$id": "#/properties/messaging/ports/items/name", =09=09=09=09=09=09=09=09"type": "string", =09=09=09=09=09=09=09=09"title": "The Name of the Port", =09=09=09=09=09=09=09=09"default": "App", =09=09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09=09"App" =09=09=09=09=09=09=09=09] =09=09=09=09=09=09=09}, =09=09=09=09=09=09=09"container": { =09=09=09=09=09=09=09=09"$id": "#/properties/messaging/ports/items/containe= r", =09=09=09=09=09=09=09=09"type": "string", =09=09=09=09=09=09=09=09"title": "The Container of the Port", =09=09=09=09=09=09=09=09"default": "xapp", =09=09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09=09"xapp" =09=09=09=09=09=09=09=09] =09=09=09=09=09=09=09}, =09=09=09=09=09=09=09"port": { =09=09=09=09=09=09=09=09"$id": "#/properties/messaging/ports/items/port", =09=09=09=09=09=09=09=09"type": "integer", =09=09=09=09=09=09=09=09"title": "The Port Number", =09=09=09=09=09=09=09=09"default": 8080, =09=09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09=098080 =09=09=09=09=09=09=09=09] =09=09=09=09=09=09=09}, =09=09=09=09=09=09=09"description": { =09=09=09=09=09=09=09=09"$id": "#/properties/messaging/ports/items/descript= ion", =09=09=09=09=09=09=09=09"type": "string", =09=09=09=09=09=09=09=09"title": "The description for the port", =09=09=09=09=09=09=09=09"default": "port description", =09=09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09=09"port description" =09=09=09=09=09=09=09=09] =09=09=09=09=09=09=09}, =09=09=09 "txMessages": { =09=09=09=09=09=09=09=09"$id": "#/properties/messaging/ports/items/txmessag= es", =09=09=09 "type": "array", =09=09=09=09=09=09=09=09"title": "The txMessage Types", =09=09=09 "items":{ =09=09=09=09=09=09=09=09=09"$id": "#/properties/messaging/ports/items//txme= ssages/item", =09=09=09=09=09=09=09=09=09"type": "string", =09=09=09=09=09=09=09=09=09"title": "The txMessage Types Item", =09=09=09=09=09=09=09=09=09"default": "RIC_SUB", =09=09=09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09=09=09"RIC_SUB" =09=09=09=09=09=09=09=09=09] =09=09=09=09=09=09=09=09} =09=09=09 }, =09=09=09 "rxMessages": { =09=09=09=09=09=09=09=09"$id": "#/properties/messaging/ports/items/rxmessag= es", =09=09=09 "type": "array", =09=09=09=09=09=09=09=09"title": "The rxMessage Types", =09=09=09 "items":{ =09=09=09=09=09=09=09=09=09"$id": "#/properties/messaging/ports/items/rxmes= sages/item", =09=09=09=09=09=09=09=09=09"type": "string", =09=09=09=09=09=09=09=09=09"title": "The rxMessage Types Item", =09=09=09=09=09=09=09=09=09"default": "RIC_SUB", =09=09=09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09=09=09"RIC_SUB" =09=09=09=09=09=09=09=09=09] =09=09=09=09=09=09=09=09} =09=09=09 }, =09=09=09 "policies": { =09=09=09=09=09=09=09=09"$id": "#/properties/messaging/ports/items/policies= ", =09=09=09 "type": "array", =09=09=09=09=09=09=09=09"title": "The Policies Types", =09=09=09 "items":{ =09=09=09=09=09=09=09=09=09"$id": "#/properties/messaging/ports/items/polic= ies/item", =09=09=09=09=09=09=09=09=09"type": "integer", =09=09=09=09=09=09=09=09=09"title": "The Policy Types Item", =09=09=09=09=09=09=09=09=09"default": 1, =09=09=09=09=09=09=09=09=09"examples": [ =09=09=09=09=09=09=09=09=09=091 =09=09=09=09=09=09=09=09=09] =09=09=09=09=09=09=09=09} =09=09=09 } =09=09=09=09=09 =09} =09=09=09=09=09} =09=09=09=09} =09=09=09}, "required": [ "ports" ] =09=09=09=09 =09=09},
metrics: this schema d= efines the metrics structure
=09=09"= metrics": { =09=09=09"type": "array", =09=09=09"$id": "#/properties/metrics", =09=09=09"title": "The Metrics Schema", =09=09=09"items": { =09=09=09=09"$id": "#/properties/metrics/items", =09=09=09=09"type": "object", =09=09=09=09"title": "The Metrics Items Schema", =09=09=09=09"required": [ =09=09=09=09=09"objectName", =09=09=09=09=09"objectInstance", =09=09=09=09=09"name", =09=09=09=09=09"type", =09=09=09=09=09"description" =09=09=09=09], =09=09=09=09"properties": { =09=09=09=09=09"objectName": { =09=09=09=09=09=09"$id": "#/properties/metrics/items/objectname", =09=09=09=09=09=09"type": "string", =09=09=09=09=09=09"title": "The Object Name" =09=09=09=09=09}, =09=09=09=09=09"objectInstance": { =09=09=09=09=09=09"$id": "#/properties/metrics/items/objectinstance", =09=09=09=09=09=09"type": "string", =09=09=09=09=09=09"title": "The Object Instance" =09=09=09=09=09}, =09=09=09=09=09"name": { =09=09=09=09=09=09"$id": "#/properties/metrics/items/name", =09=09=09=09=09=09"type": "string", =09=09=09=09=09=09"title": "The Object Name" =09=09=09=09=09}, =09=09=09=09=09"type": { =09=09=09=09=09=09"$id": "#/properties/metrics/items/type", =09=09=09=09=09=09"type": "string", =09=09=09=09=09=09"title": "The Object Type" =09=09=09=09=09}, =09=09=09=09=09"description": { =09=09=09=09=09=09"$id": "#/properties/metrics/items/description", =09=09=09=09=09=09"type": "string", =09=09=09=09=09=09"title": "The Object Description" =09=09=09=09=09} =09=09=09=09} =09=09=09} =09=09} =09},
Controls: This section= will be replaced by the submitted control section schema. If the controls = section schema is not provided, the following will be used to make sure tha= t the xApp onboarder will reject an xA= pp descriptor with an undefined control section.
=09=09"= controls": { =09=09=09"required": [ =09=09=09=09"__empty_control_section__" =09=09=09] =09=09}
You can download the schema file here=