From 2f6c2c0cdb9d25db966890c25f2fa327c5ec3fa9 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 19 Nov 2014 22:20:12 +0000 Subject: [PATCH] [#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. --- Netdisco/Changes | 1 + .../lib/App/Netdisco/Daemon/Worker/Interactive/PortActions.pm | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index a5fb3445..73b211b1 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -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 diff --git a/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive/PortActions.pm b/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive/PortActions.pm index ad2472ac..23ca92e1 100644 --- a/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive/PortActions.pm +++ b/Netdisco/lib/App/Netdisco/Daemon/Worker/Interactive/PortActions.pm @@ -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 {