infoblox 0.0.6 → 0.0.7

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.
data/README.md CHANGED
@@ -24,22 +24,17 @@ querying, adding, and removing host names from dns records:
24
24
 
25
25
 
26
26
  ## Ruby client usage
27
- Create a new client:
27
+ Before you do anything, create a new client. This adds a connection to the
28
+ base Resource class.
28
29
 
29
30
  client = Infoblox::Client.new(:username => "foo",
30
31
  :password => "bar",
31
32
  :host => "https://foo-bar-dns.example.com")
32
33
 
33
- Creating a host record:
34
+ The client class has a few helper methods to make certain operations easier. Creating a host record:
34
35
 
35
36
  client.create_host("build-machine.internal", "10.10.3.3")
36
-
37
- Delete the host:
38
-
39
37
  client.delete_host("build-machine.internal")
40
-
41
- Find hosts (fuzzy matches on host name):
42
-
43
38
  client.find_host_by_name("build-")
44
39
 
45
40
  One can also use the resource classes directly to run arbitrary query logic:
@@ -50,6 +45,14 @@ One can also use the resource classes directly to run arbitrary query logic:
50
45
  Infoblox::Host.find({"name~" => "demo[0-9]{1,}-web.domain"})
51
46
  # => [...]
52
47
 
48
+ The Resource sub-classes also support `get`, `post`, `put`, and `delete`. For example, creating a network is pretty straightforward:
49
+
50
+ network = Infoblox::Network.new
51
+ network.network = "10.20.30.0/24"
52
+ network.extensible_attributes = {"VLAN" => "my_vlan"}
53
+ network.auto_create_reversezone = true
54
+ network.post # true
55
+
53
56
  ## Contributing
54
57
 
55
58
  1. Fork it
data/infoblox.gemspec CHANGED
@@ -9,9 +9,8 @@ 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. Only a few operations are supported as of yet.
13
- The gem comes with a bin script as well as library classes that can be used in application code.}
14
- spec.homepage = ""
12
+ spec.summary = %q{This gem is a Ruby interface to the Infoblox WAPI. Resources supported for REST operations include IPv4Addr, Network, and Host. }
13
+ spec.homepage = "https://github.com/govdelivery/infoblox"
15
14
  spec.license = "MIT"
16
15
 
17
16
  spec.files = `git ls-files`.split($/)
data/lib/infoblox.rb CHANGED
@@ -6,10 +6,11 @@ require 'openssl'
6
6
  require 'infoblox/version'
7
7
  require 'infoblox/connection'
8
8
  require 'infoblox/resource'
9
- require 'infoblox/host'
10
9
  require 'infoblox/client'
11
- require 'infoblox/ipv4addr'
12
- require 'infoblox/network'
10
+ require 'infoblox/resource/host'
11
+ require 'infoblox/resource/ipv4addr'
12
+ require 'infoblox/resource/network'
13
+ require 'infoblox/resource/network_container'
13
14
 
14
15
  module Infoblox
15
16
  WAPI_VERSION = '1.0'
File without changes
File without changes
@@ -2,7 +2,7 @@ module Infoblox
2
2
  class Network < Resource
3
3
  remote_attr_accessor :network, :extensible_attributes
4
4
  remote_attr_writer :auto_create_reversezone
5
- attr_accessor :network_view
5
+ attr_accessor :network_view, :network_container
6
6
 
7
7
  wapi_object "network"
8
8
 
@@ -0,0 +1,9 @@
1
+ module Infoblox
2
+ class NetworkContainer < Resource
3
+ remote_attr_accessor :network, :extensible_attributes
4
+ remote_attr_writer :auto_create_reversezone
5
+ attr_accessor :network_view
6
+
7
+ wapi_object "networkcontainer"
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Infoblox
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
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.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -126,15 +126,16 @@ files:
126
126
  - lib/infoblox.rb
127
127
  - lib/infoblox/client.rb
128
128
  - lib/infoblox/connection.rb
129
- - lib/infoblox/host.rb
130
- - lib/infoblox/ipv4addr.rb
131
- - lib/infoblox/network.rb
132
129
  - lib/infoblox/resource.rb
130
+ - lib/infoblox/resource/host.rb
131
+ - lib/infoblox/resource/ipv4addr.rb
132
+ - lib/infoblox/resource/network.rb
133
+ - lib/infoblox/resource/network_container.rb
133
134
  - lib/infoblox/version.rb
134
135
  - spec/host_spec.rb
135
136
  - spec/resource_spec.rb
136
137
  - spec/spec_helper.rb
137
- homepage: ''
138
+ homepage: https://github.com/govdelivery/infoblox
138
139
  licenses:
139
140
  - MIT
140
141
  post_install_message:
@@ -158,9 +159,8 @@ rubyforge_project:
158
159
  rubygems_version: 1.8.25
159
160
  signing_key:
160
161
  specification_version: 3
161
- summary: This gem is a Ruby interface to the Infoblox WAPI. Only a few operations
162
- are supported as of yet. The gem comes with a bin script as well as library classes
163
- that can be used in application code.
162
+ summary: This gem is a Ruby interface to the Infoblox WAPI. Resources supported for
163
+ REST operations include IPv4Addr, Network, and Host.
164
164
  test_files:
165
165
  - spec/host_spec.rb
166
166
  - spec/resource_spec.rb