Extend xapp-descriptor with controls section 69/4269/4
authorLott, Christopher (cl778h) <cl778h@att.com>
Mon, 29 Jun 2020 17:46:58 +0000 (13:46 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Mon, 29 Jun 2020 17:51:46 +0000 (13:51 -0400)
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) <cl778h@att.com>
Change-Id: Ib6b357a62577445c85fe8d60d3eb7f35aeb3e84b

docs/release-notes.rst
setup.py
xapp-descriptor/config.json
xapp-descriptor/controls.json [new file with mode: 0644]

index 061fce9..e18d2ef 100644 (file)
@@ -14,8 +14,9 @@ and this project adheres to `Semantic Versioning <http://semver.org/>`__.
 [1.1.0] - 2020-06-29
 --------------------
 * Send alarm on SDL failure (`RICAPP-117 <https://jira.o-ran-sc.org/browse/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
index 13b6840..8683b91 100644 (file)
--- 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"])],
index f8a798f..276083f 100644 (file)
       }
     ]
   },
+  "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 (file)
index 0000000..ea02709
--- /dev/null
@@ -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": ""
+    }
+  }
+}