Revision 4eef428e lib/cmdlib/instance.py

b/lib/cmdlib/instance.py
3154 3154

  
3155 3155
    """
3156 3156
    changes = []
3157
    mode = params.get(constants.IDISK_MODE, None)
3158
    if mode:
3159
      disk.mode = mode
3157
    if constants.IDISK_MODE in params:
3158
      disk.mode = params.get(constants.IDISK_MODE)
3160 3159
      changes.append(("disk.mode/%d" % idx, disk.mode))
3161 3160

  
3162
    name = params.get(constants.IDISK_NAME, None)
3163
    disk.name = name
3164
    changes.append(("disk.name/%d" % idx, disk.name))
3161
    if constants.IDISK_NAME in params:
3162
      disk.name = params.get(constants.IDISK_NAME)
3163
      changes.append(("disk.name/%d" % idx, disk.name))
3165 3164

  
3166 3165
    return changes
3167 3166

  

Also available in: Unified diff