Sha256: a3a538c5494170034e1da913372c8e3f78884d7f104afa17d3cae6172ed9504e
Contents?: true
Size: 675 Bytes
Versions: 1
Compression:
Stored size: 675 Bytes
Contents
module Infoblox class Range < Resource remote_attr_accessor :start_addr, :end_addr, :network_view, :extattrs wapi_object "range" ## # Invoke the same-named function on the range resource in WAPI, # returning an array of available IP addresses. # You may optionally specify how many IPs you want (num) and which ones to # exclude from consideration (array of IPv4 addrdess strings). # def next_available_ip(num=1, exclude=[]) post_body = { num: num.to_i, exclude: exclude } JSON.parse(connection.post(resource_uri + "?_function=next_available_ip", post_body).body)["ips"] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
infoblox-0.2.19 | lib/infoblox/resource/range.rb |