lib/wire/model/network_validation.rb
# ensures that all networks with hostips have their hostip
# within the network range of its network, i.e. 10.10.1.1 for 10.10.1.0/24
ensures that all networks with hostips have their hostip
within the network range of its network, i.e.
ensures that all networks with hostips have their hostip within the network range of its network i . e .
def nonmatching_hostips_found?
      @project.get_element('networks').each do |network_name, network_data|
        network = network_data[:network]
        host_ip = network_data[:hostip]
        next unless network && host_ip
        host_ip_ip = IPAddr.new(host_ip)
        network_ip = IPAddr.new(network)
        mark("Network Host ip #{host_ip} is not within network range" \
          "#{network} of network #{network_name}", 'network', network_name) unless
            host_ip_ip.in_range_of?(network_ip)
      end
    end
def nonmatching_hostips_found? @project . get_element ( 'networks' ) . each do | network_name , network_data | network = network_data [ :network ] host_ip = network_data [ :hostip ] next unless network && host_ip host_ip_ip = IPAddr . new ( host_ip ) network_ip = IPAddr . new ( network ) mark ( "Network Host ip #{host_ip} is not within network range" "#{network} of network #{network_name}" , 'network' , network_name ) unless host_ip_ip . in_range_of? ( network_ip ) end end
ensures that all networks with hostips have their hostip
within the network range of its network, i.e.
ensures that all networks with hostips have their hostip within the network range of its network i . e .