projects
/
invirt/packages/invirt-database.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nics primary key should be mac address, not hostname.
[invirt/packages/invirt-database.git]
/
sipb_xen_database
/
models.py
diff --git
a/sipb_xen_database/models.py
b/sipb_xen_database/models.py
index
cc4a7e9
..
4a6709e
100644
(file)
--- a/
sipb_xen_database/models.py
+++ b/
sipb_xen_database/models.py
@@
-31,9
+31,9
@@
machine_table = Table('machines', meta,
nic_table = Table('nics', meta,
Column('machine_id', Integer, ForeignKey('machines.machine_id'), nullable=True),
nic_table = Table('nics', meta,
Column('machine_id', Integer, ForeignKey('machines.machine_id'), nullable=True),
- Column('mac_addr', String, nullable=False),
+ Column('mac_addr', String, nullable=False, primary_key=True),
Column('ip', String, nullable=False),
Column('ip', String, nullable=False),
- Column('hostname', String, primary_key=True, nullable=False))
+ Column('hostname', String, nullable=True))
disk_table = Table('disks', meta,
Column('machine_id', Integer, ForeignKey('machines.machine_id'), nullable=False),
disk_table = Table('disks', meta,
Column('machine_id', Integer, ForeignKey('machines.machine_id'), nullable=False),