]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Refactor type_tunnel/gre/vxlan to reduce duplicate code
authorCedric Brandily <zzelle@gmail.com>
Fri, 1 Aug 2014 08:17:12 +0000 (10:17 +0200)
committerCedric Brandily <zzelle@gmail.com>
Thu, 21 Aug 2014 11:54:02 +0000 (13:54 +0200)
commit1100367d4fd5dfe4322e11598dd2f379af916f25
tree9b49864174c2a9888bc9f63dc77223e8d16be217
parent851fa4580aedd2924dda9ac98a4ddd4de751509b
Refactor type_tunnel/gre/vxlan to reduce duplicate code

gre and vxlan type drivers have similar implementation for multiple
methods. This change abstracts these methods and move them to
TunnelTypeDriver.

sync_allocations method is not shared between gre and vxlan type drivers
because they use different strategies and the targeted one is unclear.

Change-Id: I717b70eb718f7ae82f1bc0c81543b0c438e8bddd
neutron/plugins/ml2/drivers/type_gre.py
neutron/plugins/ml2/drivers/type_tunnel.py
neutron/plugins/ml2/drivers/type_vxlan.py
neutron/tests/unit/ml2/test_type_gre.py
neutron/tests/unit/ml2/test_type_vxlan.py