]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix Cisco Nexus plugin failures for vlan IDs 1006-4094
authorDane LeBlanc <leblancd@cisco.com>
Tue, 30 Apr 2013 03:43:14 +0000 (23:43 -0400)
committerDane LeBlanc <leblancd@cisco.com>
Thu, 16 May 2013 01:39:37 +0000 (21:39 -0400)
commitfc914f66502ee066f41780e10b0e659334ffd060
tree93a668490b73b5f3d4440151f259294213f0166d
parentf94126739a48993efaf1d1439dcd3dadb0c69742
Fix Cisco Nexus plugin failures for vlan IDs 1006-4094

Fixes bug 1174593

VLAN IDs in the range 1006-4094 are considered to be in the extended
range by the Cisco Nexus 3K switch. As such, the 3K rejects any
state change configuration commands for VLANs in this range, including
"state active" and "no shutdown". The errors returned by the 3K for
these commands can be ignored, since the default states for these commands
are acceptable for the 3K.

For the 5K and 7K versions of the Nexus switch, on the other hand, the
"state active" and "no shutdown" commands are required for proper VLAN
configuration, regardless of VLAN ID.

This fix splits the configuration commands which are used to create a
VLAN on the Nexus switch into three separate configurations:
  - VLAN creation
  - state active
  - no shutdown
For the "state active" and "no shutdown" configurations, the Cisco Nexus
plugin will tolerate (ignore) errors involving invalid setting of state
for VLANs in the extended VLAN range. These specific errors can be
identified by looking for the appearance of certain signature strings
in the associated exception's message string, i.e. "Can't modify
state for extended" or "Command is allowed on VLAN".

This approach will yield a very small hit in performance, but the solution
is much less error prone than requiring customers to configure the
Cisco plugin for 3K vs. 5K vs. 7K, or perhaps even specific software
versions of the 3K, in order to inform the Cisco plugin whether
VLAN state configuration commands should be used or not.

Change-Id: I1be4966ddc6f462bca38428c4f904f8c982f318f
quantum/plugins/cisco/nexus/cisco_nexus_network_driver_v2.py
quantum/plugins/cisco/nexus/cisco_nexus_snippets.py
quantum/tests/unit/cisco/test_network_plugin.py