diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index 4392c8874e3..c67aef18e01 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1766,7 +1766,7 @@ instead of data network. ``` ### MUX_CABLE -The **MUX_CABLE** table is used for dualtor interface configuration. The `cable_type`, `soc_ipv4` and `neighbor_mode` objects are optional. +The **MUX_CABLE** table is used for dualtor interface configuration. The `cable_type`, `soc_ipv4`, `neighbor_mode` and `failover_mode` objects are optional. ``` { @@ -1774,6 +1774,7 @@ The **MUX_CABLE** table is used for dualtor interface configuration. The `cable_ "Ethernet4": { "cable_type": "active-active", "neighbor_mode": "prefix-route", + "failover_mode": "hardware", "server_ipv4": "192.168.0.2/32", "server_ipv6": "fc02:1000::30/128", "soc_ipv4": "192.168.0.3/32", diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index aaa6caff469..d04305958bb 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -2600,6 +2600,7 @@ "cable_type": "active-active", "prober_type": "software", "neighbor_mode": "prefix-route", + "failover_mode": "hardware", "server_ipv4": "192.168.0.2/32", "server_ipv6": "fc02:1000::30/128", "soc_ipv4": "192.168.0.3/32", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux_cable.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux_cable.json index c61cef2ecba..06d17f7c08a 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux_cable.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux_cable.json @@ -56,6 +56,7 @@ "cable_type": "active-active", "prober_type": "software", "neighbor_mode": "prefix-route", + "failover_mode": "hardware", "server_ipv4": "192.168.0.2/32", "server_ipv6": "fc02:1000::30/128", "soc_ipv4": "192.168.0.3/32", diff --git a/src/sonic-yang-models/yang-models/sonic-mux-cable.yang b/src/sonic-yang-models/yang-models/sonic-mux-cable.yang index 4d1c06f36da..fc9b59af3d7 100644 --- a/src/sonic-yang-models/yang-models/sonic-mux-cable.yang +++ b/src/sonic-yang-models/yang-models/sonic-mux-cable.yang @@ -68,6 +68,15 @@ module sonic-mux-cable { description "DualToR MUX neighbor mode."; } + leaf failover_mode { + type enumeration { + enum hardware; + enum software; + } + default software; + description "DualToR MUX failover mode."; + } + leaf server_ipv4 { type inet:ipv4-prefix;