def request(machine)
      if (address = address_for(machine))
        return address
      elsif (address = next_available_lease)
        @pool[address] = id_for(machine)
        return address
      else
        raise PoolExhaustedError,
          :name    => machine.name,
          :network => @network_range
      end
    end
def request(machine)
      if (address = address_for(machine))
        return address
      elsif (address = next_available_lease)
        @pool[address] = id_for(machine)
        return address
      else
        raise PoolExhaustedError,
          :name    => machine.name,
          :network => @network_range
      end
    end
Create a new Pool object that manages a range of IP addresses.

 @param network_range [String] The network address range to use as the
   address pool.
 Allocate an IP address for the given machine. If a machine already has an
 IP address allocated, then return that.

 @param machine [Vagrant::Machine]
 @return [IPAddr] the IP address assigned to the machine.
 @raise [PoolExhaustedError] if no allocatable addresses remain in the
   range managed by the pool.