openBackhaul / MicroWaveDeviceInventory

Physical and logical inventory of the MW SDN Domain
Apache License 2.0
5 stars 1 forks source link

[Code] Update oas according to newer version of Controller OAS #234

Closed kmohr-soprasteria closed 1 year ago

kmohr-soprasteria commented 1 year ago
kmohr-soprasteria commented 1 year ago

Input Controller_OAS_2022.zip Controller_OAS_2023.zip

Zwischenergebnisse (nicht konsolidiert): Zwischenergebnis.zip

Es gibt einige Abweichungen, im Parser ist noch ein Fehler bei den Parametern. In den Pfaden (und unter den Parametern) sind z.B. value-name, value-name1, value-name2, value-name3, die unter den components aber alle die exakt gleiche Beschreibung haben. Anderes Bsp:

/node={mount-name}/yang-ext:mount/core-model-1-4:control-construct/equipment={uuid}/contained-holder={local-id1}/name={value-name}
/node={mount-name}/yang-ext:mount/core-model-1-4:control-construct/equipment={uuid}/expected-equipment={local-id2}

Die components-Definition von local-id1 und local-id2 ist exakt identisch. Es wird also nur eine Definition gebraucht; es kann sein, dass die zweite Definition tatsächlich von der ersten abweicht (in der Original-OAS), aber im Parser falsch übernommen wird oder dass die zu Unrecht überhaupt 2x angelegt wurde. (Der Parser erzeugt für die OAS von 2022 dieses Problem nicht...); bevor man tatsächlich vergleichen kann, muss das korrigiert werden.

In der OAS-2023 gibt es auch schon local-id1 im Pfad, in der alten OAS-2022 gibt es nur local-id

