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
Make not modifying the disks work.
[invirt/packages/invirt-web.git]
/
templates
/
main.py
diff --git
a/templates/main.py
b/templates/main.py
index
c708752
..
8e4c303
100755
(executable)
--- a/
templates/main.py
+++ b/
templates/main.py
@@
-614,6
+614,7
@@
def modify(user, fields):
machine)
name = testName(user, fields.getfirst('name'), machine)
oldname = machine.name
machine)
name = testName(user, fields.getfirst('name'), machine)
oldname = machine.name
+ command="modify"
olddisk = {}
memory = fields.getfirst('memory')
olddisk = {}
memory = fields.getfirst('memory')
@@
-627,9
+628,11
@@
def modify(user, fields):
disksize = testDisk(user, fields.getfirst('disk'))
if disksize is not None:
disksize = validDisk(user, disksize, machine)
disksize = testDisk(user, fields.getfirst('disk'))
if disksize is not None:
disksize = validDisk(user, disksize, machine)
+ else:
+ disksize = machine.disks[0].size
for disk in machine.disks:
for disk in machine.disks:
- disk.size = disksize
olddisk[disk.guest_device_name] = disk.size
olddisk[disk.guest_device_name] = disk.size
+ disk.size = disksize
ctx.current.save(disk)
# XXX all NICs get same hostname on change? Interface doesn't support more.
ctx.current.save(disk)
# XXX all NICs get same hostname on change? Interface doesn't support more.
@@
-655,7
+658,7
@@
def modify(user, fields):
if oldname != name:
remctl("web", "lvrename", oldname, disk.guest_device_name, name)
d = dict(user=user,
if oldname != name:
remctl("web", "lvrename", oldname, disk.guest_device_name, name)
d = dict(user=user,
- command="modify",
+ command=command,
machine=machine)
return Template(file="command.tmpl", searchList=[d, global_dict])
machine=machine)
return Template(file="command.tmpl", searchList=[d, global_dict])