director/lib/director/deployment_plan/resource_pool.rb
# Checks if there is enough capacity to run extra N VMs,
# raise error if not enough capacity
# @raise [ResourcePoolNotEnoughCapacity]
# @return [void]
Checks if there is enough capacity to run extra N VMs,
raise error if not enough capacity
Checks if there is enough capacity to run extra N VMs raise error if not enough capacity
def reserve_capacity(n)
        @required_capacity += n
        if @required_capacity > @size
          raise ResourcePoolNotEnoughCapacity,
                "Resource pool `#{@name}' is not big enough: " +
                "#{@required_capacity} VMs needed, capacity is #{@size}"
        end
      end
def reserve_capacity ( n ) @required_capacity += n if @required_capacity > @size raise ResourcePoolNotEnoughCapacity , "Resource pool `#{@name}' is not big enough: " + "#{@required_capacity} VMs needed, capacity is #{@size}" end end
Checks if there is enough capacity to run extra N VMs,
raise error if not enough capacity
Checks if there is enough capacity to run extra N VMs raise error if not enough capacity
None
void
None
n