[#172] Native VLAN change compatible with Cisco (trunk/access) and Others

This will first try to set the pvid (Cisco trunk),
and then use vlan (everything else).

Ideally we instead get SNMP::Info to make a smart choice which was the
intention behind set_i_untagged, but it's broken at the moment.
This commit is contained in:
Oliver Gorwits
2014-11-19 22:20:12 +00:00
parent 16c4d9cfbe
commit 2f6c2c0cdb
2 changed files with 4 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
* [#157] Device Port Log being emptied by device discover
* [#156] Only delete node_ip and node_nbt when no active nodes reference
* [#169] Remove ref to force install of Dancer and DBIC
* [#172] Native VLAN change compatible with Cisco (trunk/access) and Others
2.029012 - 2014-10-09

View File

@@ -54,7 +54,9 @@ sub vlan {
return job_error("Cannot alter vlan: $vlan_reconfig_check")
if $vlan_reconfig_check;
return _set_port_generic($job, 'untagged', 'vlan');
my @stat = _set_port_generic($job, 'pvid'); # for Cisco trunk
return @stat if $stat[0] eq 'done';
return _set_port_generic($job, 'vlan');
}
sub _set_port_generic {