]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
ovs: Make interface name hashing algorithm common and extend it
authorAndreas Scheuring <andreas.scheuring@de.ibm.com>
Wed, 18 Nov 2015 14:23:36 +0000 (15:23 +0100)
committerAndreas Scheuring <andreas.scheuring@de.ibm.com>
Mon, 23 Nov 2015 08:26:37 +0000 (09:26 +0100)
commitc3d2526727241ac1f6d812dc5fc1fd7e3636b3fc
tree902c918a07d4e1a2321886550a748b9748d5766d
parenta93b889ae517d29332848854b0757a92ffb4f76b
ovs: Make interface name hashing algorithm common and extend it

The OVS device name hashing algorithm shortens interface names that are too
long. To ensure uniqueness it makes use of a hashing algorithm.

Move this function to a common place where it can be shared between ml2
drivers and agents.

Extend the function to support defining the max device length to be used.

Change LOG level to info to help deployers figuring out the unhashed name
of an hashed inteface.

Adapt OVS agent to use this common function instead of its
own implementation.

Change-Id: I5c04f39928d070aa7e372934fcb2675609d2761c
Partial-Bug: #1495960
neutron/plugins/common/utils.py
neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/plugins/common/__init__.py [new file with mode: 0644]
neutron/tests/unit/plugins/common/test_utils.py [new file with mode: 0644]
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py