public ManagedObjectReference configureVcha_Task(VchaClusterConfigSpec configSpec) { ManagedObjectReference result; try { if (this.Client.Version == VimVersion.Vim51) { throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion)); } if (this.Client.Version == VimVersion.Vim55) { throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion)); } if (this.Client.Version == VimVersion.Vim60) { throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion)); } configureVchaRequestType configureVchaRequestType = new configureVchaRequestType(); configureVchaRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef); configureVchaRequestType.configSpec = (VimApi_65.VchaClusterConfigSpec)VIConvert.ToWsdlType(configSpec); result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.configureVcha_Task(new configureVcha_TaskRequest(configureVchaRequestType)).configureVcha_TaskResponse.returnval); } catch (FaultException ex) { throw FaultUtility.HandleFault(ex); } return(result); }
public void configureVcha(VchaClusterConfigSpec configSpec) { try { if (this.Client.Version == VimVersion.Vim51) { throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion)); } if (this.Client.Version == VimVersion.Vim55) { throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion)); } if (this.Client.Version == VimVersion.Vim60) { throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion)); } ManagedObjectReference taskReference = this.configureVcha_Task(configSpec); this.Client.WaitForTask(taskReference); } catch (FaultException ex) { throw FaultUtility.HandleFault(ex); } }