]> 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>
Sat, 30 May 2015 18:41:29 +0000 (20:41 +0200)
committerCedric Brandily <zzelle@gmail.com>
Tue, 2 Jun 2015 08:03:48 +0000 (08:03 +0000)
commit46223363bd4d41639102ae1923dd1dfb306ec808
treeef6bda1fe455c7ae2864d494eb4106fdb93feaed
parent27322e36e626dfc58f8ba4ddc65cfb7614afc2e2
Refactor type_tunnel/gre/vxlan to reduce duplicate code

gre and vxlan type drivers have similar implementations for multiple
methods:
* get_endpoint_by_host
* get_endpoint_by_ip
* delete_endpoint
* get_endpoints
* add_endpoint

This change abstracts these methods and moves the abstractions to the
new class EndpointTunnelTypeDriver.

Change-Id: Iab97f8283b6bf5586334958de950664f6e74202a
neutron/plugins/ml2/drivers/type_gre.py
neutron/plugins/ml2/drivers/type_tunnel.py
neutron/plugins/ml2/drivers/type_vxlan.py
neutron/tests/unit/plugins/ml2/drivers/base_type_tunnel.py