|
112 | 112 |
|
113 | 113 | """
|
114 | 114 |
|
| 115 | +show_vxlan_remotemac_all_output="""\ |
| 116 | ++---------+-------------------+--------------+-------+---------+ |
| 117 | +| VLAN | MAC | RemoteVTEP | VNI | Type | |
| 118 | ++=========+===================+==============+=======+=========+ |
| 119 | +| Vlan200 | 00:02:00:00:47:e2 | 2.2.2.2 | 200 | dynamic | |
| 120 | ++---------+-------------------+--------------+-------+---------+ |
| 121 | +| Vlan200 | 00:02:00:00:47:e3 | 2.2.2.3 | 200 | dynamic | |
| 122 | ++---------+-------------------+--------------+-------+---------+ |
| 123 | +Total count : 2 |
| 124 | +
|
| 125 | +""" |
| 126 | + |
| 127 | +show_vxlan_remotemac_specific_output="""\ |
| 128 | ++---------+-------------------+--------------+-------+---------+ |
| 129 | +| VLAN | MAC | RemoteVTEP | VNI | Type | |
| 130 | ++=========+===================+==============+=======+=========+ |
| 131 | +| Vlan200 | 00:02:00:00:47:e2 | 2.2.2.2 | 200 | dynamic | |
| 132 | ++---------+-------------------+--------------+-------+---------+ |
| 133 | +Total count : 1 |
| 134 | +
|
| 135 | +""" |
| 136 | + |
| 137 | +show_vxlan_remotemac_cnt_output="""\ |
| 138 | +Total count : 2 |
| 139 | +
|
| 140 | +""" |
| 141 | + |
| 142 | +show_vxlan_remotemac_specific_cnt_output="""\ |
| 143 | +Total count : 1 |
| 144 | +
|
| 145 | +""" |
| 146 | + |
115 | 147 | class TestVxlan(object):
|
116 | 148 | @classmethod
|
117 | 149 | def setup_class(cls):
|
@@ -215,6 +247,38 @@ def test_show_vxlan_remotevni_specific_cnt(self):
|
215 | 247 | assert result.exit_code == 0
|
216 | 248 | assert result.output == show_vxlan_remotevni_specific_cnt_output
|
217 | 249 |
|
| 250 | + def test_show_vxlan_remotemac(self): |
| 251 | + runner = CliRunner() |
| 252 | + result = runner.invoke(show.cli.commands["vxlan"].commands["remotemac"], ["all"]) |
| 253 | + print(result.exit_code) |
| 254 | + print(result.output) |
| 255 | + assert result.exit_code == 0 |
| 256 | + assert result.output == show_vxlan_remotemac_all_output |
| 257 | + |
| 258 | + def test_show_vxlan_remotemac_specific(self): |
| 259 | + runner = CliRunner() |
| 260 | + result = runner.invoke(show.cli.commands["vxlan"].commands["remotemac"], ["2.2.2.2"]) |
| 261 | + print(result.exit_code) |
| 262 | + print(result.output) |
| 263 | + assert result.exit_code == 0 |
| 264 | + assert result.output == show_vxlan_remotemac_specific_output |
| 265 | + |
| 266 | + def test_show_vxlan_remotemac_cnt(self): |
| 267 | + runner = CliRunner() |
| 268 | + result = runner.invoke(show.cli.commands["vxlan"].commands["remotemac"], ["all", "count"]) |
| 269 | + print(result.exit_code) |
| 270 | + print(result.output) |
| 271 | + assert result.exit_code == 0 |
| 272 | + assert result.output == show_vxlan_remotemac_cnt_output |
| 273 | + |
| 274 | + def test_show_vxlan_remotemac_specific_cnt(self): |
| 275 | + runner = CliRunner() |
| 276 | + result = runner.invoke(show.cli.commands["vxlan"].commands["remotemac"], ["2.2.2.2", "count"]) |
| 277 | + print(result.exit_code) |
| 278 | + print(result.output) |
| 279 | + assert result.exit_code == 0 |
| 280 | + assert result.output == show_vxlan_remotemac_specific_cnt_output |
| 281 | + |
218 | 282 | def test_config_vxlan_add(self):
|
219 | 283 | runner = CliRunner()
|
220 | 284 | db = Db()
|
|
0 commit comments