From: Quentin Smith Date: Fri, 27 Feb 2009 16:56:20 +0000 (-0500) Subject: Add "reusable" column for nics, to avoid reusing addresses that are special in some... X-Git-Tag: 0.0.21~4 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/89e13567a64d63163ca622fb8e45be5f3ca6d443 Add "reusable" column for nics, to avoid reusing addresses that are special in some way. svn path=/trunk/packages/invirt-web/; revision=2211 --- diff --git a/code/controls.py b/code/controls.py index 4cd0e9c..911c41a 100644 --- a/code/controls.py +++ b/code/controls.py @@ -96,7 +96,7 @@ def createVm(username, state, owner, contact, name, description, memory, disksiz session.save_or_update(machine) disk = Disk(machine=machine, guest_device_name='hda', size=disksize) - nic = NIC.query().filter_by(machine_id=None).first() + nic = NIC.query().filter_by(machine_id=None).filter_by(reusable=True).first() if not nic: #No IPs left! raise CodeError("No IP addresses left! " "Contact %s." % config.web.errormail) diff --git a/debian/changelog b/debian/changelog index 024ce1d..26fd5c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-web (0.0.21) unstable; urgency=low + + * Don't reuse IP addresses that are special in some way. + + -- Quentin Smith Fri, 27 Feb 2009 11:55:51 -0500 + invirt-web (0.0.20) unstable; urgency=low * Don't confuse MB with MiB, or GB with GiB.