Puppet Function: nomad_cni::int_to_v4
- Defined in:
- lib/puppet/functions/nomad_cni/int_to_v4.rb
- Function type:
- Ruby 4.x API
Overview
we don’t know seeded_rand output, but it may return: 237.79.86.177
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/puppet/functions/nomad_cni/int_to_v4.rb', line 11 Puppet::Functions.create_function(:'nomad_cni::int_to_v4') do dispatch :int_to_v4 do param 'Integer[0,268435455]', :multicast_int_addr return_type 'Stdlib::IP::Address::V4::Nosubnet' end def int_to_v4(multicast_int_addr) real_int_address = multicast_int_addr + 3_758_096_384 IPAddr.new(real_int_address, Socket::AF_INET).to_s end end |