infoblox 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/infoblox.gemspec +1 -1
- data/lib/infoblox.rb +1 -0
- data/lib/infoblox/resource/host.rb +6 -0
- data/lib/infoblox/resource/ptr.rb +9 -0
- data/lib/infoblox/version.rb +1 -1
- data/spec/host_spec.rb +18 -0
- metadata +3 -2
data/infoblox.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Billy Reisinger"]
|
10
10
|
spec.email = ["billy.reisinger@govdelivery.com"]
|
11
11
|
spec.description = %q{A Ruby wrapper to the Infoblox WAPI}
|
12
|
-
spec.summary = %q{This gem is a Ruby interface to the Infoblox WAPI. Resources supported for REST operations include
|
12
|
+
spec.summary = %q{This gem is a Ruby interface to the Infoblox WAPI. Resources supported for REST operations include CNAME, Host, HostIpv4addr, Ipv4addr, Network, and NewtorkContainer. }
|
13
13
|
spec.homepage = "https://github.com/govdelivery/infoblox"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
data/lib/infoblox.rb
CHANGED
data/lib/infoblox/version.rb
CHANGED
data/spec/host_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
HostResponse = Struct.new(:body)
|
2
3
|
describe Infoblox::Host, "#add_ipv4addr" do
|
3
4
|
it "adds an address correctly" do
|
4
5
|
host = Infoblox::Host.new
|
@@ -7,5 +8,22 @@ describe Infoblox::Host, "#add_ipv4addr" do
|
|
7
8
|
host.ipv4addrs[0].should be_a(Infoblox::Ipv4addr)
|
8
9
|
host.ipv4addrs[0].ipv4addr.should eq("10.10.10.10")
|
9
10
|
end
|
11
|
+
|
12
|
+
it "posts correctly" do
|
13
|
+
conn = double
|
14
|
+
uri = Infoblox::BASE_PATH + Infoblox::Host.wapi_object
|
15
|
+
|
16
|
+
allow(conn).to receive(:post).with(uri, {
|
17
|
+
:ipv4addrs => [{:ipv4addr => "10.10.10.10"}],
|
18
|
+
:name => "test-server.test.ing",
|
19
|
+
:configure_for_dns => nil,
|
20
|
+
:extensible_attributes => nil}).and_return(HostResponse.new("hey"))
|
21
|
+
|
22
|
+
Infoblox::Host.connection = conn
|
23
|
+
h = Infoblox::Host.new
|
24
|
+
h.add_ipv4addr("10.10.10.10")
|
25
|
+
h.name = "test-server.test.ing"
|
26
|
+
h.post
|
27
|
+
end
|
10
28
|
end
|
11
29
|
|
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.0.
|
4
|
+
version: 0.0.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- lib/infoblox/resource/ipv4addr.rb
|
134
134
|
- lib/infoblox/resource/network.rb
|
135
135
|
- lib/infoblox/resource/network_container.rb
|
136
|
+
- lib/infoblox/resource/ptr.rb
|
136
137
|
- lib/infoblox/version.rb
|
137
138
|
- spec/host_spec.rb
|
138
139
|
- spec/resource_spec.rb
|
@@ -162,7 +163,7 @@ rubygems_version: 1.8.25
|
|
162
163
|
signing_key:
|
163
164
|
specification_version: 3
|
164
165
|
summary: This gem is a Ruby interface to the Infoblox WAPI. Resources supported for
|
165
|
-
REST operations include
|
166
|
+
REST operations include CNAME, Host, HostIpv4addr, Ipv4addr, Network, and NewtorkContainer.
|
166
167
|
test_files:
|
167
168
|
- spec/host_spec.rb
|
168
169
|
- spec/resource_spec.rb
|