diff options
| author | Christian Breunig <christian@breunig.cc> | 2024-04-03 19:23:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-03 19:23:14 +0200 |
| commit | d4b53a38359d80a4578d6fb2d8c76241b310f866 (patch) | |
| tree | 72d8b52266a25c26132c615b64adfa8b3345ff7c /python/vyos/ifconfig/bridge.py | |
| parent | fe09b767cfae7879dcbb8b2cfd52644342776b7e (diff) | |
| parent | 74198e68a6edbdb36a6103a7666de530bdd71696 (diff) | |
| download | veeos-1x-d4b53a38359d80a4578d6fb2d8c76241b310f866.tar.gz veeos-1x-d4b53a38359d80a4578d6fb2d8c76241b310f866.zip | |
Merge pull request #3240 from c-po/spring-cleaning
T6199: spring cleaning - drop unused Python imports
Diffstat (limited to 'python/vyos/ifconfig/bridge.py')
| -rw-r--r-- | python/vyos/ifconfig/bridge.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/python/vyos/ifconfig/bridge.py b/python/vyos/ifconfig/bridge.py index 7936e3da5..917f962b7 100644 --- a/python/vyos/ifconfig/bridge.py +++ b/python/vyos/ifconfig/bridge.py @@ -13,13 +13,12 @@ # You should have received a copy of the GNU Lesser General Public # License along with this library. If not, see <http://www.gnu.org/licenses/>. -from netifaces import interfaces - from vyos.ifconfig.interface import Interface from vyos.utils.assertion import assert_boolean from vyos.utils.assertion import assert_list from vyos.utils.assertion import assert_positive from vyos.utils.dict import dict_search +from vyos.utils.network import interface_exists from vyos.configdict import get_vlan_ids from vyos.configdict import list_diff @@ -314,7 +313,7 @@ class BridgeIf(Interface): # remove interface from bridge tmp = dict_search('member.interface_remove', config) for member in (tmp or []): - if member in interfaces(): + if interface_exists(member): self.del_port(member) # enable/disable VLAN Filter @@ -345,7 +344,7 @@ class BridgeIf(Interface): for interface, interface_config in tmp.items(): # if interface does yet not exist bail out early and # add it later - if interface not in interfaces(): + if not interface_exists(interface): continue # Bridge lower "physical" interface |
