- def __init__(self, cdrom_id, description):
- self.cdrom_id = cdrom_id
- self.description = description
-
-assign_mapper(ctx, Machine, machine_table, \
- properties={'nics': relation(NIC),
- 'disks': relation(Disk),
- 'type': relation(Type)});
+ def __repr__(self):
+ return "<CDROM %s: %s>" % (self.cdrom_id, self.description)
+
+assign_mapper(ctx, Machine, machine_table,
+ properties={'nics': relation(NIC, backref="machine"),
+ 'disks': relation(Disk, backref="machine"),
+ 'type': relation(Type),
+ 'acl': relation(MachineAccess, backref="machine")});
+assign_mapper(ctx, MachineAccess, machine_access_table)