added a source/network add/remove to/from zone for firewalld - removed useless comment

reviewable/pr18780/r1
Timothy Vandenbrande 10 years ago
parent 6fab8f49a9
commit b365fc4464

@ -154,13 +154,11 @@ def add_source(zone, source):
fw_zone = fw.config().getZoneByName(zone) fw_zone = fw.config().getZoneByName(zone)
fw_settings = fw_zone.getSettings() fw_settings = fw_zone.getSettings()
fw_settings.addSource(source) fw_settings.addSource(source)
fw_zone.update(fw_settings)
def remove_source(zone, source): def remove_source(zone, source):
fw_zone = fw.config().getZoneByName(zone) fw_zone = fw.config().getZoneByName(zone)
fw_settings = fw_zone.getSettings() fw_settings = fw_zone.getSettings()
fw_settings.removeSource(source) fw_settings.removeSource(source)
fw_zone.update(fw_settings)
#################### ####################
# service handling # service handling
@ -354,7 +352,6 @@ def main():
msgs.append("Added %s to zone %s" % (source, zone)) msgs.append("Added %s to zone %s" % (source, zone))
elif desired_state == "disabled": elif desired_state == "disabled":
if is_enabled == True: if is_enabled == True:
msgs.append("source is present")
if module.check_mode: if module.check_mode:
module.exit_json(changed=True) module.exit_json(changed=True)

Loading…
Cancel
Save