def unused(name=nil)
      net = range.first

      range.count.times do
        this_item = net.to_s.encode("UTF-8")

        begin
          unless allocated.include?(this_item)
            return name ? assign_group_items(name, this_item, true).first : this_item
          end
        rescue
        end

        net = net.succ

        unless range.include?(net.to_s)
          net = range.first
        end
      end

      raise "No free #{allocation_type} for subnet #{range.inspect}"
    end
def unused(name=nil)
      net = range.first

      range.count.times do
        this_item = net.to_s.encode("UTF-8")

        begin
          unless allocated.include?(this_item)
            return name ? assign_group_items(name, this_item, true).first : this_item
          end
        rescue
        end

        net = net.succ

        unless range.include?(net.to_s)
          net = range.first
        end
      end

      raise "No free #{allocation_type} for subnet #{range.inspect}"
    end
Allocate something from a range. Takes a Range object, a type of
 allocation (which is coerced into a table name, so be nice!) and
 namespace for the allocations.

 See Furnish::item for an example.


 Get the next unused item. Will raise if the range is exahusted