Skip to content

Commit a7b954b

Browse files
committed
fix: remove vdi_revert command uuid workaround
Remove workaround used to convert OpaqueRef received on `vdi_revert` commands as receiving this ref is now the expected behavior xapi-project/xen-api#7170 Signed-off-by: Antoine Bartuccio <antoine.bartuccio@vates.tech>
1 parent b99cfc2 commit a7b954b

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

drivers/SRCommand.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,10 @@ def _run(self, sr, target):
271271
return target.clone(self.params['sr_uuid'], self.vdi_uuid)
272272

273273
elif self.cmd == 'vdi_revert':
274-
dest_uuid = self.params['args'][0]
275-
if dest_uuid.startswith("OpaqueRef:"):
276-
# TODO(XCPNG-3486): remove once xapi sends an uuid instead of an OpaqueRef
277-
dest_uuid = sr.session.xenapi.VDI.get_record(dest_uuid)["uuid"]
278274
return target.revert(
279275
self.params['sr_uuid'],
280276
self.vdi_uuid,
281-
dest_uuid,
277+
sr.session.xenapi.VDI.get_record(self.params['args'][0])["uuid"],
282278
)
283279

284280
elif self.cmd == 'vdi_resize':

0 commit comments

Comments
 (0)