From: Lott, Christopher (cl778h) Date: Mon, 29 Jun 2020 17:46:58 +0000 (-0400) Subject: Extend xapp-descriptor with controls section X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F4269%2F4;p=ric-app%2Fqp-driver.git Extend xapp-descriptor with controls section Add example integer and string configuration properties to config.json. Add controls.json file containing a schema to validate those properties. Issue-ID: RICAPP-122 Signed-off-by: Lott, Christopher (cl778h) Change-Id: Ib6b357a62577445c85fe8d60d3eb7f35aeb3e84b --- diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 061fce9..e18d2ef 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -14,8 +14,9 @@ and this project adheres to `Semantic Versioning `__. [1.1.0] - 2020-06-29 -------------------- * Send alarm on SDL failure (`RICAPP-117 `_) +* Define configuration properties in xapp-descriptor controls section with JSON schema * Requires RMR at version 4.1.2 or later -* Requires xapp-frame-py at version 1.2.0 or later +* Requires xapp-frame-py at version 1.3.0 or later [1.0.9] - 2020-06-02 diff --git a/setup.py b/setup.py index 13b6840..8683b91 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ setup( author="O-RAN-SC Community", description="QP Driver Xapp for traffic steering use case", url="https://gerrit.o-ran-sc.org/r/admin/repos/ric-app/qp-driver", - install_requires=["ricxappframe>=1.2.1,<2.0.0"], + install_requires=["ricxappframe>=1.3.0,<2.0.0"], entry_points={"console_scripts": ["start-qpd.py=qpdriver.main:start"]}, # adds a magical entrypoint for Docker license="Apache 2.0", data_files=[("", ["LICENSE.txt"])], diff --git a/xapp-descriptor/config.json b/xapp-descriptor/config.json index f8a798f..276083f 100644 --- a/xapp-descriptor/config.json +++ b/xapp-descriptor/config.json @@ -35,6 +35,10 @@ } ] }, + "controls": { + "example_int": 10000, + "example_str": "value" + }, "rmr": { "protPort": "tcp:4560", "maxSize": 2072, diff --git a/xapp-descriptor/controls.json b/xapp-descriptor/controls.json new file mode 100644 index 0000000..ea02709 --- /dev/null +++ b/xapp-descriptor/controls.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "#/controls", + "type": "object", + "title": "Controls Section Schema", + "required": [ + "example_int", + "example_str" + ], + "properties": { + "example_int": { + "$id": "#/properties/controls/items/properties/example_int", + "type": "integer", + "title": "An example integer property", + "default": 0 + }, + "example_str": { + "$id": "#/properties/controls/items/properties/example_str", + "type": "string", + "title": "An example string property", + "default": "" + } + } +}