nic_table = Table('nics', meta,
Column('machine_id', Integer, ForeignKey('machines.machine_id'), nullable=True),
Column('mac_addr', String, nullable=False, primary_key=True),
- Column('ip', String, nullable=False),
+ Column('ip', String, nullable=False, unique=True),
Column('hostname', String, nullable=True))
disk_table = Table('disks', meta,
pass
class NIC(object):
- pass
+ 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
class Disk(object):
pass