mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
yang: Remove old STP port state from operational
This commit is contained in:
@@ -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" {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user