Sha256: a0a6b7f05916629b8ea144fe752fad5307cf6315b786648b5aa8e2dba69d57ea
Contents?: true
Size: 762 Bytes
Versions: 47
Compression:
Stored size: 762 Bytes
Contents
module Fog module Network class AzureRM # Real class for Network Request class Real def get_available_ipaddresses_count(subnet_name, address_prefix, ip_configurations_ids, express_route_enabled) Fog::Logger.debug "Getting free IP Address count of Subnet #{subnet_name}" total_ipaddresses = (2**(32 - address_prefix.split('/').last.to_i)) - 2 total_ipaddresses -= 3 if express_route_enabled used_ip_address = ip_configurations_ids.nil? ? 0 : ip_configurations_ids.count total_ipaddresses - used_ip_address end end # Mock class for Network Request class Mock def get_available_ipaddress_count(*) 65_531 end end end end end
Version data entries
47 entries across 47 versions & 4 rubygems