@staticmethod
  def find_unclaimed_address(ip_prefix="192.168.1"):
    octects = ip_prefix.split(".")
    if len(octects) == 4:
      ip_prefix = ".".join(octects[0:3])
    host_octect = 2
    address = "%s.%d" % (ip_prefix, host_octect)
    while host_octect <= 255 and address in IPAddressSpace._claimed_addresses:
      host_octect += 1
      address = "%s.%d" % (ip_prefix, host_octect)

    if address in IPAddressSpace._claimed_addresses:
      raise RuntimeError("Out of IP addresses in prefix %s" % ip_prefix)
    return address
Parse a line read from a db
dataset/ETHPy150Open ucb-sts/sts/sts/util/convenience.py/IPAddressSpace.find_unclaimed_address--crossover with--dataset/ETHPy150Open taoliu/taolib/Assoc/tables.py/Table.parse_db_line