def test_show_vlan(self, t): enable(t) add_vlan(t, 10) add_vlan(t, 11) add_vlan(t, 12) configuring_vlan(t, 17, do="name this-name-is-too-long-buddy-budd") add_vlan(t, 100) add_vlan(t, 1000) t.write("show vlan") t.readln("") t.readln("VLAN Name Ports Type") t.readln("----- --------------- ------------- --------------") t.readln("1 default Default") t.readln("10 VLAN10 Static") t.readln("11 VLAN11 Static") t.readln("12 VLAN12 Static") t.readln("17 this-name-is-too-long-buddy-budd Static") t.readln("100 VLAN100 Static") t.readln("1000 VLAN1000 Static") t.readln("") t.read("my_switch#") configuring(t, do="no vlan 10") configuring(t, do="no vlan 11") configuring(t, do="no vlan 12") configuring(t, do="no vlan 17") configuring(t, do="no vlan 100") configuring(t, do="no vlan 1000")
def test_configuring_a_vlan(self, t): enable(t) add_vlan(t, 1000) add_vlan(t, 1001) add_vlan(t, 2000) configuring_vlan(t, 2000, do="name shizzle") assert_running_config_contains_in_order(t, [ "vlan 2000", "name shizzle", "exit", "vlan 1,1000-1001", "exit", ]) configuring(t, do="no vlan 1000") configuring(t, do="no vlan 1001") configuring(t, do="no vlan 2000")