- remctl("web", "moveregister", oldname, name)
- for disk in machine.disks:
- # XXX all disks get the same size on change? Interface doesn't support more.
- if disk.size != olddisk[disk.guest_device_name]:
- remctl("web", "lvresize", oldname, disk.guest_device_name, str(disk.size))
- if oldname != name:
- remctl("web", "lvrename", oldname, disk.guest_device_name, name)
+ for diskname in olddisk:
+ remctl("web", "lvresize", oldname, diskname, str(olddisk[diskname]))
+ if name is not None and name != oldname:
+ for disk in machine.disks:
+ if oldname != name:
+ remctl("web", "lvrename", oldname, disk.guest_device_name, name)
+ remctl("web", "moveregister", oldname, name)