Set machine_access to be a private attribute of machine, so the acl is
authorEric Price <ecprice@mit.edu>
Fri, 6 Jun 2008 16:01:28 +0000 (12:01 -0400)
committerEric Price <ecprice@mit.edu>
Fri, 6 Jun 2008 16:01:28 +0000 (12:01 -0400)
deleted automatically when the machine is destroyed.

svn path=/trunk/packages/sipb-xen-database/; revision=589

sipb_xen_database/models.py

index 1090531..d3f1f6d 100644 (file)
@@ -103,7 +103,7 @@ assign_mapper(ctx, Machine, machine_table,
               properties={'nics': relation(NIC, backref="machine", lazy=False),
                           'disks': relation(Disk, backref="machine", lazy=False),
                           'type': relation(Type, lazy=False),
-                          'acl': relation(MachineAccess, backref="machine", lazy=False)});
+                          'acl': relation(MachineAccess, backref="machine", lazy=False, private=True)});
 assign_mapper(ctx, MachineAccess, machine_access_table)
 assign_mapper(ctx, NIC, nic_table)
 assign_mapper(ctx, Disk, disk_table)