Ejemplo n.º 1
0
 public void ReconnectHost(HostConnectSpec cnxSpec, HostSystemReconnectSpec reconnectSpec)
 {
     try
     {
         ManagedObjectReference taskReference = this.ReconnectHost_Task(cnxSpec, reconnectSpec);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
Ejemplo n.º 2
0
        public ManagedObjectReference ReconnectHost_Task(HostConnectSpec cnxSpec, HostSystemReconnectSpec reconnectSpec)
        {
            ManagedObjectReference result;

            try
            {
                ReconnectHostRequestType reconnectHostRequestType = new ReconnectHostRequestType();
                reconnectHostRequestType._this         = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                reconnectHostRequestType.cnxSpec       = (VimApi_65.HostConnectSpec)VIConvert.ToWsdlType(cnxSpec);
                reconnectHostRequestType.reconnectSpec = (VimApi_65.HostSystemReconnectSpec)VIConvert.ToWsdlType(reconnectSpec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ReconnectHost_Task(new ReconnectHost_TaskRequest(reconnectHostRequestType)).ReconnectHost_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }