fix firwewalld permanent zone operations (#42868)
Fixes #42310 Previously, the firewalld module was making a call to FirewallClientConfig.getZoneNames() which doesn't exist in versions of firwalld older than 0.4.2, this patch implements the same logic with older API calls to not require a newer version of firewalld. Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
parent
ffcdc53536
commit
231961564a
1 changed files with 3 additions and 1 deletions
|
@ -498,7 +498,9 @@ class ZoneTransaction(FirewallTransaction):
|
|||
self.module.fail_json(msg=self.tx_not_permanent_error_msg)
|
||||
|
||||
def get_enabled_permanent(self):
|
||||
if self.zone in self.fw.config().getZoneNames():
|
||||
zones = self.fw.config().listZones()
|
||||
zone_names = [self.fw.config().getZone(z).get_property("name") for z in zones]
|
||||
if self.zone in zone_names:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue