smart_proxy_ipam 0.1.2 → 0.1.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99081e6b65f047761521c0baaff029fc1ce40e8a1e1b399be9ee88deb106479d
|
4
|
+
data.tar.gz: 9446d90c2358ad5e6759a2e3a25c720c00e926177f55278dd9f624ce098df7ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90416855e0de74c52d21787390029503640ebbe0b60854d6bc74265f8a3643bd2bd78c952fcfaa6548672715b4c635162ae6e799c210ec2d4589365d5f19921a
|
7
|
+
data.tar.gz: 4ab2f315c3722487d673ce0398d49a1cf2a9dace859e9eba900dc830c2042cd09d93ff0a49feed9fb6c0833a3c45933062a2c509ceb20ccb03659f62f1b123de
|
@@ -103,7 +103,7 @@ module Proxy::Ipam::IpamHelper
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def get_request_group(params)
|
106
|
-
group = params[:group] ? URI.escape(params[:group]) : nil
|
106
|
+
group = params[:group] ? URI.escape(URI.decode(params[:group])) : nil
|
107
107
|
halt 500, { error: errors[:groups_not_supported] }.to_json if group && !provider.groups_supported?
|
108
108
|
group
|
109
109
|
end
|
@@ -21,7 +21,7 @@ module Proxy::Netbox
|
|
21
21
|
@token = conf[:token]
|
22
22
|
@api_resource = Proxy::Ipam::ApiResource.new(api_base: @api_base, token: "Token #{@token}")
|
23
23
|
@ip_cache = Proxy::Ipam::IpCache.instance
|
24
|
-
@ip_cache.
|
24
|
+
@ip_cache.set_provider_name('netbox')
|
25
25
|
end
|
26
26
|
|
27
27
|
def get_ipam_subnet(cidr, group_name = nil)
|
@@ -70,7 +70,8 @@ module Proxy::Netbox
|
|
70
70
|
|
71
71
|
def get_ipam_group(group_name)
|
72
72
|
raise ERRORS[:groups_not_supported] unless groups_supported?
|
73
|
-
params
|
73
|
+
# TODO: Fix encoding of params in a common way for all providers
|
74
|
+
params = URI.encode_www_form({ name: URI.decode(group_name) })
|
74
75
|
response = @api_resource.get("ipam/vrfs/?#{params}")
|
75
76
|
json_body = JSON.parse(response.body)
|
76
77
|
return nil if json_body['count'].zero?
|
@@ -22,7 +22,7 @@ module Proxy::Phpipam
|
|
22
22
|
@token = authenticate
|
23
23
|
@api_resource = Proxy::Ipam::ApiResource.new(api_base: @api_base, token: @token, auth_header: 'Token')
|
24
24
|
@ip_cache = Proxy::Ipam::IpCache.instance
|
25
|
-
@ip_cache.
|
25
|
+
@ip_cache.set_provider_name('phpipam')
|
26
26
|
end
|
27
27
|
|
28
28
|
def get_ipam_subnet(cidr, group_name = nil)
|