def ace_get
      str = config_get('acl', 'ace', @get_args)
      return nil if str.nil?

      remark = Regexp.new('(?<seqno>\d+) remark (?<remark>.*)').match(str)
      return remark unless remark.nil?

      # specialized icmp protocol handling
      return icmp_ace_get(str) if str.include?('icmp')

      # rubocop:disable Metrics/LineLength
      regexp = Regexp.new('(?<seqno>\d+) (?<action>\S+)'\
                 ' *(?<proto>\d+|\S+)'\
                 ' *(?<src_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<src_port>range \S+ \S+|(lt|eq|gt|neq|portgroup) \S+)?'\
                 ' *(?<dst_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<dst_port>range \S+ \S+|(lt|eq|gt|neq|portgroup) \S+)?'\
                 ' *(?<tcp_flags>(ack *|fin *|urg *|syn *|psh *|rst *)*)?'\
                 ' *(?<established>established)?'\
                 ' *(?<precedence>precedence \S+)?'\
                 ' *(?<dscp>dscp \S+)?'\
                 ' *(?<time_range>time-range \S+)?'\
                 ' *(?<packet_length>packet-length (range \d+ \d+|(lt|eq|gt|neq) \d+))?'\
                 ' *(?<ttl>ttl \d+)?'\
                 ' *(?<http_method>http-method (\d+|connect|delete|get|head|post|put|trace))?'\
                 ' *(?<tcp_option_length>tcp-option-length \d+)?'\
                 ' *(?<redirect>redirect \S+)?'\
                 ' *(?<log>log)?')
      # rubocop:enable Metrics/LineLength
      regexp.match(str)
    end
def ace_get
      str = config_get('acl', 'ace', @get_args)
      return nil if str.nil?

      remark = Regexp.new('(?<seqno>\d+) remark (?<remark>.*)').match(str)
      return remark unless remark.nil?

      # specialized icmp protocol handling
      return icmp_ace_get(str) if str.include?('icmp')

      # rubocop:disable Metrics/LineLength
      regexp = Regexp.new('(?<seqno>\d+) (?<action>\S+)'\
                 ' *(?<proto>\d+|\S+)'\
                 ' *(?<src_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<src_port>range \S+ \S+|(lt|eq|gt|neq|portgroup) \S+)?'\
                 ' *(?<dst_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<dst_port>range \S+ \S+|(lt|eq|gt|neq|portgroup) \S+)?'\
                 ' *(?<tcp_flags>(ack *|fin *|urg *|syn *|psh *|rst *)*)?'\
                 ' *(?<established>established)?'\
                 ' *(?<precedence>precedence \S+)?'\
                 ' *(?<dscp>dscp \S+)?'\
                 ' *(?<time_range>time-range \S+)?'\
                 ' *(?<packet_length>packet-length (range \d+ \d+|(lt|eq|gt|neq) \d+))?'\
                 ' *(?<ttl>ttl \d+)?'\
                 ' *(?<http_method>http-method (\d+|connect|delete|get|head|post|put|trace))?'\
                 ' *(?<tcp_option_length>tcp-option-length \d+)?'\
                 ' *(?<redirect>redirect \S+)?'\
                 ' *(?<log>log)?')
      # rubocop:enable Metrics/LineLength
      regexp.match(str)
    end
common ace getter