Revision 117899a7 test/py/cfgupgrade_unittest.py

b/test/py/cfgupgrade_unittest.py
394 394
    newconf = self._LoadConfig()
395 395

  
396 396
    # downgrade from 2.10 to 2.9 does not add physical_id to disks, which is ok
397
    # TODO (2.11): Remove this code, it's not required to downgrade from 2.11
398
    #              to 2.10
399
    def RemovePhysicalId(disk):
400
      if "children" in disk:
401
        for d in disk["children"]:
402
          RemovePhysicalId(d)
403
      if "physical_id" in disk:
404
        del disk["physical_id"]
405

  
397 406
    for inst in oldconf["instances"].values():
398 407
      for disk in inst["disks"]:
399
        del disk["physical_id"]
408
        RemovePhysicalId(disk)
400 409

  
401 410
    self.assertEqual(oldconf, newconf)
402 411

  

Also available in: Unified diff