Commit 40a69e71 authored by Rafael Monnerat's avatar Rafael Monnerat

ors-amarisoft: Redesign json-schemas structure

  Most of the work is to improve the way data is validated to avoid
duplication and other miss-behavior from the parameter editor.

  It drops non JSON Schema standard features (hidden and template) and use
  key/object structure instead const, since it provides better behaviour
  whenever render the form.

  Using objects, only fills structured values once the subform has a
  value inputed (or set), so it dont pollute of modifies the data just by
  rendering the form.

  It is required to still update instance for follow up the change
parent b56ede93
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Cell. Common properties",
"type": "object",
"required": [
"cell_type",
"rf_mode",
"pci",
"cell_id",
"bandwidth",
"ru"
],
"properties": {
"cell_type": {
"type": "string",
"options": { "hidden": true }
},
"cell_kind": {
"type": "string",
"const": "enb",
"template": "enb",
"options": { "hidden": true }
},
"rf_mode": {
"title": "RF mode",
"description": "Mode for TX/RX radio multiplexing: Frequency- or Time- Domain Division",
"type": "string",
"enum": ["fdd", "tdd"],
"enum": [
"fdd",
"tdd"
],
"propertyOrder": 101
},
"pci": {
......@@ -62,7 +50,6 @@
"propertyOrder": 9999
}
},
"$defs": {
"ru-of-cell": {
"title": "Radio Unit",
......@@ -71,39 +58,55 @@
"title": "Shared Radio Unit",
"description": "Use radio unit defined in separate shared instance",
"type": "object",
"required": ["ru_type", "ru_ref"],
"required": [
"ru_ref"
],
"additionalProperties": false,
"properties": {
"ru_ref": {
"title": "Shared Radio Unit",
"description": "Use radio unit defined in separate shared instance",
"type": "object",
"required": [
"ru_ref"
],
"additionalProperties": false,
"properties": {
"ru_type": {
"const": "ru_ref",
"template": "ru_ref",
"options": { "hidden": true }
},
"ru_ref": {
"title": "RU Reference",
"description": "Reference of shared radio unit instance",
"type": "string"
}
}
}
}
},
{
"title": "Shared Radio Unit of a Cell",
"description": "Use the same radio unit as referenced cell instance does",
"type": "object",
"required": ["ru_type", "ruincell_ref"],
"required": [
"ruincell_ref"
],
"additionalProperties": false,
"properties": {
"ruincell_ref": {
"title": "Shared Radio Unit of a Cell",
"description": "Use the same radio unit as referenced cell instance does",
"type": "object",
"properties": {
"ru_type": {
"const": "ruincell_ref",
"template": "ruincell_ref",
"options": { "hidden": true }
},
"ruincell_ref": {
"title": "Cell Reference",
"description": "Reference of cell instance whose radio unit to share",
"type": "string"
}
}
}
}
},
{ "$ref": "../ru/input-schema.json" }
{ "$ref": "../ru/sdr/input-schema.json" },
{ "$ref": "../ru/lopcomm/input-schema.json" },
{ "$ref": "../ru/sunwave/input-schema.json" }
]
}
}
......
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Cell",
"type": "object",
"oneOf": [
{ "$ref": "../cell/lte/input-schema.json" },
{ "$ref": "../cell/nr/input-schema.json" }
{
"$ref": "../cell/lte/input-schema.json"
},
{
"$ref": "../cell/nr/input-schema.json"
}
]
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "LTE Cell",
"type": "object",
"additionalProperties": false,
"required": ["lte"],
"properties": {
"lte": {
"title": "LTE Cell",
"additionalProperties": false,
"required": ["enb"],
"type": "object",
"properties" : {
"enb": {
"type": "object",
"required": [
"cell_type",
"rf_mode",
"pci",
"cell_id",
"bandwidth",
"ru",
"dl_earfcn",
"tac"
],
"properties": {
"$ref": "../../cell/common.json#/properties",
"cell_type": {
"$ref": "#/properties/cell_type",
"const": "lte",
"template": "lte"
},
"tdd_ul_dl_config": {
"title": "TDD Configuration",
"type": "string",
......@@ -38,7 +38,6 @@
}
}
},
"bandwidth": {
"$ref": "#/properties/bandwidth",
"enum": [
......@@ -50,7 +49,6 @@
20
]
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink E-UTRA Absolute Radio Frequency Channel Number of the cell",
......@@ -72,4 +70,8 @@
"default": 204
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "NR Cell",
"type": "object",
"required": [
"cell_type",
"nr"
],
"additionalProperties": false,
"properties": {
"nr": {
"title": "NR Cell",
"type": "object",
"required": [
"enb"
],
"additionalProperties": false,
"properties": {
"enb": {
"type": "object",
"required": [
"rf_mode",
"pci",
"cell_id",
"bandwidth",
"ru",
"dl_nr_arfcn",
"nr_band"
],
"properties": {
"$ref": "../../cell/common.json#/properties",
"cell_type": {
"$ref": "#/properties/cell_type",
"const": "nr",
"template": "nr"
},
"tdd_ul_dl_config": {
"title": "TDD Configuration",
"type": "string",
......@@ -39,11 +43,9 @@
}
}
},
"bandwidth": {
"$ref": "#/properties/bandwidth"
},
"dl_nr_arfcn": {
"title": "DL NR ARFCN",
"description": "Downlink NR Absolute Radio Frequency Channel Number of the cell",
......@@ -76,7 +78,6 @@
"default": 1
}
},
"$defs": {
"tac": {
"title": "Tracking Area Code",
......@@ -84,4 +85,8 @@
"type": "number"
}
}
}
}
}
}
}
......@@ -106,7 +106,7 @@
"type": "string"
},
"tac": {
"$ref": "cell/nr/input-schema.json#/$defs/tac"
"$ref": "cell/nr/input-schema.json#/properties/nr/properties/enb/$defs/tac"
},
"ranac": {
"title": "Optional integer (range 0 to 255)",
......
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Peer Cell. Common properties",
"type": "object",
"required": [
"cell_type",
"cell_kind",
"pci",
"tac"
],
"properties": {
"cell_type": {
"type": "string",
"options": { "hidden": true }
},
"cell_kind": {
"type": "string",
"const": "enb_peer",
"template": "enb_peer",
"options": { "hidden": true }
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "LTE Peer Cell",
"type": "object",
"additionalProperties": false,
"required": ["lte"],
"properties": {
"lte": {
"title": "LTE Peer Cell",
"type": "object",
"additionalProperties": false,
"required": ["enb_peer"],
"properties": {
"enb_peer": {
"type": "object",
"required": [
"cell_type",
"cell_kind",
"pci",
"tac",
"e_cell_id",
"dl_earfcn"
],
"properties": {
"cell_type": {
"$ref": "../../../peer/cell/common.json#/properties/cell_type",
"const": "lte",
"template": "lte"
},
"e_cell_id": {
"title": "E-UTRAN Cell ID",
"description": "28 bit E-UTRAN cell identity. Concatenation of enb_id and cell_id of the neighbour cell.",
"type": "string"
},
"dl_earfcn": { "$ref": "../../../cell/lte/input-schema.json#/properties/dl_earfcn" },
"pci": { "$ref": "../../../cell/lte/input-schema.json#/properties/pci" },
"tac": { "$ref": "../../../cell/lte/input-schema.json#/properties/tac" }
"dl_earfcn": {
"$ref": "../../../cell/lte/input-schema.json#/properties/lte/properties/enb/properties/dl_earfcn"
},
"pci": {
"$ref": "../../../cell/lte/input-schema.json#/properties/lte/properties/enb/properties/pci"
},
"tac": {
"$ref": "../../../cell/lte/input-schema.json#/properties/lte/properties/enb/properties/tac"
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "NR Peer Cell",
"type": "object",
"additionalProperties": false,
"required": ["nr"],
"properties": {
"nr": {
"title": "NR Cell",
"type": "object",
"additionalProperties": false,
"required": ["enb_peer"],
"properties": {
"enb_peer": {
"type": "object",
"required": [
"cell_type",
"cell_kind",
"pci",
"tac",
"nr_cell_id",
"gnb_id_bits",
"dl_nr_arfcn",
"nr_band"
],
"properties": {
"cell_type": {
"$ref": "../../../peer/cell/common.json#/properties/cell_type",
"const": "nr",
"template": "nr"
},
"nr_cell_id": {
"title": "NR Cell ID",
"description": "Concatenation of gnb_id and cell_id of the neighbour cell",
......@@ -33,11 +32,27 @@
"description": "Number of bits for the gNodeB global identifier. (range 22 to 32)",
"type": "integer"
},
"dl_nr_arfcn": { "$ref": "../../../cell/nr/input-schema.json#/properties/dl_nr_arfcn" },
"nr_band": { "$ref": "../../../cell/nr/input-schema.json#/properties/nr_band" },
"ssb_nr_arfcn": { "$ref": "../../../cell/nr/input-schema.json#/properties/ssb_nr_arfcn" },
"ul_nr_arfcn": { "$ref": "../../../cell/nr/input-schema.json#/properties/ul_nr_arfcn" },
"pci": { "$ref": "../../../cell/nr/input-schema.json#/properties/pci" },
"tac": { "$ref": "../../../cell/nr/input-schema.json#/$defs/tac" }
"dl_nr_arfcn": {
"$ref": "../../../cell/nr/input-schema.json#/properties/nr/properties/enb/properties/dl_nr_arfcn"
},
"nr_band": {
"$ref": "../../../cell/nr/input-schema.json#/properties/nr/properties/enb/properties/nr_band"
},
"ssb_nr_arfcn": {
"$ref": "../../../cell/nr/input-schema.json#/properties/nr/properties/enb/properties/ssb_nr_arfcn"
},
"ul_nr_arfcn": {
"$ref": "../../../cell/nr/input-schema.json#/properties/nr/properties/enb/properties/ul_nr_arfcn"
},
"pci": {
"$ref": "../../../cell/nr/input-schema.json#/properties/nr/properties/enb/properties/pci"
},
"tac": {
"$ref": "../../../cell/nr/input-schema.json#/properties/nr/properties/enb/$defs/tac"
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Peer eNB",
"type": "object",
"required": [
"peer_type",
......
......@@ -5,8 +5,6 @@
"type": "object",
"required": [
"ru_type",
"ru_link_type",
"n_antenna_dl",
"n_antenna_ul",
"tx_gain",
......@@ -14,15 +12,6 @@
],
"properties": {
"ru_type": {
"type": "string",
"options": { "hidden": true }
},
"ru_link_type": {
"type": "string",
"options": { "hidden": true }
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"type": "integer"
......
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Lopcomm ORAN",
"type": "object",
"required": [
"ru_type",
"ru_link_type",
"lopcomm"
],
"additionalProperties": false,
"properties": {
"lopcomm": {
"title": "Lopcomm ORAN",
"required": [
"cpri"
],
"additionalProperties": false,
"properties": {
"cpri": {
"title": "CPRI Link Type",
"required": [
"n_antenna_dl",
"n_antenna_ul",
"tx_gain",
"rx_gain",
"cpri_link",
"mac_addr"
],
"properties": {
"$ref": "../../ru/common.json#/properties",
"ru_type": {
"$ref": "#/properties/ru_type",
"const": "lopcomm",
"template": "lopcomm"
},
"ru_link_type": {
"$ref": "#/properties/ru_link_type",
"const": "cpri",
"template": "cpri"
},
"n_antenna_dl": {
"$ref": "#/properties/n_antenna_dl",
"default": 2
......@@ -45,8 +41,9 @@
"mapping": {
"$ref": "#/properties/cpri_link/properties/mapping",
"const": "hw",
"enum": ["hw"],
"options": { "hidden": true }
"enum": [
"hw"
]
},
"rx_delay": {
"$ref": "#/properties/cpri_link/properties/rx_delay",
......@@ -62,11 +59,16 @@
}
}
},
"reset_schedule": {
"title": "Cron schedule for RRH reset",
"description": "Refer https://crontab.guru/ to make a reset schedule for RRH, for example, '0 1 * * *' means the RRH will reset every day at 1 am",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SDR transiever",
"description": "Radio Unit constituted of several SDR boards",
"type": "object",
"required": [
"ru_type",
"ru_link_type",
"sdr"
],
"additionalProperties": false,
"properties": {
"sdr": {
"title": "SDR transiver",
"required": [
"sdr"
],
"additionalProperties": false,
"properties": {
"sdr": {
"title": "SDR Link Type",
"required": [
"n_antenna_dl",
"n_antenna_ul",
"tx_gain",
"rx_gain",
"sdr_dev_list"
],
"properties": {
"$ref": "../../ru/common.json#/properties",
"ru_type": {
"$ref": "#/properties/ru_type",
"const": "sdr",
"template": "sdr"
},
"ru_link_type": {
"$ref": "#/properties/ru_link_type",
"const": "sdr",
"template": "sdr"
},
"sdr_dev_list": {
"title": "SDR boards",
"description": "Which SDR boards to use as combined RF port",
......@@ -41,5 +37,11 @@
"minItems": 1,
"uniqueItems": true
}
},
"type": "object"
}
},
"type": "object"
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Sunwave M2RU",
"type": "object",
"required": [
"ru_type",
"ru_link_type",
"sunwave"
],
"additionalProperties": false,
"properties": {
"sunwave": {
"title": "Sunwave M2RU",
"type": "object",
"required": [
"cpri"
],
"additionalProperties": false,
"properties": {
"cpri": {
"title": "CPRI Link Type",
"type": "object",
"required": [
"n_antenna_dl",
"n_antenna_ul",
"tx_gain",
"rx_gain",
"cpri_link",
"mac_addr"
],
"properties": {
"$ref": "../../ru/common.json#/properties",
"ru_type": {
"$ref": "#/properties/ru_type",
"const": "sunwave",
"template": "sunwave"
},
"ru_link_type": {
"$ref": "#/properties/ru_link_type",
"const": "cpri",
"template": "cpri"
},
"n_antenna_dl": {
"$ref": "#/properties/n_antenna_dl",
"default": 2
......@@ -45,8 +43,9 @@
"mapping": {
"$ref": "#/properties/cpri_link/properties/mapping",
"const": "bf1",
"enum": ["bf1"],
"options": { "hidden": true }
"enum": [
"bf1"
]
},
"rx_delay": {
"$ref": "#/properties/cpri_link/properties/rx_delay",
......@@ -59,4 +58,8 @@
}
}
}
}
}
}
}
}
......@@ -11,7 +11,7 @@
"response": "instance-enb-schema.json",
"index": 1
},
"enb/*": {
"enb-shared": {
"title": "→ eNB/gNB | Radio Unit / Cell / Peer / Peer Cell",
"description": "Configuration of a shared instance attached to eNB/gNB",
"software-type": "enb",
......@@ -45,7 +45,7 @@
"response": "instance-ue-schema.json",
"index": 5
},
"ue/*": {
"ue-shared": {
"title": "→ UEsim | Radio Unit / UE / UE Cell",
"description": "Configuration of a shared instance attached to UEsim",
"software-type": "ue",
......
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "UE Cell. Common properties",
"type": "object",
"required": [
"cell_type",
"cell_kind",
"rf_mode",
"ru"
],
"properties": {
"cell_type": {
"type": "string",
"options": { "hidden": true }
"rf_mode": {
"$ref": "../../cell/common.json#/properties/rf_mode"
},
"cell_kind": {
"type": "string",
"const": "ue",
"template": "ue",
"options": { "hidden": true }
},
"rf_mode": { "$ref": "../../cell/common.json#/properties/rf_mode" },
"ru": { "$ref": "../../cell/common.json#/$defs/ru-of-cell" }
"ru": {
"$ref": "../../cell/common.json#/$defs/ru-of-cell"
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "LTE Cell",
"type": "object",
"required": [
"cell_type",
"cell_kind",
"lte"
],
"additionalProperties": false,
"properties": {
"lte": {
"title": "LTE Cell",
"type": "object",
"required": [
"ue"
],
"additionalProperties": false,
"properties": {
"ue": {
"type": "object",
"required": [
"rf_mode",
"ru",
"dl_earfcn",
"bandwidth"
],
"properties": {
"cell_type": {
"$ref": "../../../ue/cell/common.json#/properties/cell_type",
"const": "lte",
"template": "lte"
"rf_mode": {
"$ref": "../../../ue/cell/common.json#/properties/rf_mode"
},
"ru": {
"$ref": "../../../ue/cell/common.json#/properties/ru",
"propertyOrder": 9999
},
"cell_kind": { "$ref": "../../../ue/cell/common.json#/properties/cell_kind" },
"rf_mode": { "$ref": "../../../ue/cell/common.json#/properties/rf_mode" },
"ru": { "$ref": "../../../ue/cell/common.json#/properties/ru",
"propertyOrder": 9999"
"dl_earfcn": {
"$ref": "../../../cell/lte/input-schema.json#/properties/lte/properties/enb/properties/dl_earfcn"
},
"ul_earfcn": {
"$ref": "../../../cell/lte/input-schema.json#/properties/lte/properties/enb/properties/ul_earfcn"
},
"dl_earfcn": { "$ref": "../../../cell/lte/input-schema.json#/properties/dl_earfcn" },
"ul_earfcn": { "$ref": "../../../cell/lte/input-schema.json#/properties/ul_earfcn" },
"bandwidth": {
"$ref": "../../../cell/common.json#/properties/bandwidth",
"enum": [
......@@ -41,4 +49,8 @@
]
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "NR Cell",
"type": "object",
"required": [
"cell_type",
"cell_kind",
"nr"
],
"additionalProperties": false,
"properties": {
"nr": {
"title": "NR Cell",
"type": "object",
"required": [
"ue"
],
"additionalProperties": false,
"properties": {
"ue": {
"type": "object",
"required": [
"rf_mode",
"ru",
"dl_nr_arfcn",
"bandwidth",
"nr_band"
],
"properties": {
"cell_type": {
"$ref": "../../../ue/cell/common.json#/properties/cell_type",
"const": "nr",
"template": "nr"
"rf_mode": {
"$ref": "../../../ue/cell/common.json#/properties/rf_mode"
},
"cell_kind": { "$ref": "../../../ue/cell/common.json#/properties/cell_kind" },
"rf_mode": { "$ref": "../../../ue/cell/common.json#/properties/rf_mode" },
"ru": { "$ref": "../../../ue/cell/common.json#/properties/ru",
"propertyOrder": 9999"
"ru": {
"$ref": "../../../ue/cell/common.json#/properties/ru",
"propertyOrder": 9999
},
"dl_nr_arfcn": { "$ref": "../../../cell/nr/input-schema.json#/properties/dl_nr_arfcn" },
"bandwidth": { "$ref": "../../../cell/common.json#/properties/bandwidth" },
"nr_band": { "$ref": "../../../cell/nr/input-schema.json#/properties/nr_band" },
"ul_nr_arfcn": { "$ref": "../../../cell/nr/input-schema.json#/properties/ul_nr_arfcn" },
"ssb_nr_arfcn": { "$ref": "../../../cell/nr/input-schema.json#/properties/ssb_nr_arfcn" }
"dl_nr_arfcn": {
"$ref": "../../../cell/nr/input-schema.json#/properties/nr/properties/enb/properties/dl_nr_arfcn"
},
"bandwidth": {
"$ref": "../../../cell/common.json#/properties/bandwidth"
},
"nr_band": {
"$ref": "../../../cell/nr/input-schema.json#/properties/nr/properties/enb/properties/nr_band"
},
"ul_nr_arfcn": {
"$ref": "../../../cell/nr/input-schema.json#/properties/nr/properties/enb/properties/ul_nr_arfcn"
},
"ssb_nr_arfcn": {
"$ref": "../../../cell/nr/input-schema.json#/properties/nr/properties/enb/properties/ssb_nr_arfcn"
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "UE. Common properties",
"type": "object",
"required": [
"ue_type",
"rue_addr"
],
"properties": {
"$ref": "../sim/input-schema.json#/properties",
"ue_type": {
"type": "string",
"options": { "hidden": true }
},
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"imsi": {
"$ref": "../sim/input-schema.json#/properties/imsi",
"default": "001010123456789"
......
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "LTE UE",
"type": "object",
"required": [
"lte"
],
"additionalProperties": false,
"properties": {
"$ref": "../../ue/common.json#/properties",
"ue_type": {
"$ref": "#/properties/ue_type",
"const": "lte",
"template": "lte"
"lte": {
"title": "LTE UE",
"type": "object",
"additionalProperties": false,
"properties": {
"$ref": "../../ue/common.json#/properties"
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "NR UE",
"type": "object",
"required": [
"nr"
],
"additionalProperties": false,
"properties": {
"$ref": "../../ue/common.json#/properties",
"ue_type": {
"$ref": "#/properties/ue_type",
"const": "nr",
"template": "nr"
"nr": {
"title": "NR UE",
"type": "object",
"properties": {
"$ref": "../../ue/common.json#/properties"
}
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment