fdd9130ecf
Why I did it
Address issue #10970
sign-off: Jing Zhang zhangjing@microsoft.com
How I did it
Add sonic-mux-cable.yang and unit tests.
How to verify it
Compile Compile target/python-wheels/sonic_yang_mgmt-1.0-py3-none-any.whl and target/python-wheels/sonic_yang_models-1.0-py3-none-any.whl.
Pass sonic-config-engine unit test.
Which release branch to backport (provide reason below if selected)
201811
201911
202006
202012
202106
202111
202205
Description for the changelog
Link to config_db schema for YANG module changes
f8fe41a023/src/sonic-yang-models/doc/Configuration.md (mux_cable)
93 lines
2.3 KiB
YANG
93 lines
2.3 KiB
YANG
module sonic-mux-cable {
|
|
namespace "http://github.com/Azure/sonic-mux-cable";
|
|
prefix mux_cable;
|
|
yang-version 1.1;
|
|
|
|
import ietf-inet-types {
|
|
prefix inet;
|
|
}
|
|
|
|
import sonic-port {
|
|
prefix prt;
|
|
}
|
|
|
|
organization
|
|
"SONiC";
|
|
|
|
contact
|
|
"SONiC";
|
|
|
|
description
|
|
"SONiC DualToR MUX CABLE confifuration data";
|
|
|
|
revision 2022-08-19 {
|
|
description
|
|
"Initial revision";
|
|
}
|
|
|
|
container sonic-mux-cable {
|
|
|
|
container MUX_CABLE {
|
|
|
|
list MUX_CABLE_LIST {
|
|
|
|
key "ifname";
|
|
|
|
leaf ifname {
|
|
type leafref {
|
|
path "/prt:sonic-port/prt:PORT/prt:PORT_LIST/prt:name";
|
|
}
|
|
description
|
|
"Reference of port on which MUX cable to be configured.";
|
|
}
|
|
|
|
leaf cable_type {
|
|
type enumeration {
|
|
enum active-active;
|
|
enum active-standby;
|
|
}
|
|
default active-standby;
|
|
description "SONiC DualToR interface cable type.";
|
|
}
|
|
|
|
leaf server_ipv4 {
|
|
type inet:ipv4-prefix;
|
|
|
|
description "Server IPv4 Address.";
|
|
}
|
|
|
|
leaf server_ipv6 {
|
|
type inet:ipv6-prefix;
|
|
|
|
description "Server IPv6 Address.";
|
|
}
|
|
|
|
leaf soc_ipv4 {
|
|
type inet:ipv4-prefix;
|
|
|
|
description "SoC IPv4 address. Optional and for active-active ports only. ";
|
|
}
|
|
|
|
leaf soc_ipv6 {
|
|
type inet:ipv6-prefix;
|
|
|
|
description "SoC IPv6 address. Optional and for active-active ports only. ";
|
|
}
|
|
|
|
leaf state {
|
|
type enumeration {
|
|
enum auto;
|
|
enum manual;
|
|
enum detach;
|
|
enum active;
|
|
enum standby;
|
|
}
|
|
|
|
default auto;
|
|
description "MUX mode determining if auto failover is enabled. ";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|