smart_proxy_dns_infoblox 0.0.8 → 0.0.9
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.
- checksums.yaml +4 -4
- data/README.md +4 -5
- data/config/dns_infoblox.yml.example +9 -5
- data/lib/smart_proxy_dns_infoblox/dns_infoblox_main.rb +5 -4
- data/lib/smart_proxy_dns_infoblox/dns_infoblox_plugin.rb +1 -1
- data/lib/smart_proxy_dns_infoblox/dns_infoblox_version.rb +1 -1
- data/lib/smart_proxy_dns_infoblox/plugin_configuration.rb +2 -1
- data/test/infoblox_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3627c36c141f563073ac1b0893b4b454844a022e5cec3c42d0c57eb57d5a8762
|
4
|
+
data.tar.gz: 2c0c75a15f114bdb535cd159b013047d8b9b2851fc77b0cd59e0a108bd977982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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)
|
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
|
-
|
4
|
+
# Credentials for Infoblox API, make sure the DNS Role is assigned
|
5
|
+
:username: "admin"
|
7
6
|
:password: "infoblox"
|
8
|
-
|
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
|
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(:
|
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 => '
|
5
|
+
default_settings :username => 'infoblox', :password => 'infoblox', :dns_server => 'localhost', :dns_view => 'default'
|
6
6
|
|
7
7
|
requires :dns, '>= 1.12'
|
8
8
|
|
data/test/infoblox_test.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|