Changeset 204 for trunk/packages
- Timestamp:
- Oct 19, 2007, 10:16:48 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-database/sipb-xen-database/sipb_xen_database/models.py
r168 r204 58 58 59 59 class Machine(object): 60 pass 60 def __repr__(self): 61 return "<Machine %s: name='%s' owner='%s'>" % (self.machine_id, self.name, self.owner) 61 62 62 63 class NIC(object): … … 66 67 self.ip = ip 67 68 self.hostname = hostname 69 def __repr__(self): 70 return "<NIC: mac='%s' machine='%s' ip='%s' hostname='%s'>" % (self.mac_addr, self.machine_id, self.ip, self.hostname) 68 71 69 72 class Disk(object): … … 72 75 self.guest_device_name = guest 73 76 self.size = size 77 def __repr__(self): 78 return "<Disk: machine=%s device=%s size=%s>" % (self.machine_id, self.guest_device_name, self.size) 74 79 75 80 class Type(object): 76 pass 81 def __repr__(self): 82 return "<Type %s: %s>" % (self.type_id, self.description) 77 83 78 84 class CDROM(object): … … 80 86 self.cdrom_id = cdrom_id 81 87 self.description = description 88 def __repr__(self): 89 return "<CDROM %s: %s>" % (self.cdrom_id, self.description) 82 90 83 91 assign_mapper(ctx, Machine, machine_table,
Note: See TracChangeset
for help on using the changeset viewer.