smart_proxy_dns_infoblox 0.0.8 → 0.0.9

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
  SHA256:
3
- metadata.gz: 786631c2c2929335d895bb171f087fb3481c84a0e9b0c365431ae6de0e22adcc
4
- data.tar.gz: 9fec1c9e89928b02a9e405f852996042795e2b7add7411458c015c40817a814e
3
+ metadata.gz: 3627c36c141f563073ac1b0893b4b454844a022e5cec3c42d0c57eb57d5a8762
4
+ data.tar.gz: 2c0c75a15f114bdb535cd159b013047d8b9b2851fc77b0cd59e0a108bd977982
5
5
  SHA512:
6
- metadata.gz: b5f1e9f182f123bd9aebc8489ae8d402f3f3ac91e2ba8aa36bcbc947ffe6441ce743508c41bd63206c2353ef3a944e8a59629b4e96b62b9546af650842ed820d
7
- data.tar.gz: 2a8d73c0fdeda7c3c74cb3181aae682ae193b5fbbba9a1160ea6df38008e06f8feabc0d9239a0abded82e9d26bef8ccbf3da0ead4deae13cde83ce4e89073475
6
+ metadata.gz: 12acbf20909ba59bfe173405613f2234b81932ef33865d267b693cf8a91e51012cef1d025a579cf1b171722196c5edc194cda7583899c3316837ad316ef9a193
7
+ data.tar.gz: 3274584a890ac371c59b7892942fe26131fb089d65945e94f6872db4c40e5e9da83700d9fde9c7c0df34e8caf27cedaddd092e46b3d717cb4791e9bd545b2e8b
data/README.md CHANGED
@@ -18,7 +18,8 @@ Example installation command via foreman-installer:
18
18
  --foreman-proxy-dns-provider infoblox \
19
19
  --foreman-proxy-plugin-dns-infoblox-dns-server 192.168.201.2 \
20
20
  --foreman-proxy-plugin-dns-infoblox-username admin \
21
- --foreman-proxy-plugin-dns-infoblox-password infoblox
21
+ --foreman-proxy-plugin-dns-infoblox-password infoblox \
22
+ --foreman-proxy-plugin-dns-infoblox-dns-view default
22
23
  ```
23
24
 
24
25
  ## Configuration
@@ -27,9 +28,7 @@ To enable this DNS provider, edit `/etc/foreman-proxy/settings.d/dns.yml` and se
27
28
 
28
29
  :use_provider: dns_infoblox
29
30
 
30
- Configuration options for this plugin are in `/etc/foreman-proxy/settings.d/dns_infoblox.yml` and include:
31
-
32
- * example_setting: change this as an example
31
+ Configuration options for this plugin are in `/etc/foreman-proxy/settings.d/dns_infoblox.yml`, see the [example configuration file](config/dns_infoblox.yml.example) for more details.
33
32
 
34
33
  ## SSL
35
34
 
@@ -74,7 +73,7 @@ Fork and send a Pull Request. Thanks!
74
73
 
75
74
  ## Copyright
76
75
 
77
- Copyright (c) *year* *your name*
76
+ Copyright (c) 2018 Red Hat
78
77
 
79
78
  This program is free software: you can redistribute it and/or modify
80
79
  it under the terms of the GNU General Public License as published by
@@ -1,8 +1,12 @@
1
1
  ---
2
- #
3
- # Configuration file for 'infoblox dns provider
4
- #
2
+ # Configuration file for 'dns_infoblox' dhcp provider
5
3
 
6
- :username: "infoblox"
4
+ # Credentials for Infoblox API, make sure the DNS Role is assigned
5
+ :username: "admin"
7
6
  :password: "infoblox"
8
- :dns_server: "infoblox.my.domain"
7
+
8
+ # Hostname or IP address of the Infoblox appliance (without https:// or port)
9
+ :dns_server: "infoblox.example.com"
10
+
11
+ # View used for records, usually 'default.myview' for custom names.
12
+ #:dns_view: 'default'
@@ -1,9 +1,10 @@
1
1
  module Proxy::Dns::Infoblox
2
2
  class Record < ::Proxy::Dns::Record
3
- attr_reader :connection
3
+ attr_reader :connection, :dns_view
4
4
 
5
- def initialize(host, connection, ttl)
5
+ def initialize(host, connection, ttl, dns_view)
6
6
  @connection = connection
7
+ @dns_view = dns_view
7
8
  super(host, ttl)
8
9
  end
9
10
 
@@ -67,11 +68,11 @@ module Proxy::Dns::Infoblox
67
68
  end
68
69
 
69
70
  def ib_create(clazz, params)
70
- clazz.new({ :connection => connection }.merge(params)).post
71
+ clazz.new({ connection: connection, view: dns_view }.merge(params)).post
71
72
  end
72
73
 
73
74
  def ib_delete(clazz, params)
74
- record = clazz.find(connection, params.merge(:_max_results => 1)).first
75
+ record = clazz.find(connection, params.merge(_max_results: 1, view: dns_view)).first
75
76
 
76
77
  raise Proxy::Dns::NotFound, "Cannot find #{clazz.class.name} entry for #{params}" if record.nil?
77
78
  ret_value = record.delete || (raise Proxy::Dns::NotFound, "Cannot find #{clazz.class.name} entry for #{params}")
@@ -2,7 +2,7 @@ module Proxy::Dns::Infoblox
2
2
  class Plugin < ::Proxy::Provider
3
3
  plugin :dns_infoblox, ::Proxy::Dns::Infoblox::VERSION
4
4
 
5
- default_settings :username => 'infoblox', :password => 'infoblox', :dns_server => 'infoblox.my.domain'
5
+ default_settings :username => 'infoblox', :password => 'infoblox', :dns_server => 'localhost', :dns_view => 'default'
6
6
 
7
7
  requires :dns, '>= 1.12'
8
8
 
@@ -1,7 +1,7 @@
1
1
  module Proxy
2
2
  module Dns
3
3
  module Infoblox
4
- VERSION = '0.0.8'.freeze
4
+ VERSION = '0.0.9'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -22,7 +22,8 @@ module Proxy::Dns::Infoblox
22
22
  ::Proxy::Dns::Infoblox::Record.new(
23
23
  settings[:dns_server],
24
24
  container_instance.get_dependency(:connection),
25
- settings[:dns_ttl]) }
25
+ settings[:dns_ttl],
26
+ settings[:dns_view])}
26
27
  end
27
28
  end
28
29
  end
@@ -10,7 +10,7 @@ class InfobloxTest < Test::Unit::TestCase
10
10
  end
11
11
 
12
12
  def setup
13
- @provider = Proxy::Dns::Infoblox::Record.new('a_host', nil, 999)
13
+ @provider = Proxy::Dns::Infoblox::Record.new('a_host', nil, 999, 'default.test')
14
14
  end
15
15
 
16
16
  def test_create_a
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_proxy_dns_infoblox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Nicholson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-24 00:00:00.000000000 Z
11
+ date: 2019-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop