Commit aecb7f3f authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: Workaround SlapOS Master inability to handle shared...

software/ors-amarisoft: Workaround SlapOS Master inability to handle shared instances of multiple types

While upcoming SlapOS Master should be able to handle multiple types of
shared instances attached to the same main instance, current SlapOS
Master UI does not handle it well, and explicitly rejected to do so with
nexedi/slapos@dae3ad01 , which turned
json-schemas check failing for ors-amarisoft as

    FAIL: test_ors-amarisoft_software_cfg_json (slapos.test.test_json_schema.TestJSONSchemaValidation)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File ".../slapos/slapos/test/test_json_schema.py", line 81, in run
        assert _software_type_tuple not in _viewed_software_type, \
    AssertionError: Duplicated software release on enb, shared: True

-> Work it around by adjusting software.cfg.json to use only one type of
shared instance for each main instance, and inside schema of that type
dispatch to all needed subtypes with oneOf.

This patch should be reverted when/if SlapOS Master starts to handle
shared instances of multiple types well.

/cc @tomo, @jhuge, @lu.xu, @xavier_thompson, @Daetalus, @romain, @rafael, @jerome
parent eb22e363
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Configuration of a shared instance attached to eNB/gNB",
"type": "object",
"oneOf": [
{
"$ref": "ru/input-schema.json"
},
{
"$ref": "cell/input-schema.json"
},
{
"$ref": "peer/input-schema.json"
},
{
"$ref": "peer/cell/input-schema.json"
}
]
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Values returned by instantiation of a shared instance attached to eNB/gNB",
"type": "object",
"oneOf": [
{
"$ref": "ru/schema.json"
},
{
"$ref": "cell/schema.json"
},
{
"$ref": "peer/schema.json"
},
{
"$ref": "peer/cell/schema.json"
}
]
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Configuration of a shared instance attached to UEsim",
"type": "object",
"oneOf": [
{
"$ref": "ru/input-schema.json"
},
{
"$ref": "ue/input-schema.json"
},
{
"$ref": "ue/cell/input-schema.json"
}
]
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Values returned by instantiation of a shared instance attached to UEsim",
"type": "object",
"oneOf": [
{
"$ref": "ru/schema.json"
},
{
"$ref": "ue/schema.json"
},
{
"$ref": "ue/cell/schema.json"
}
]
}
......@@ -11,49 +11,22 @@
"response": "instance-enb-schema.json",
"index": 1
},
"ru": {
"title": "→ eNB/gNB | Radio Unit",
"description": "Configuration of Radio Unit attached to eNB/gNB",
"enb/*": {
"title": "→ eNB/gNB | Radio Unit / Cell / Peer / Peer Cell",
"description": "Configuration of a shared instance attached to eNB/gNB",
"software-type": "enb",
"shared": true,
"request": "ru/input-schema.json",
"response": "ru/schema.json",
"request": "instance-enb-item-input-schema.json",
"response": "instance-enb-item-schema.json",
"index": 2
},
"cell": {
"title": "→ eNB/gNB | Cell",
"description": "Configuration of Cell served by eNB/gNB",
"software-type": "enb",
"shared": true,
"request": "cell/input-schema.json",
"response": "cell/schema.json",
"index": 3
},
"peer": {
"title": "→ eNB/gNB | Peer",
"description": "Handover information about nearby eNB/gNB",
"software-type": "enb",
"shared": true,
"request": "peer/input-schema.json",
"response": "peer/schema.json",
"index": 4
},
"peer/cell": {
"title": "→ eNB/gNB | Peer Cell",
"description": "Handover information about Peer Cell served by nearby eNB/gNB",
"software-type": "enb",
"shared": true,
"request": "peer/cell/input-schema.json",
"response": "peer/cell/schema.json",
"index": 5
},
"core-network": {
"title": "Core Network",
"software-type": "core-network",
"description": "Core Network Configuration",
"request": "instance-core-network-input-schema.json",
"response": "instance-core-network-schema.json",
"index": 6
"index": 3
},
"core-network-slave": {
"title": "→ Core Network | Sim Card",
......@@ -62,7 +35,7 @@
"request": "sim/input-schema.json",
"response": "sim/schema.json",
"shared": true,
"index": 7
"index": 4
},
"ue": {
"title": "UEsim",
......@@ -70,34 +43,16 @@
"software-type": "ue",
"request": "instance-ue-input-schema.json",
"response": "instance-ue-schema.json",
"index": 8
},
"ue/ru": {
"title": "→ UEsim | Radio Unit",
"description": "Configuration of Radio Unit attached to UEsim",
"software-type": "ue",
"shared": true,
"request": "ru/input-schema.json",
"response": "ru/schema.json",
"index": 9
},
"ue/ue": {
"title": "→ UEsim | UE",
"description": "Configuration of UE simulated by UEsim",
"software-type": "ue",
"shared": true,
"request": "ue/input-schema.json",
"response": "ue/schema.json",
"index": 10
"index": 5
},
"ue/cell": {
"title": "→ UEsim | UE Cell",
"description": "Information about Cell to which UEsim attaches",
"ue/*": {
"title": "→ UEsim | Radio Unit / UE / UE Cell",
"description": "Configuration of a shared instance attached to UEsim",
"software-type": "ue",
"shared": true,
"request": "ue/cell/input-schema.json",
"response": "ue/cell/schema.json",
"index": 11
"request": "instance-ue-item-input-schema.json",
"response": "instance-ue-item-schema.json",
"index": 6
}
}
}
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