candlepin/candlepin — pull request #139 by dgoodwin (2012-12-17 18:04:54+00:00)
Title: 887287: Detect when virt_limit is removed from subscriptions.

We now detect this scenario by comparing the incoming latest attributes
for a product, against the cached attributes on the pool being
refreshed. If we see virt_limit has disappeared, we signal to candlepin
that the pool should be cleaned up. Because old candlepin's will not
have this functionality, we also set the expected quantity to 0 to
effectively disable it on those servers as well.

This mechanism for the js rules to signal to candlepin that something
should be done is a new idea, but one that might help us get around the
issues we have where we cannot add new functionality/variables to the
rules as it would break on old candlepins. At least with this scenario,
the behavior is not implemented, but no errors will occur when used on
an old server.

This does not include support for detecting when virt_limit has been
*added* to a product and creating the necessary bonus pool. This will be
handled as a separate bug due to time contraints.