projects
/
invirt/packages/invirt-web.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added nc
[invirt/packages/invirt-web.git]
/
code
/
controls.py
diff --git
a/code/controls.py
b/code/controls.py
index
a5f1693
..
0acca3a
100644
(file)
--- a/
code/controls.py
+++ b/
code/controls.py
@@
-94,7
+94,7
@@
def bootMachine(machine, cdtype):
raise CodeError('"%s" on "control %s create %s'
% (err, machine.name, cdtype))
raise CodeError('"%s" on "control %s create %s'
% (err, machine.name, cdtype))
-def createVm(username, state, owner, contact, name, description, memory, disksize, machine_type, cdrom, autoinstall):
+def createVm(username, state, owner, contact, name, description, memory, disksize, machine_type, nic_type, cdrom, autoinstall):
"""Create a VM and put it in the database"""
# put stuff in the table
session.begin()
"""Create a VM and put it in the database"""
# put stuff in the table
session.begin()
@@
-119,6
+119,7
@@
def createVm(username, state, owner, contact, name, description, memory, disksiz
"Contact %s." % config.contact)
nic.machine = machine
nic.hostname = name
"Contact %s." % config.contact)
nic.machine = machine
nic.hostname = name
+ nic.nic_type = nic_type
session.add(nic)
session.add(disk)
cache_acls.refreshMachine(machine)
session.add(nic)
session.add(disk)
cache_acls.refreshMachine(machine)