Skip to content
Snippets Groups Projects
Commit b3230b32 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

gnt-group modify: Fix an update issue with diskparams


Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 302424e7
No related branches found
No related tags found
No related merge requests found
......@@ -13939,12 +13939,16 @@ class LUGroupSetParams(LogicalUnit):
 
if self.op.diskparams:
diskparams = self.group.diskparams
uavdp = self._UpdateAndVerifyDiskParams
# For each disktemplate subdict update and verify the values
new_diskparams = dict((dt,
self._UpdateAndVerifyDiskParams(diskparams[dt],
self.op.diskparams[dt]))
uavdp(diskparams.get(dt, {}),
self.op.diskparams[dt]))
for dt in constants.DISK_TEMPLATES
if dt in self.op.diskparams)
self.new_diskparams = objects.FillDiskParams(diskparams, new_diskparams)
# As we've all subdicts of diskparams ready, lets merge the actual
# dict with all updated subdicts
self.new_diskparams = objects.FillDict(diskparams, new_diskparams)
 
if self.op.hv_state:
self.new_hv_state = _MergeAndVerifyHvState(self.op.hv_state,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment