pingable_ipam_plugin 0.0.4 → 0.0.5
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/app/services/ipam/ping_random_db.rb +5 -0
- data/lib/pingable_ipam_plugin/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a74278facc95a796eaa1a5cf9122ba1869dbc3300bd17a16e919deb53fbc6206
|
4
|
+
data.tar.gz: cba5705fe14534f4c24734951a3fb8e809709f052b13c65ed8845b9b8d7c8c4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d9edce903ef99a98ab52e32ce97a18e9eb948c84389a5057c8faf6cd97c366d2097f4df58a90149ab477b9a9b40b14d86ffe904f3a26be74eee0796b2fe89b1
|
7
|
+
data.tar.gz: 8f23bf9ac404645cf6e25a16dc17c258f6e947dc2045a68cea6a61886845092c062175a4f933be1c18e69aeb57eea6ef503b24ff169d3c97a08a85a64d2dd39d
|
@@ -77,6 +77,11 @@ module IPAM
|
|
77
77
|
range = subnet_range.to_a - excluded_ips.to_a
|
78
78
|
range -= subnet.known_ips.to_a
|
79
79
|
|
80
|
+
if range.empty?
|
81
|
+
errors.add(:subnet, _('no free IP could be found in our DB, enlarge subnet range'))
|
82
|
+
return nil
|
83
|
+
end
|
84
|
+
|
80
85
|
loop do
|
81
86
|
# next random IP from the sequence generated by MAC seed
|
82
87
|
candidate = random_ip(range)
|