From 828fba609f7cc7b5c5da37229d469e837d699f82 Mon Sep 17 00:00:00 2001 From: Rudranil Date: Mon, 4 Nov 2024 09:38:34 +0000 Subject: [PATCH] Fix go code generate: remove container links --- artifacts/open-traffic-generator-ospfv2.txt | 15 ++++++----- .../ospfv2/open-traffic-generator-ospfv2.yang | 25 ++++++++----------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/artifacts/open-traffic-generator-ospfv2.txt b/artifacts/open-traffic-generator-ospfv2.txt index 69b4203..a37ff60 100644 --- a/artifacts/open-traffic-generator-ospfv2.txt +++ b/artifacts/open-traffic-generator-ospfv2.txt @@ -40,14 +40,13 @@ module: open-traffic-generator-ospfv2 | +--ro sequence-number? uint32 | +--ro age? uint16 | +--ro option-bits? uint32 - | +--ro links - | +--ro link* [link-id] - | +--ro link-id -> ../state/link-id - | +--ro state - | +--ro type? enumeration - | +--ro link-id? otg-types:ipv4-address - | +--ro link-data? otg-types:ipv4-address - | +--ro metric? uint16 + | +--ro link* [link-id] + | +--ro link-id -> ../state/link-id + | +--ro state + | +--ro type? enumeration + | +--ro link-id? otg-types:ipv4-address + | +--ro link-data? otg-types:ipv4-address + | +--ro metric? uint16 +--ro network-lsa* [link-state-id] | +--ro link-state-id -> ../state/link-state-id | +--ro state diff --git a/models/ospfv2/open-traffic-generator-ospfv2.yang b/models/ospfv2/open-traffic-generator-ospfv2.yang index 623fc06..031c5d6 100644 --- a/models/ospfv2/open-traffic-generator-ospfv2.yang +++ b/models/ospfv2/open-traffic-generator-ospfv2.yang @@ -120,25 +120,20 @@ module open-traffic-generator-ospfv2 { uses ospfv2-lsdb-lsa-state; - container links { + list link { + key "link-id"; description - "This container describes OSPFv2 links."; + "OSPFv2 link attributes."; - list link { - key "link-id"; - description - "OSPFv2 link attributes."; - - leaf link-id { - type leafref { - path "../state/link-id"; - } - description - "Reference to the link identifier."; + leaf link-id { + type leafref { + path "../state/link-id"; } - - uses ospfv2-lsdb-link-state; + description + "Reference to the link identifier."; } + + uses ospfv2-lsdb-link-state; } } }