Revision 5275a77f tools/cfgupgrade

b/tools/cfgupgrade
173 173
  return ret
174 174

  
175 175

  
176
def RemovePhysicalId(disk):
177
  if "children" in disk:
178
    for d in disk["children"]:
179
      RemovePhysicalId(d)
180
  if "physical_id" in disk:
181
    del disk["physical_id"]
182

  
183

  
176 184
def UpgradeInstances(config_data):
177 185
  network2uuid = dict((n["name"], n["uuid"])
178 186
                      for n in config_data["networks"].values())
......
194 202
      raise Error("Instance '%s' doesn't have a disks entry?!" % instance)
195 203
    disks = iobj["disks"]
196 204
    for idx, dobj in enumerate(disks):
205
      RemovePhysicalId(dobj)
206

  
197 207
      expected = "disk/%s" % idx
198 208
      current = dobj.get("iv_name", "")
199 209
      if current != expected:

Also available in: Unified diff