Keep vlan and role undef when empty

This fixes tests (SNMP.t).
Fix switch-related tests