|
42 | 42 | MCLAG_INVALID_SESSION_TMOUT_LBOUND = "2"
|
43 | 43 | MCLAG_INVALID_SESSION_TMOUT_UBOUND = "4000"
|
44 | 44 |
|
| 45 | +MCLAG_VALID_PEER_LINK_PORT = "Ethernet0" |
| 46 | +MCLAG_VALID_PEER_LINK_PORTCHANNEL = "PortChannel1000" |
| 47 | + |
45 | 48 | MCLAG_INVALID_MCLAG_MEMBER = "Ethernet4"
|
46 | 49 | MCLAG_INVALID_PORTCHANNEL1 = "portchannel"
|
47 | 50 | MCLAG_INVALID_PORTCHANNEL2 = "PortChannelabcd"
|
@@ -142,6 +145,23 @@ def test_add_mclag_with_invalid_peer_mcast_ip(self):
|
142 | 145 | result = runner.invoke(config.config.commands["mclag"].commands["add"], [MCLAG_DOMAIN_ID, MCLAG_SRC_IP, MCLAG_INVALID_PEER_IP2, MCLAG_PEER_LINK], obj=obj)
|
143 | 146 | assert result.exit_code != 0, "mclag invalid peer ip mcast test caase with code {}:{} Output:{}".format(type(result.exit_code), result.exit_code, result.output)
|
144 | 147 |
|
| 148 | + def test_add_mclag_with_valid_peer_link(self): |
| 149 | + runner = CliRunner() |
| 150 | + db = Db() |
| 151 | + obj = {'db':db.cfgdb} |
| 152 | + |
| 153 | + # add mclag with valid port peer link |
| 154 | + result = runner.invoke(config.config.commands["mclag"].commands["add"], [MCLAG_DOMAIN_ID, MCLAG_SRC_IP, MCLAG_PEER_IP, MCLAG_VALID_PEER_LINK_PORT], obj=obj) |
| 155 | + assert result.exit_code == 0, "mclag valid peer link test case with code {}:{} Output:{}".format(type(result.exit_code), result.exit_code, result.output) |
| 156 | + |
| 157 | + runner = CliRunner() |
| 158 | + db = Db() |
| 159 | + obj = {'db':db.cfgdb} |
| 160 | + |
| 161 | + # add mclag with valid portchannel peer link |
| 162 | + result = runner.invoke(config.config.commands["mclag"].commands["add"], [MCLAG_DOMAIN_ID, MCLAG_SRC_IP, MCLAG_PEER_IP, MCLAG_VALID_PEER_LINK_PORTCHANNEL], obj=obj) |
| 163 | + assert result.exit_code == 0, "mclag valid peer link test case with code {}:{} Output:{}".format(type(result.exit_code), result.exit_code, result.output) |
| 164 | + |
145 | 165 | def test_add_mclag_with_invalid_peer_link(self):
|
146 | 166 | runner = CliRunner()
|
147 | 167 | db = Db()
|
|
0 commit comments