+
+@InstanceCheck(INST_UP, INST_UP, FIRST_ARG)
+def TestRapiInstanceReplaceDisks(instance):
+ """Test replacing instance disks via RAPI"""
+ if not IsDiskReplacingSupported(instance):
+ print qa_utils.FormatInfo("Instance doesn't support disk replacing,"
+ " skipping test")
+ return
+ fn = _rapi_client.ReplaceInstanceDisks
+ _WaitForRapiJob(fn(instance["name"],
+ mode=constants.REPLACE_DISK_AUTO, disks=[]))
+ _WaitForRapiJob(fn(instance["name"],
+ mode=constants.REPLACE_DISK_SEC, disks="0"))
+
+
+@InstanceCheck(INST_UP, INST_UP, FIRST_ARG)