def allow_icmp(zone, icmp, permanent=True):
 if (icmp not in get_icmp_types(permanent)):
  log.error('Invalid ICMP type')
  return False
 if (icmp not in list_icmp_block(zone, permanent)):
  log.info('ICMP Type is already permitted')
  return 'success'
 cmd = '--zone={0} --remove-icmp-block={1}'.format(zone, icmp)
 if permanent:
  cmd += ' --permanent'
 return __firewall_cmd(cmd)

def allow_icmp ( zone , icmp , permanent = True ) : if ( icmp not in get_icmp_types ( permanent ) ) : log . error ( 'Invalid ICMP type' ) return False if ( icmp not in list_icmp_block ( zone , permanent ) ) : log . info ( 'ICMP Type is already permitted' ) return 'success' cmd = '--zone={0} --remove-icmp-block={1}' . format ( zone , icmp ) if permanent : cmd += ' --permanent' return __firewall_cmd ( cmd )
allow a specific icmp type on a zone .