svn path=/trunk/web/; revision=165
machine)
name = testName(user, fields.getfirst('name'), machine)
oldname = machine.name
machine)
name = testName(user, fields.getfirst('name'), machine)
oldname = machine.name
olddisk = {}
memory = fields.getfirst('memory')
olddisk = {}
memory = fields.getfirst('memory')
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:
olddisk[disk.guest_device_name] = disk.size
olddisk[disk.guest_device_name] = disk.size
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.
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,
machine=machine)
return Template(file="command.tmpl", searchList=[d, global_dict])
machine=machine)
return Template(file="command.tmpl", searchList=[d, global_dict])