openBackhaul / MicroWaveDeviceGatekeeper

Gateway for PUTting to the devices
Apache License 2.0
1 stars 1 forks source link

LearnedMacAdresses RPC / Schema mismatch between the defined callback and the data retrieved from live #21

Closed PrathibaJee closed 11 months ago

PrathibaJee commented 11 months ago

When we perform the RPC to get the list of learned-mac-addresses from the controller, http://1.1.1.1:8181/rests/operations/network-topology:network-topology/topology=topology-netconf/node=1234567/yang-ext:mount/mac-fd-1-0:provide-learned-mac-addresses

a sample response from the controller is as below ,

{
    "mac-fd-1-0:output": {
        "mac-table-entry-list": [
            {
                "vlan-id": "500",
                "mac-address": "00:cc:cc:00:cc:cd",
                "egress-ltp": "LTP-MACINTERFACE-TTP-4-1",
                "affected-mac-fd": "FD-MAC-1234-1"
            },
            {
                "vlan-id": "500",
                "mac-address": "00:cc:cc:00:cc:cc",
                "egress-ltp": "LTP-MACINTERFACE-TTP-4-1",
                "affected-mac-fd": "FD-MAC-1234-1"
            }
        ]
    }
}

Here , in the response-body , the mac-table-entry-list is inside the object mac-fd-1-0:output. But , in the callback PostToLiveRpcForProvidingLearnedMacAdressesCausesInitiatingRpcExecutionOnDevice, the schema definition of the response-body is as below , ( schema starts with "mac-fd-1-0:mac-table-entry-list" )

schema:
  type: object
  properties:
-   mac-fd-1-0:mac-table-entry-list:
        type: array
        items:
          type: object
          properties:
            affected-mac-fd:

Kindly let us know whether the schema should be like below ,

schema:
 type: object
 properties:
+  mac-fd-1-0:output:
         type: object
         properties:
+           mac-table-entry-list:
                type: array
openBackhaul commented 11 months ago

Changed as proposed. (Haven't had the chance to see such response as the GangsterCouple decided to switch the laboratory off during weekends.)