rackerlabs/quark — pull request #5 by Cerberus98 (2013-10-22 20:22:01+00:00)
Title: Fixes RM3256

Fixes an accidental regression in network deletion caused when trying to
fix IPAM. More specifically, the allocated_ips relationship was being
improperly used earlier and was thus modified to only count IP addresses
that had actually been allocated previously but weren't currently
allocated. Unfortunately, we missed the case in network delete where the
plugin code checks to see if any previously generated IP addresses are
currently allocated. The tests passed because we stub out any database
access, side-stepping the check.

The fix reverts the allocated_ips relationship and adds a new
"generated_ips" relationship for IPAM to utilize instead. Additionally,
adds three tests and a new "functional" subfolder, as the only way to
test these relationships is to actually hit the database.