Checking correct flag to add rules to bridges

There are many blocks with "if foobar.rules" to add rules, looks like
the bridge ended up wrong [1], this just checks bridge.routes flag
twice. This causes problems when adding routes to OVS bridges.

https://github.com/openstack/os-net-config/blob/master/os_net_config/impl_ifcfg.py#L747

Related-Bug: #1814250

Change-Id: Ic674800349c47952f363f8ae2bd6a2d181548770
This commit is contained in:
Quique Llorente 2019-02-01 13:16:39 +01:00 committed by Dan Sneddon
parent 27f5687d96
commit 0349d8b4a2
1 changed files with 1 additions and 1 deletions

View File

@ -744,7 +744,7 @@ class IfcfgNetConfig(os_net_config.NetConfig):
self.bridge_data[bridge.name] = data
if bridge.routes:
self._add_routes(bridge.name, bridge.routes)
if bridge.routes:
if bridge.rules:
self._add_rules(bridge.name, bridge.rules)
def add_ovs_user_bridge(self, bridge):