Puppet Function: validate_vxlan_udp_port
- Defined in:
- lib/puppet/parser/functions/validate_vxlan_udp_port.rb
- Function type:
- Ruby 3.x API
Overview
23 24 25 26 27 28 29 30 31 |
# File 'lib/puppet/parser/functions/validate_vxlan_udp_port.rb', line 23 newfunction(:validate_vxlan_udp_port) do |args| value = Integer(args[0]) # check if port is either default value or one of the private ports # according to http://tools.ietf.org/html/rfc6056 if value != 4789 or (49151 >= value and value > 65535) raise Puppet::Error, "vxlan udp port is invalid." end end |