public VStorageObject RelocateVStorageObject(ID id, ManagedObjectReference datastore, VslmRelocateSpec spec) { VStorageObject result; try { VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65); ManagedObjectReference taskReference = this.RelocateVStorageObject_Task(id, datastore, spec); result = (VStorageObject)this.Client.WaitForTask(taskReference); } catch (FaultException ex) { throw FaultUtility.HandleFault(ex); } return(result); }
public ManagedObjectReference RelocateVStorageObject_Task(ID id, ManagedObjectReference datastore, VslmRelocateSpec spec) { ManagedObjectReference result; try { VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65); RelocateVStorageObjectRequestType relocateVStorageObjectRequestType = new RelocateVStorageObjectRequestType(); relocateVStorageObjectRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef); relocateVStorageObjectRequestType.id = (VimApi_65.ID)VIConvert.ToWsdlType(id); relocateVStorageObjectRequestType.datastore = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datastore); relocateVStorageObjectRequestType.spec = (VimApi_65.VslmRelocateSpec)VIConvert.ToWsdlType(spec); result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.RelocateVStorageObject_Task(new RelocateVStorageObject_TaskRequest(relocateVStorageObjectRequestType)).RelocateVStorageObject_TaskResponse.returnval); } catch (FaultException ex) { throw FaultUtility.HandleFault(ex); } return(result); }