infoblox 0.2.14 → 0.2.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 91f2d9d2db3b74b2d8cf9a0bc26ac2d560ba5b47
4
- data.tar.gz: 1d4f939174004125ccc3df8c06d5a01b5d57bd26
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZGFjZDM3ODQzMTJiNjkzY2NiNGZmOTdmZGJkMDg0NjNiZWYxODVmYg==
5
+ data.tar.gz: !binary |-
6
+ MzE2MDU2ZDY5MWY2N2M4NTc2YjRmYTUwMDNkYmU5NTNmY2Y1N2Q2OA==
5
7
  SHA512:
6
- metadata.gz: 55b179b1f1600a6b010353de9341523ee8939460864548dc35b194d79aec0d957b2c3c120b87dc3a55de98aab6b206e58b9d49ae3eb900dffc1d0f48efa41778
7
- data.tar.gz: fda536e91d5df0023f05a59028668e1022a3d7ad3ff6f54b4af5ae4b141a186db03e108a1c450dba60d1165f5b10aaed0915f7a1b28e8a8408aba4d4b4afe1f6
8
+ metadata.gz: !binary |-
9
+ MDIzMTA2NmFjMDY2OGQyMGJhMWNjMmVjN2VjZDBiYTEyNWNjMzhlZGU1Yjc4
10
+ YjRjNGUyZTM1NDI3YzM4NjA3ZmI0MTJlNmM2Y2ZjMTkyN2QwZmIyMjRiYWY4
11
+ YTFmMWE4ZjhlZTkyMmM1MTY3OThlOGZiNDcxNDI3ZjBlMjk3ZTg=
12
+ data.tar.gz: !binary |-
13
+ NTUzNmZlZjUxNDlhMWMyYjliODYwOTlmMmVmZTgxMGVlNjRhNDMyZDRiZmYw
14
+ YTJmZDY2MmMzMzE4MTBhZTQxNDk0YzdlNDU5YTUzMTZmMzQxY2MxNWM0YTcw
15
+ Zjg3YjAyNjQzNDlmZWY0MjViMjgxNzYyZWIzODA4N2UwMWQ1ZDA=
data/.travis.yml ADDED
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.2
4
+ - 1.9.3
5
+ - jruby-19mode
6
+ - ruby-head
7
+ - jruby-head
8
+ script: bundle exec rspec
9
+ notifications:
10
+ webhooks: https://gd-radiator.ngrok.com/hubot/travis?room=devlab@conference.im.office.gdi
11
+ on_success: change
12
+ on_failure: always
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Interact with the Infoblox WAPI with Ruby. Use this gem to list, create, and delete host records.
4
4
 
5
+ [![Build Status](https://travis-ci.org/govdelivery/infoblox.svg?branch=master)](https://travis-ci.org/govdelivery/infoblox)
5
6
  ## Installation
6
7
 
7
8
  Add this line to your application's Gemfile:
@@ -43,17 +44,26 @@ You can also search across the Infoblox cluster using the `Infoblox::Search` res
43
44
  result = Infoblox::Search.find(connection, "search_string~" => "webserver-")
44
45
  # => [#<Infoblox::Host>, #<Infoblox::Ptr>, ...]
45
46
 
46
- ## Creating, updating, and deleting resources
47
+ ## Creating a network
47
48
  The resource class instances support `get`, `post`, `put`, and `delete`. For example, creating a network is pretty straightforward:
48
49
 
50
+ # create
49
51
  network = Infoblox::Network.new(:connection => connection)
50
52
  network.network = "10.20.30.0/24"
51
53
  network.extensible_attributes = {"VLAN" => "my_vlan"}
52
54
  network.auto_create_reversezone = true
53
- network.post # true
55
+ network.post
56
+
57
+ # update
54
58
  network.network = "10.20.31.0/24"
55
- network.put # true
59
+ network.put
60
+
61
+ ## Changing IP on an existing host
62
+ To change the IP of an existing host, you have to poke around in the ipv4addrs collection to find the one you are looking for. The example below assumes that there is only one ipv4 address and just overwrites it.
56
63
 
64
+ host = Infoblox::Host.find(connection, {"name~" => "my.host.name"}).first
65
+ host.ipv4addrs[0].ipv4addr = "10.10.10.10"
66
+ host.put
57
67
 
58
68
  ## Contributing
59
69
 
@@ -1,6 +1,7 @@
1
1
  module Infoblox
2
2
  class HostIpv4addr < Resource
3
- remote_attr_accessor :network, :host, :ipv4addr, :configure_for_dhcp, :mac
3
+ remote_attr_accessor :network, :ipv4addr, :configure_for_dhcp, :mac
4
+ remote_post_accessor :host
4
5
 
5
6
  wapi_object "record:host_ipv4addr"
6
7
 
@@ -1,3 +1,3 @@
1
1
  module Infoblox
2
- VERSION = "0.2.14"
2
+ VERSION = "0.2.15"
3
3
  end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+ describe Infoblox::HostIpv4addr do
3
+
4
+ it "should have correct post attributes" do
5
+ expected = [:host]
6
+ expect(Infoblox::HostIpv4addr.remote_post_attrs).to eq(expected)
7
+
8
+ expected = [:network, :ipv4addr, :configure_for_dhcp, :mac]
9
+ expect(Infoblox::HostIpv4addr.remote_attrs).to eq(expected)
10
+ end
11
+ end
12
+
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infoblox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Billy Reisinger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-05 00:00:00.000000000 Z
11
+ date: 2014-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday_middleware
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: pry
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - ! '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - ! '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  description: A Ruby wrapper to the Infoblox WAPI
@@ -101,8 +101,9 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - ".gitignore"
105
- - ".rspec"
104
+ - .gitignore
105
+ - .rspec
106
+ - .travis.yml
106
107
  - Gemfile
107
108
  - LICENSE.txt
108
109
  - README.md
@@ -125,6 +126,7 @@ files:
125
126
  - lib/infoblox/resource/txt.rb
126
127
  - lib/infoblox/version.rb
127
128
  - spec/connection_spec.rb
129
+ - spec/host_ipv4addr_spec.rb
128
130
  - spec/host_spec.rb
129
131
  - spec/resource_spec.rb
130
132
  - spec/search_spec.rb
@@ -139,12 +141,12 @@ require_paths:
139
141
  - lib
140
142
  required_ruby_version: !ruby/object:Gem::Requirement
141
143
  requirements:
142
- - - ">="
144
+ - - ! '>='
143
145
  - !ruby/object:Gem::Version
144
146
  version: '0'
145
147
  required_rubygems_version: !ruby/object:Gem::Requirement
146
148
  requirements:
147
- - - ">="
149
+ - - ! '>='
148
150
  - !ruby/object:Gem::Version
149
151
  version: '0'
150
152
  requirements: []
@@ -156,7 +158,9 @@ summary: This gem is a Ruby interface to the Infoblox WAPI. Using the gem, you c
156
158
  query, create, update, and delete DNS records in your Infoblox instance.
157
159
  test_files:
158
160
  - spec/connection_spec.rb
161
+ - spec/host_ipv4addr_spec.rb
159
162
  - spec/host_spec.rb
160
163
  - spec/resource_spec.rb
161
164
  - spec/search_spec.rb
162
165
  - spec/spec_helper.rb
166
+ has_rdoc: