

@with_protocol
def test_switchport_general_pvid(self, t):
    enable(t)
    configuring_vlan(t, 1264)
    t.write('configure')
    t.readln('')
    t.read('my_switch(config)#')
    t.write('interface ethernet 1/g1')
    t.readln('')
    t.read('my_switch(config-if-1/g1)#')
    t.write('switchport general pvid 1264')
    t.readln('')
    t.readln('Port is not general port.')
    t.readln('')
    t.read('my_switch(config-if-1/g1)#')
    t.write('switchport mode general')
    t.readln('')
    self.read('my_switch(config-if-1/g1)#')
    t.write('switchport general pvid 1500')
    t.readln('Could not configure pvid.')
    t.readln('')
    t.read('my_switch(config-if-1/g1)#')
    t.write('switchport general pvid 1264')
    t.readln('')
    t.read('my_switch(config-if-1/g1)#')
    t.write('exit')
    t.readln('')
    t.read('my_switch(config)#')
    t.write('exit')
    t.readln('')
    t.read('my_switch#')
    assert_interface_configuration(t, 'ethernet 1/g1', ['switchport mode general', 'switchport general pvid 1264'])
    configuring_interface(t, 'ethernet 1/g1', do='no switchport general pvid')
    assert_interface_configuration(t, 'ethernet 1/g1', ['switchport mode general'])
    configuring_interface(t, 'ethernet 1/g1', do='switchport mode access')
    assert_interface_configuration(t, 'ethernet 1/g1', [''])
    unconfigure_vlan(t, 1264)

dataset/ETHPy150Open internap/fake-switches/tests/dell/test_configure_interface.py DellConfigureInterfaceTest.test_switchport_general_pvid/VarMisuse@118/207 `t`->`self`