yang: Remove old STP port state from operational

This commit is contained in:
Tobias Waldekranz
2025-01-24 14:52:25 +01:00
parent c1e6f0c53b
commit 9ef6d2d038
4 changed files with 7 additions and 11 deletions
+3 -6
View File
@@ -32,6 +32,9 @@ submodule infix-if-bridge {
revision 2025-01-08 {
description "Add Spanning Tree Protocol (STP) support.
Move STP port state from the old `stp-state` to the
new `stp/cist/state`.
Drop the `default-priority` bridge port option, which
has never been supported but was accidentally
included in the model.";
@@ -883,12 +886,6 @@ submodule infix-if-bridge {
}
}
}
leaf stp-state {
type stp-state;
config false;
description "The operation state of the bridge port.";
}
}
augment "/if:interfaces/if:interface/infix-if:port" {
+2 -1
View File
@@ -282,7 +282,8 @@ class Iface:
self.br_vlans = get_json_data({}, self.data, 'infix-interfaces:bridge', 'vlans', "vlan")
self.bridge = get_json_data('', self.data, 'infix-interfaces:bridge-port', 'bridge')
self.pvid = get_json_data('', self.data, 'infix-interfaces:bridge-port', 'pvid')
self.stp_state = get_json_data('', self.data, 'infix-interfaces:bridge-port', 'stp-state')
self.stp_state = get_json_data('', self.data, 'infix-interfaces:bridge-port',
'stp', 'cist', 'state')
self.containers = get_json_data('', self.data, 'infix-interfaces:container-network', 'containers')
@@ -141,9 +141,6 @@ def lower(iplink):
},
"stp": lower_stp(iplink),
# TODO: REMOVE
"stp-state": info["state"],
}
@@ -57,7 +57,8 @@ def addbr(dut):
def num_blocking(dut):
num = 0
for iface in dut.get_data("/ietf-interfaces:interfaces")["interfaces"]["interface"]:
if iface.get("bridge-port", {}).get("stp-state") == "blocking":
state = iface.get("bridge-port", {}).get("stp", {}).get("cist", {}).get("state")
if state == "blocking":
num += 1
return num