Rename disk to disk_size in some (but not all!) places
Added MachineAccess to __all__
svn path=/trunk/packages/sipb-xen-database/sipb-xen-database/; revision=243
+sipb-xen-database (10.2) unstable; urgency=low
+
+ * Add MachineAccess to __all__ so it can be imported
+ * Remove unnecessary constructors for database objects
+
+ -- Quentin Smith <quentin@sipb-xen-dev.mit.edu> Mon, 12 Nov 2007 04:53:47 -0500
+
sipb-xen-database (10.1) unstable; urgency=low
* Make sipb-xen-database-tables safer (don't default to drop_all)
sipb-xen-database (10.1) unstable; urgency=low
* Make sipb-xen-database-tables safer (don't default to drop_all)
__all__ = ['meta',
'ctx',
'machine_table',
__all__ = ['meta',
'ctx',
'machine_table',
+ 'machine_access_table',
'nic_table',
'disk_table',
'types_table',
'cdroms_table',
'Machine',
'nic_table',
'disk_table',
'types_table',
'cdroms_table',
'Machine',
return "<MachineAccess machine='%s' user='%s'>" % (self.machine, self.user)
class NIC(object):
return "<MachineAccess machine='%s' user='%s'>" % (self.machine, self.user)
class NIC(object):
- def __init__(self, machine_id, mac_addr, ip, hostname):
- self.machine_id = machine_id
- self.mac_addr = mac_addr
- self.ip = ip
- self.hostname = hostname
def __repr__(self):
return "<NIC: mac='%s' machine='%s' ip='%s' hostname='%s'>" % (self.mac_addr, self.machine_id, self.ip, self.hostname)
class Disk(object):
def __repr__(self):
return "<NIC: mac='%s' machine='%s' ip='%s' hostname='%s'>" % (self.mac_addr, self.machine_id, self.ip, self.hostname)
class Disk(object):
- def __init__(self, machine_id, guest, size):
- self.machine_id = machine_id
- self.guest_device_name = guest
- self.size = size
def __repr__(self):
return "<Disk: machine=%s device=%s size=%s>" % (self.machine_id, self.guest_device_name, self.size)
def __repr__(self):
return "<Disk: machine=%s device=%s size=%s>" % (self.machine_id, self.guest_device_name, self.size)
return "<Type %s: %s>" % (self.type_id, self.description)
class CDROM(object):
return "<Type %s: %s>" % (self.type_id, self.description)
class CDROM(object):
- def __init__(self, cdrom_id, description):
- self.cdrom_id = cdrom_id
- self.description = description
def __repr__(self):
return "<CDROM %s: %s>" % (self.cdrom_id, self.description)
def __repr__(self):
return "<CDROM %s: %s>" % (self.cdrom_id, self.description)