infoblox 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,8 +7,18 @@ module Infoblox
7
7
 
8
8
  wapi_object "network"
9
9
 
10
- def next_available_ip(num=1)
11
- JSON.parse(connection.post(resource_uri + "?_function=next_available_ip&num=#{num}", {}).body)["ips"]
10
+ ##
11
+ # Invoke the same-named function on the network resource in WAPI,
12
+ # returning an array of available IP addresses.
13
+ # You may optionally specify how many IPs you want (num) and which ones to
14
+ # exclude from consideration (array of IPv4 addrdess strings).
15
+ #
16
+ def next_available_ip(num=1, exclude=[])
17
+ post_body = {
18
+ num: num.to_i,
19
+ exclude: exclude
20
+ }
21
+ JSON.parse(connection.post(resource_uri + "?_function=next_available_ip", post_body).body)["ips"]
12
22
  end
13
23
  end
14
- end
24
+ end
@@ -1,3 +1,3 @@
1
1
  module Infoblox
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infoblox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-30 00:00:00.000000000 Z
12
+ date: 2013-09-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday