lib/chef-workflow/support/ip.rb
#
# Gets the next unallocated IP, given an IP to start with.
#
Gets the next unallocated IP, given an IP to start with.
Gets the next unallocated IP given an IP to start with .
def next_ip(arg)
    octets = arg.split(/\./, 4).map(&:to_i)
    octets[3] += 1
    raise "out of ips!" if octets[3] > 255
    return octets.map(&:to_s).join(".")
  end
def next_ip ( arg ) octets = arg . split ( / \. / , 4 ) . map ( & :to_i ) octets [ 3 ] += 1 raise "out of ips!" if octets [ 3 ] > 255 return octets . map ( & :to_s ) . join ( "." ) end
Gets the next unallocated IP, given an IP to start with.
Gets the next unallocated IP given an IP to start with .
arg
<not_specific>