X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/8e82f8a06885dd31effe9015467834fbbbc98f47..1da92cb8c769d7e9cdad595ffebe0ffa80b545d6:/templates/main.py?ds=sidebyside diff --git a/templates/main.py b/templates/main.py index c708752..8e4c303 100755 --- 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 + command="modify" 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) + else: + disksize = machine.disks[0].size for disk in machine.disks: - disk.size = disksize 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. @@ -655,7 +658,7 @@ def modify(user, fields): 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])