candlepin/candlepin — pull request #247 by jmrodri (2013-05-08 18:21:08+00:00)
Title: Block physical binds with quantities not multiples of the instance multi...

...plier.

Effectively, if the instance multiplier is 2 and a physical consumer tries to
bind with a quantity of say, 3 or 5. They will receive an error message and the
bind will be blocked. The blocking occurs because physical systems consume pools
in increments of the multiplier, in our current example, 2.

Virt guests will not have this restriction. They always consume the pools in
increments of 1.

We added a new preEntitlement(Consumer, Pool, Integer, CallerType) method that
will be called during bind and list pools. This allows the rules to know who
called them. The other calls to preEntitlement continue to use the existing
method which simply passes CallerType.UNKNOWN to the new method. This allows us
to add new types in the future as we go along.