smart_proxy_ipam 0.1.3 → 0.1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e010cf0ea2091a880899f37aef589b272ced50d132c67794b916609194a13865
|
4
|
+
data.tar.gz: 4551dc45e2357c13cb080e76794fa8ed8546fa9bcf4da2236b003ab7a52d18ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff9fd209a2e8f4a6ff345a6e19cdb8ddd9abef20bc6d95f9e9f97f5e6187d67f6bc0197768bff4e131dbe51670d917c845912cd45379f58e11fd9025a11c47bf
|
7
|
+
data.tar.gz: 4d5800bfe4c2c7705d652c9f589b7f90feeaf3203f3b540c755acfd1525d134e05b9035ab727fffdd0b1dadaf56f41ca2b9eceaddaca053a136b2a93ef5afeee
|
@@ -44,9 +44,10 @@ module Proxy::Ipam
|
|
44
44
|
content_type :json
|
45
45
|
|
46
46
|
begin
|
47
|
-
validate_required_params!([:address, :prefix
|
47
|
+
validate_required_params!([:address, :prefix], params)
|
48
48
|
|
49
|
-
|
49
|
+
mac_param = params[:mac]
|
50
|
+
mac = validate_mac!(params[:mac]) unless mac_param.nil? || mac_param.empty?
|
50
51
|
cidr = validate_cidr!(params[:address], params[:prefix])
|
51
52
|
group_name = get_request_group(params)
|
52
53
|
|
@@ -39,7 +39,6 @@ module Proxy::Ipam::IpamValidator
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def validate_mac!(mac)
|
42
|
-
raise Proxy::Validations::Error.new, ERRORS[:mac] if mac.nil? || mac.empty?
|
43
42
|
unless mac.match(/^([0-9a-fA-F]{2}[:]){5}[0-9a-fA-F]{2}$/i)
|
44
43
|
raise Proxy::Validations::Error.new, ERRORS[:bad_mac]
|
45
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_proxy_ipam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Smart proxy plugin for integration with various External IPAM providers
|
14
14
|
email: chrisjsmith001@gmail.com
|