Commit 2590d723 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

Support spindles in move-instance

The script was failing when exclusive storage was active (bug introduced in
7c848a6a

).
Signed-off-by: default avatarBernardo Dal Seno <bdalseno@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent 802ed2aa
......@@ -486,11 +486,17 @@ class MoveDestExecutor(object):
"""
disk_template = instance["disk_template"]
disks = [{
constants.IDISK_SIZE: i["size"],
constants.IDISK_MODE: i["mode"],
constants.IDISK_NAME: str(i.get("name")),
} for i in instance["disks"]]
disks = []
for idisk in instance["disks"]:
odisk = {
constants.IDISK_SIZE: idisk["size"],
constants.IDISK_MODE: idisk["mode"],
constants.IDISK_NAME: str(idisk.get("name")),
}
spindles = idisk.get("spindles")
if spindles is not None:
odisk[constants.IDISK_SPINDLES] = spindles
disks.append(odisk)
nics = [{
constants.INIC_IP: ip,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment