Sha256: f5993c64ac5032f0f69e385d113936051271abfc2632c58cb0226c9bb3885aac
Contents?: true
Size: 743 Bytes
Versions: 67
Compression:
Stored size: 743 Bytes
Contents
#!/usr/bin/env ruby require 'range_operators' require 'hybrid_platforms_conductor/executable' executable = HybridPlatformsConductor::Executable.new(nodes_selection_options: false) nodes_handler = executable.nodes_handler executable.parse_options! # Group IPs per first 3 numbers nodes_handler.prefetch_metadata_of nodes_handler.known_nodes, :private_ips nodes_handler. known_nodes. map { |node| nodes_handler.get_private_ips_of(node) || [] }. flatten. uniq. group_by { |ip| ip.split('.')[0..2].map(&:to_i) }. sort. map { |ip_root, ips| [ip_root, ips.map { |ip| ip.split('.').last.to_i }] }. each do |ip_root, ip_fourths| executable.out "Free IPs for #{ip_root.join('.')}: #{([256] + ip_fourths).missing.rangify}" end
Version data entries
67 entries across 67 versions & 1 rubygems