for p in people - old_people:
ma = MachineAccess(user=p)
m.acl.append(ma)
- session.save_or_update(ma)
+ session.add(ma)
def refreshCache():
session.begin()
session.delete(old)
for added in admin_acl - old_admin_acl:
a = Admin(user=added)
- session.save_or_update(a)
+ session.add(a)
session.flush()
# Atomically execute our changes
machine.uuid = uuidToString(randomUUID())
machine.boot_off_cd = True
machine.type = machine_type
- session.save_or_update(machine)
+ session.add(machine)
disk = Disk(machine=machine,
guest_device_name='hda', size=disksize)
nic = NIC.query.filter_by(machine_id=None).filter_by(reusable=True).first()
"Contact %s." % config.contact)
nic.machine = machine
nic.hostname = name
- session.save_or_update(nic)
- session.save_or_update(disk)
+ session.add(nic)
+ session.add(disk)
cache_acls.refreshMachine(machine)
makeDisks(machine)
session.commit()
for nic in machine.nics:
nic.machine_id = None
nic.hostname = None
- session.save_or_update(nic)
+ session.add(nic)
for disk in machine.disks:
session.delete(disk)
session.delete(machine)
machine_id=machine_id).machine
d = infoDict(cherrypy.request.login, cherrypy.request.state, machine)
return d
- index = list
+ index = info
@cherrypy.expose
@cherrypy.tools.mako(filename="/info.mako")
if hasattr(validate, 'contact'):
machine.contact = validate.contact
- session.save_or_update(machine)
+ session.add(machine)
session.commit()
except:
session.rollback()
if disk.size != disksize:
olddisk[disk.guest_device_name] = disksize
disk.size = disksize
- session.save_or_update(disk)
+ session.add(disk)
for diskname in olddisk:
controls.resizeDisk(oldname, diskname, str(olddisk[diskname]))
- session.save_or_update(machine)
+ session.add(machine)
session.commit()
except:
session.rollback()
n.hostname = validate.name
if hasattr(validate, 'name'):
controls.renameMachine(machine, oldname, validate.name)
- session.save_or_update(machine)
+ session.add(machine)
session.commit()
except:
session.rollback()
-- Peter A. Iannucci <iannucci@mit.edu> Mon, 20 May 2013 09:00:00 -0400
+invirt-web (0.1.31~dvorak427) precise; urgency=low
+
+ * More updates to fix api changes.
+
+ -- Steven Valdez <dvorak42@mit.edu> Mon, 29 Apr 2013 22:44:00 -0400
+
invirt-web (0.1.31~dvorak426) precise; urgency=low
* More sqlalchemy api fixes.