Commit 4eef428e authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Jose A. Lopes

Fix a bug in InstanceSetParams concerning names

In case no name is passed in disk modifications we should
keep the old one. If name=none then set disk name to None.
Signed-off-by: default avatarDimitris Aragiorgis <>
Reviewed-by: default avatarJose A. Lopes <>
parent b4e8599b
...@@ -3154,14 +3154,13 @@ class LUInstanceSetParams(LogicalUnit): ...@@ -3154,14 +3154,13 @@ class LUInstanceSetParams(LogicalUnit):
""" """
changes = [] changes = []
mode = params.get(constants.IDISK_MODE, None) if constants.IDISK_MODE in params:
if mode: disk.mode = params.get(constants.IDISK_MODE)
disk.mode = mode
changes.append(("disk.mode/%d" % idx, disk.mode)) changes.append(("disk.mode/%d" % idx, disk.mode))
name = params.get(constants.IDISK_NAME, None) if constants.IDISK_NAME in params: = name = params.get(constants.IDISK_NAME)
changes.append(("" % idx, changes.append(("" % idx,
return changes return changes
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