Fix linux native bridge for SUSE in cloudutils (#6134)

* fix linux native bridge for SUSE

* apply suggestion

(cherry picked from commit fb43076f9e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Michael 2022-03-23 17:42:15 +01:00 committed by Rohit Yadav
parent cf17d0c557
commit edc00b4b7e
1 changed files with 3 additions and 0 deletions

View File

@ -374,6 +374,9 @@ class networkConfigSUSE(serviceCfgBase, networkConfigBase):
if self.syscfg.env.bridgeType == "openvswitch":
if cfo.getEntry("IPADDR"):
cfo.rmEntry("IPADDR", cfo.getEntry("IPADDR"))
elif self.syscfg.env.bridgeType == "native":
# Bridge is linked to the dev in SUSE not the other way round
pass
else:
raise CloudInternalException("Unknown network.bridge.type %s" % self.syscfg.env.bridgeType)
cfo.save()