public ManagedObjectReference createPassiveNode_Task(PassiveNodeDeploymentSpec passiveDeploymentSpec, SourceNodeSpec sourceVcSpec) { 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)); } createPassiveNodeRequestType createPassiveNodeRequestType = new createPassiveNodeRequestType(); createPassiveNodeRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef); createPassiveNodeRequestType.passiveDeploymentSpec = (VimApi_65.PassiveNodeDeploymentSpec)VIConvert.ToWsdlType(passiveDeploymentSpec); createPassiveNodeRequestType.sourceVcSpec = (VimApi_65.SourceNodeSpec)VIConvert.ToWsdlType(sourceVcSpec); result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.createPassiveNode_Task(new createPassiveNode_TaskRequest(createPassiveNodeRequestType)).createPassiveNode_TaskResponse.returnval); } catch (FaultException ex) { throw FaultUtility.HandleFault(ex); } return(result); }
public void createPassiveNode(PassiveNodeDeploymentSpec passiveDeploymentSpec, SourceNodeSpec sourceVcSpec) { 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.createPassiveNode_Task(passiveDeploymentSpec, sourceVcSpec); this.Client.WaitForTask(taskReference); } catch (FaultException ex) { throw FaultUtility.HandleFault(ex); } }