neu:
"/rests/data/network-topology:network-topology/topology=topology-netconf/node=222253545/yang-ext:mount/core-model-1-4:control-construct/equipment={uuid}/contained-holder={local-id1}/actual-holder": {
alt:
"/rests/data/network-topology:network-topology/topology=topology-netconf/node=222253545/yang-ext:mount/core-model-1-4:control-construct/equipment={uuid}/contained-holder={local-id}/actual-holder": {

In der neuen OAS gibt es im Pfad nur noch die local-id1, aber unter den Parametern ist auch noch die local-id aufgeführt (daher der Fehler im Parser)

        "/rests/data/network-topology:network-topology/topology=topology-netconf/node=222253545/yang-ext:mount/core-model-1-4:control-construct/equipment={uuid}/contained-holder={local-id1}/actual-holder": {
            "patch": {...
                },
                "parameters": [
                    {
                        "name": "uuid",
                        "description": "UUID: An identifier that is universally unique\n\n(This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself globally unique, and immutable. An identifier carries no semantics with respect to the purpose or state of the entity)\nThe uuid should be treated as opaque by the user.",
                        "schema": {
                            "type": "string"
                        },
                        "in": "path",
                        "required": true
                    },
                    {
                        "name": "local-id",
                        "description": "An identifier that is unique in the context of some scope that is less than the global scope.\n\n(This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself unique, and immutable. The identifier therefore represents the identity of the entity/role. An identifier carries no semantics with respect to the purpose of the entity.)",
                        "schema": {
                            "type": "string"
                        },
                        "in": "path",
                        "required": true
                    },
                    {
                        "name": "local-id1",
                        "description": "An identifier that is unique in the context of some scope that is less than the global scope.\n\n(This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself unique, and immutable. The identifier therefore represents the identity of the entity/role. An identifier carries no semantics with respect to the purpose of the entity.)",
                        "schema": {
                            "type": "string"
                        },
                        "in": "path",
                        "required": true                  

Das sollte konsolidiert werden, bevor das in die MWDI-OAS übernommen wird.

kmohr-soprasteria commented 1 year ago

OAS-2022 Bei der geparsten alten OAS, gibt es auch local-id, local-id1 und local-id2 mit der gleichen Parameter-Definition, aber es kommt vor, dass es in bestimmten Pfaden mehrere local-ids gibt und die muss man unterscheiden können: s.

- operation-name: /node={mount-name}/yang-ext:mount/core-model-1-4:control-construct/logical-termination-point={uuid}/embedded-clock={local-id}/encapsulated-fc={uuid1}/fc-port={local-id1}
  uuid: mwdi-1-0-0-op-s-is-212

- operation-name: /node={mount-name}/yang-ext:mount/core-model-1-4:control-construct/logical-termination-point={uuid}/embedded-clock={local-id}/encapsulated-fc={uuid1}/fc-switch={local-id1}/selected-fc-port={local-id2}
  uuid: mwdi-1-0-0-op-s-is-217
    /node={mount-name}/yang-ext:mount/core-model-1-4:control-construct/logical-termination-point={uuid}/embedded-clock={local-id}/encapsulated-fc={uuid1}/fc-port={local-id1}:
        parameters:
            - $ref: '#/components/parameters/mount-name'
            - $ref: '#/components/parameters/uuid'
            - $ref: '#/components/parameters/local-id'
            - $ref: '#/components/parameters/uuid1'
            - $ref: '#/components/parameters/local-id1'

OAS-2023 Im Beispiel aus der neuen OAS ist das aber nicht der Fall, da kommt nur genau eine local-id im Pfad vor; in Pfaden, wo mehrere local-ids vorkommen, werden die Nummern wieder gebraucht.

Der Pfad von oben taucht in der neuen OAS gar nicht mehr auf (auch nicht mit anderen Pfadvariablen):

operation-name: /node={mount-name}/yang-ext:mount/core-model-1-4:control-construct/logical-termination-point={uuid}/embedded-clock={local-id}/encapsulated-fc={uuid1}/fc-port={local-id1} uuid: mwdi-1-0-0-op-s-is-212

Im folgenden Beispiel kommt der gleiche Parameter mehrfach vor:

"/rests/data/network-topology:network-topology/topology=topology-netconf/node=222253545/yang-ext:mount/core-model-1-4:control-construct/forwarding-domain={uuid2}/fc={uuid3}/fc-switch={local-id1}/selected-fc-port={local-id2}"

        "/rests/data/network-topology:network-topology/topology=topology-netconf/node=222253545/yang-ext:mount/core-model-1-4:control-construct/forwarding-domain={uuid2}/fc={uuid3}/fc-switch={local-id1}/selected-fc-port={local-id2}": {
                "parameters": [
                    {
                        "name": "uuid",
                        "description": "UUID: An identifier that is universally unique\n\n(This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself globally unique, and immutable. An identifier carries no semantics with respect to the purpose or state of the entity)\nThe uuid should be treated as opaque by the user.",
                        "schema": {
                            "type": "string"
                        },
                        "in": "path",
                        "required": true
                    },
                    {
                        "name": "uuid1",
                        "description": "UUID: An identifier that is universally unique\n\n(This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself globally unique, and immutable. An identifier carries no semantics with respect to the purpose or state of the entity)\nThe uuid should be treated as opaque by the user.",
                        "schema": {
                            "type": "string"
                        },
                        "in": "path",
                        "required": true
                    },
                    {
                        "name": "uuid2",
                        "description": "UUID: An identifier that is universally unique\n\n(This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself globally unique, and immutable. An identifier carries no semantics with respect to the purpose or state of the entity)\nThe uuid should be treated as opaque by the user.",
                        "schema": {
                            "type": "string"
                        },
                        "in": "path",
                        "required": true
                    },
                    {
                        "name": "uuid3",
                        "description": "UUID: An identifier that is universally unique\n\n(This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself globally unique, and immutable. An identifier carries no semantics with respect to the purpose or state of the entity)\nThe uuid should be treated as opaque by the user.",
                        "schema": {
                            "type": "string"
                        },
                        "in": "path",
                        "required": true
                    },
                    {
                        "name": "local-id",
                        "description": "An identifier that is unique in the context of some scope that is less than the global scope.\n\n(This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself unique, and immutable. The identifier therefore represents the identity of the entity/role. An identifier carries no semantics with respect to the purpose of the entity.)",
                        "schema": {
                            "type": "string"
                        },
                        "in": "path",
                        "required": true
                    },
                    {
                        "name": "local-id1",
                        "description": "An identifier that is unique in the context of some scope that is less than the global scope.\n\n(This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself unique, and immutable. The identifier therefore represents the identity of the entity/role. An identifier carries no semantics with respect to the purpose of the entity.)",
                        "schema": {
                            "type": "string"
                        },
                        "in": "path",
                        "required": true
                    },
                    {
                        "name": "local-id2",
                        "description": "An identifier that is unique in the context of some scope that is less than the global scope.\n\n(This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself unique, and immutable. The identifier therefore represents the identity of the entity/role. An identifier carries no semantics with respect to the purpose of the entity.)",
                        "schema": {
                            "type": "string"
                        },
                        "in": "path",
                        "required": true
                    }
                ],
kmohr-soprasteria commented 1 year ago

Die extrahierten OASen vom Controller unterscheiden sich und sind nicht für alle Devices gleich! Vgl. Stand 07/2023 für NEs 530253433 znd 305277070

Unterschiede sind z.B.:

Rückmeldung von Martin: die so extrahierten OASen sind immer mount-point-spezifisch