Revision 9e14897d lib/config.py
b/lib/config.py | ||
---|---|---|
1569 | 1569 |
inst = self._config_data.instances[inst_uuid] |
1570 | 1570 |
inst.name = new_name |
1571 | 1571 |
|
1572 |
for (idx, disk) in enumerate(inst.disks):
|
|
1572 |
for (_, disk) in enumerate(inst.disks):
|
|
1573 | 1573 |
if disk.dev_type in [constants.DT_FILE, constants.DT_SHARED_FILE]: |
1574 | 1574 |
# rename the file paths in logical and physical id |
1575 | 1575 |
file_storage_dir = os.path.dirname(os.path.dirname(disk.logical_id[1])) |
1576 | 1576 |
disk.logical_id = (disk.logical_id[0], |
1577 | 1577 |
utils.PathJoin(file_storage_dir, inst.name, |
1578 |
"disk%s" % idx))
|
|
1578 |
os.path.basename(disk.logical_id[1])))
|
|
1579 | 1579 |
disk.physical_id = disk.logical_id |
1580 | 1580 |
|
1581 | 1581 |
# Force update of ssconf files |
Also available in: Unified diff