]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Replace get_all_neutron_bridges by get_deletable_bridges
authorCedric Brandily <zzelle@gmail.com>
Thu, 5 Nov 2015 23:49:21 +0000 (00:49 +0100)
committerCedric Brandily <zzelle@gmail.com>
Wed, 11 Nov 2015 10:14:23 +0000 (10:14 +0000)
commitcc2d30eba4f7b2d0676dd308c9c9fe6328e44447
tree6e3f1f28efcda1e9db688bec367b3e0eed22a831
parentd5df01e5eafb9d7aba91d163f8e873134cdd8d9c
Replace get_all_neutron_bridges by get_deletable_bridges

Currently LinuxBridge L2-agent[1] defines get_all_neutron_bridges which
lists all bridges managed by the agent including user-defined ones BUT
this method is only used by neutron-linuxbridge-cleanup[2] in order to
remove empty non-user-defined bridges returned get_all_neutron_bridges.

This change replaces this method by get_deletable_bridges which returns
bridges managed by LB agent which are "deletable" (ie: non user-defined).
This allows to simplify code and move the computation of "deletable"
bridges to LB agent code.

[1] neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent
[2] neutron.cmd.linuxbridge_cleanup

Partial-Bug: #1514548
Change-Id: I2f8a9a6982ce0ce77187ae4b7a58b3ef752aab34
neutron/cmd/linuxbridge_cleanup.py
neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py
neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py