Add "reusable" column for nics, to avoid reusing addresses that are special in some...
authorQuentin Smith <quentin@mit.edu>
Fri, 27 Feb 2009 16:56:20 +0000 (11:56 -0500)
committerQuentin Smith <quentin@mit.edu>
Fri, 27 Feb 2009 16:56:20 +0000 (11:56 -0500)
svn path=/trunk/packages/invirt-web/; revision=2211

code/controls.py
debian/changelog

index 4cd0e9c..911c41a 100644 (file)
@@ -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)
index 024ce1d..26fd5c8 100644 (file)
@@ -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 <quentin@mit.edu>  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.