From 1153e195dfa9053fb722c58e27ca3dcc57c1664e Mon Sep 17 00:00:00 2001 From: Eric Price Date: Fri, 6 Jun 2008 12:01:28 -0400 Subject: [PATCH 1/1] Set machine_access to be a private attribute of machine, so the acl is deleted automatically when the machine is destroyed. svn path=/trunk/packages/sipb-xen-database/; revision=589 --- sipb_xen_database/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sipb_xen_database/models.py b/sipb_xen_database/models.py index 1090531..d3f1f6d 100644 --- a/sipb_xen_database/models.py +++ b/sipb_xen_database/models.py @@ -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) -- 1.7.9.5