smart_proxy_dhcp_infoblox 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 218db69f20054d42cebdf82e4ff69af3c2df47d5
4
- data.tar.gz: 0456812f91e66c65945b25cdcf0d8fef911530fc
3
+ metadata.gz: e9d476422505f0de1b398cec16d1dc065b5906e9
4
+ data.tar.gz: 59b2f67f873701ffc0e21a4f553cf50c055f627d
5
5
  SHA512:
6
- metadata.gz: 1787987a0c0ada87d489ed0107eae8f3d1899563d0267b04ea7e431cd8b4a38b82b49b202ca9c659cfeeb4514e709fa7c28a3f997836bf37112235c60e079b7d
7
- data.tar.gz: 0acc939d5da3d949f89ac1bbb4934babadf562fa4f7f3c93b7fe416e837fee9931a492004e6b61e051b09365dbf01d8146acb81c01590cd9b881eb73220ae43d
6
+ metadata.gz: 169b3d6d58d49639054c06b65f7bd4f2ea847b0e01f5569db7a80e1b7750b220aceee8d8cf295010f87c0a9f80b870120f18042a6867c03173e709ef2809504b
7
+ data.tar.gz: 5ba39c49492d1ac3c7a6c90ed30737b0549f3a406e7b9396245561f805c12a9fdb1445ae5598420a9ace11b699bb122e4ed7fbc00638dbfd94b4bda27cb04f68
@@ -14,6 +14,7 @@ module Proxy::DHCP::Infoblox
14
14
  infoblox_user = Proxy::DHCP::Infoblox::Plugin.settings.infoblox_user
15
15
  infoblox_pw = Proxy::DHCP::Infoblox::Plugin.settings.infoblox_pw
16
16
  @record_type = Proxy::DHCP::Infoblox::Plugin.settings.record_type
17
+ @range = Proxy::DHCP::Infoblox::Plugin.settings.range
17
18
  wapi_version = Proxy::DHCP::Infoblox::Plugin.settings.wapi_version
18
19
  ::Infoblox.wapi_version = "#{wapi_version}"
19
20
  @connection = ::Infoblox::Connection.new(username: infoblox_user, password: infoblox_pw, host: server)
@@ -99,8 +100,11 @@ module Proxy::DHCP::Infoblox
99
100
  # returns first available ip address in a subnet with network_address, for a host with mac_address, in the range of ip addresses: from_ip_address, to_ip_address
100
101
  # Deliberatly ignoring everything but first argument
101
102
  logger.debug "Infoblox unused_ip Network_address: #{network_address} #{mac_address}, #{from_ip_address}, #{to_ip_address}"
102
- #::Infoblox::Network.find(@connection, network: "#{network_address.network}/#{network_address.cidr}").first.next_available_ip
103
- ::Infoblox::Range.find(@connection, network: "#{network_address.network}/#{network_address.cidr}").first.next_available_ip
103
+ if @range
104
+ ::Infoblox::Range.find(@connection, network: "#{network_address.network}/#{network_address.cidr}").first.next_available_ip
105
+ else
106
+ ::Infoblox::Network.find(@connection, network: "#{network_address.network}/#{network_address.cidr}").first.next_available_ip
107
+ end
104
108
  # Idea for randomisation in case of concurrent installs:
105
109
  #::Infoblox::Network.find(@connection, network: "#{network_address.network}/#{network_address.cidr}").first.next_available_ip(15).sample
106
110
  end
@@ -1,7 +1,7 @@
1
1
  module Proxy
2
2
  module DHCP
3
3
  module Infoblox
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_proxy_dhcp_infoblox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Klaas Demter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-10 00:00:00.000000000 Z
11
+ date: 2016-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake