def add_port(zone, port, permanent=True):
 if (not get_masquerade(zone)):
  add_masquerade(zone)
 cmd = '--zone={0} --add-port={1}'.format(zone, port)
 if permanent:
  cmd += ' --permanent'
 return __firewall_cmd(cmd)

def add_port ( zone , port , permanent = True ) : if ( not get_masquerade ( zone ) ) : add_masquerade ( zone ) cmd = '--zone={0} --add-port={1}' . format ( zone , port ) if permanent : cmd += ' --permanent' return __firewall_cmd ( cmd )
allow specific ports in a zone .