...
The integration team recommends to build your xApp descriptor schema by extending the minimal schema skeleton file.
View file | ||||
---|---|---|---|---|
|
Structure
The schema file includes the following required sections.
xapp_name: xapp_name is a string variable. properties are as follows.
Code Block "xapp_name": { "$id": "#/properties/xapp_name", "type": "string", "title": "The xApp Name", "default": "xapp", "examples": [ "example_xapp" ] },
version: version is a string variable that follows the semantic versioning syntax.
Code Block "version": { "$id": "#/properties/version", "type": "string", "title": "The xApp version", "default": "1.0.0", "examples": [ "1.0.0" ], "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-]+)*))?$" },
containers: containers is a list of container objects that includes name of the container, container image name, registry, tag, entry command and container http and rmr service portsand entry command . It has a structure of
Code Block "containers": [ { "name": "example_container_1", "image": { "registry": "example_image_registry_1", "name": "example_image_name_1", "tag": "example_image_tag_1" }, "command": "example_command_1", "ports":{ "http": 8080, "rmr_data": 4560, "rmr_route": 4561 } }, { "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 above structure
Code Block "containers": { "command$id": "example_command_2#/properties/containers", "portstype":{ "array", "httptitle": 8080"The Container Schema", "rmr_dataitems": 4560,{ "rmr_route$id": 4561"#/properties/containers/items", } } ]
The following schema defines the above structure
Code Block "containerstype":{ "object", "$idtitle": "#/properties/containers", The Container Items Schema", "typerequired": "array[ "name", "image" ], "titleproperties": "The Container Schema", { "itemsname": { "$id": "#/properties/containers/items/properties/name", "type": "objectstring", "title": "The xApp Container Items SchemaName", "default": "xapp", "requiredexamples": [ "namexapp", "image", "ports", "command" ] ] }, "propertiesimage": { "name$id": { "$id": "#/properties/"#/properties/containers/items/properties/nameimage", "type": "stringobject", "title": "The xApp Container NameImage", "defaultrequired": "xapp", [ "examples": [ registry", "xappname", ] "tag" } ], "properties": { "imageregistry": { "$id": "#/properties/containers/items/properties/image/properties/registry", "type": "objectstring", "title": "The ContainerxApp Image Registry", "requireddefault": [ "nexus3.o-ran-sc.org:10002", "registryexamples",: [ "name", "tag" nexus3.o-ran-sc.org:10002" ], "properties":{pattern": "^[A-Za-z0-9\\.-]{1,}\\.[A-Za-z]{1,}(?:\\:\\d+)?$" }, "registryname": { "$id": "#/properties/containers/items/properties/image/properties/registryname", "type": "string", "title": "The xApp Image RegistryName", "default": "nexus3.o-ran-sc.org:10002xapp", "examples": [ "nexus3.o-ran-sc.org:10002" xapp" ], "pattern": "^[A-Za-z0-9\\.-]{1,}\\.[A-Za-z]{1,}(?:\\:\\d+)?$" }, "name": { }, "tag": { "$id": "#/properties/containers/items/properties/image/properties/tag", "type": "string", "title": "The xApp Image Tag", "default": "latest", "examples": [ "latest" ] } } }, "command": { "$id": "#/properties/containers/items/properties/command", "type": "string", "title": "Command To Run The xApp Container", "default": "command", "examples": [ "command" ] } } } },
livenessProbe: livenessProbe defines the k8s liveness probe for the xApp pod. It follows the following schema
Code Block "livenessProbe": { "$id": "#/properties/livenessprobe", "type": "object", "title": "The Liveness Probe Definition", "properties": { "exec": { "$id": "#/properties/livenessprobe/exec", "type": "object", "title": "Script of Liveness Probe", "properties": { "command": { "$id": "#/properties/livenessprobe/exec/command", "type": "array", "items": [ { "$id": "#/properties/livenessprobe/exec/command/item", "type": "string", "title": "The Command Item", "default": "/bin/sh", "examples": [ "/bin/sh" ] } ] } }, "required": [ "command" ] }, "httpGet": { "$id": "#/properties/livenessprobe/httpget", "type": "object", "title": "Http of Liveness Probe", "properties": { "path": { "$id": "#/properties/livenessprobe/httpget/path", "type": "string", "title": "The Path of Http Liveness Probe", "default": "/health", "examples": [ "/health" ] }, "port": { "$id": "#/properties/livenessprobe/httpget/port", "type": "integer", "title": "The Port of Http Liveness Probe", "default": 80, "examples": [ 80 ] } }, "required": [ "path", "port" ] }, "initialDelaySeconds": { "$id": "#/properties/livenessprobe/initialdelayseconds", "type": "integer", "title": "Initial Delay of Liveness Probe", "default": 5, "examples": [ 5 ] }, "periodSeconds": { "$id": "#/properties/livenessprobe/periodseconds", "type": "integer", "title": "Period of Liveness Probe", "default": 15, "examples": [ 15 ] } }, "oneOf": [ { "$id": "#/properties/livenessprobe/oneof/exec", "required": ["exec", "initialDelaySeconds", "periodSeconds"] }, { "$id": "#/properties/livenessprobe/oneof/httpget", "required": ["httpGet", "initialDelaySeconds", "periodSeconds"] } ] },
readinessProbe: readinessProbe defines the k8s readiness probe for the xApp pod. It follows the following schema
Code Block "readinessProbe": { "$id": "#/properties/readinessprobe", "type": "object", "title": "The Readiness Probe Definition", "properties": { "exec": { "$id": "#/properties/readinessprobe/exec", "type": "object", "title": "Script of Readiness Probe", "properties": { "command": { "$id": "#/properties/readinessprobe/exec/command", "type": "array", "items": [ { "type": "string" } ] } }, "required": [ "command" ] }, "httpGet": { "$id": "#/properties/readinessprobe/httpget", "type": "object", "title": "Http of Readiness Probe", "properties": { "path": { "$id": "#/properties/readinessprobe/httpget/path", "type": "string", "title": "The Path of Http Readiness Probe", "default": "/health", "examples": [ "/health" ] }, "port": { "$id": "#/properties/readinessprobe/httpget/port", "type": "integer", "title": "The Port of Http Readiness Probe", "default": 80, "examples": [ 80 ] } }, "required": [ "path", "port" ] }, "initialDelaySeconds": { "$id": "#/properties/readinessprobe/initialdelayseconds", "type": "integer", "title": "Initial Delay of Readiness Probe", "default": 5, "examples": [ 5 ] }, "periodSeconds": { "$id": "#/properties/readinessprobe/periodseconds", "type": "integer", "title": "Period of Readiness Probe", "default": 15, "examples": [ 15 ] } }, "oneOf": [ { "$id": "#/properties/readinessprobe/oneof/exec", "required": ["exec", "initialDelaySeconds", "periodSeconds"] }, { "$id": "#/properties/readinessprobe/oneof/httpget", "required": ["httpGet", "initialDelaySeconds", "periodSeconds"] } ] },
messaging: this schema defines the messaging parameters structure
Code Block "messaging": { "type": "object", "$id": "#/properties/messaging", "title": "The Messaging Schema", "properties": { "ports": { "$id": "#/properties/messaging/ports", "type": "array", "title": "The Ports for Messaging", "items":{ "$id": "#/properties/messaging/ports/items", "type": "object", "title": "The Item of Port", "required": [ "name", "container", "port" ], "properties": { "name": { "$id": "#/properties/messaging/ports/items/name", "type": "string", "title": "The Name of the Port", "default": "App", "examples": [ "App" ] }, "container": { "$id": "#/properties/messaging/ports/items/container", "type": "string", "title": "The Container of the Port", "default": "xapp", "examples": [ "xapp" ] }, "port": { "$id": "#/properties/messaging/ports/items/port", "type": "integer", "title": "The Port Number", "default": 8080, "examples": [ 8080 ] } } } }, "maxSize": { "$id": "#/properties/messaging/maxsize", "type": "integer", "title": "The Maximum RMR Buffer Size", "default": 2072, "examples": [ 2072 ] }, "numWorkers": { "$id": "#/properties/messaging/numworkers", "type": "integer", "title": "The Number of RMR workers", "default": 1, "examples": [ 1 ] }, "txMessages": { "$id": "#/properties/messaging/txmessages", "type": "array", "title": "The txMessage Types", "items":{ "$id": "#/properties/messaging/txmessages/item", "type": "string", "title": "The txMessage Types Item", "default": "RIC_SUB", "examples": [ "RIC_SUB" ] } }, "rxMessages": { "$id": "#/properties/messaging/rxmessages", "type": "array", "title": "The rxMessage Types", "items":{ "$id": "#/properties/containersmessaging/items/properties/image/properties/namerxmessages/item", "type": "string", "title": "The xApprxMessage ImageTypes NameItem", "default": "xappRIC_SUB", "examples": [ "RIC_SUB" ] "xapp" } }, ] }, "tag"policies": { "$id": "#/properties/containers/items/properties/image/properties/tag",messaging/policies", "type": "stringarray", "title": "The xAppPolicies Image TagTypes", "default": "latest", "examples": [ "latest" "items":{ ] "$id": "#/properties/messaging/policies/item", }"type": "integer", } "title": "The Policy Types Item", } "default": 1, "portsexamples": { [ "$id": "#/properties/containers/items/properties/ports", "type": "object",1 ] } } "title": "The Container Ports"}, "required": [ "http "ports", "maxSize", "numWorkers", "txMessages", "rmr_datarxMessages", "rmr_routepolicies" ], "properties":{ "http},
- Controls: controls is an xApp specify section. xApp developer shall defines the schema for this section to describe the internal xApp parameter structure. it has a basic structure of
Code Block "controls": { "type": "object", "$id": "#/properties/containers/items/properties/ports/properties/httpcontrols", "title": "The Controls Schema", },
metrics: this schema defines the metrics structure
Code Block "metrics": { "type": "array", "type$id": "integer#/properties/metrics", "title": "HttpThe PortMetrics for xAppSchema", "defaultitems": 8080, { "examples$id": [ 8080 "#/properties/metrics/items", "type": "object", ] "title": "The Metrics Items Schema", }, "required": [ "rmr_dataobjectName": { , "$id": "#/properties/containers/items/properties/ports/properties/rmr_data"objectInstance", "name", "type":, "integerdescription", ], "titleproperties": "RMR Data Port for xApp", { "objectName": { "default$id": 4560, "#/properties/metrics/items/objectname", "examplestype": [ "string", 4560 "title": "The Object Name" ] }, "rmr_routeobjectInstance": { "$id": "#/properties/containersmetrics/items/properties/ports/properties/rmr_route", objectinstance", "type": "integerstring", "title": "RMRThe Route Port for xApp", Object Instance" "default": 4561}, "examplesname": [{ 4561 "$id": "#/properties/metrics/items/name", ] "type": "string", } } "title": "The Object Name" }, "commandtype": { "$id": "#/properties/containersmetrics/items/properties/commandtype", "type": "string", "title": "CommandThe ToObject Run The xApp Container", Type" }, "description": { "default$id": "command#/properties/metrics/items/description", "examplestype": [ "string", "commandtitle" : "The Object Description" ] } } } } }