public void ReconfigureComputeResource(ComputeResourceConfigSpec spec, bool modify)
 {
     try
     {
         ManagedObjectReference taskReference = this.ReconfigureComputeResource_Task(spec, modify);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
Exemplo n.º 2
0
        public ManagedObjectReference AddStandaloneHost(HostConnectSpec spec, ComputeResourceConfigSpec compResSpec, bool addConnected, string license)
        {
            ManagedObjectReference result;

            try
            {
                ManagedObjectReference taskReference = this.AddStandaloneHost_Task(spec, compResSpec, addConnected, license);
                result = (ManagedObjectReference)this.Client.WaitForTask(taskReference);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public ManagedObjectReference ReconfigureComputeResource_Task(ComputeResourceConfigSpec spec, bool modify)
        {
            ManagedObjectReference result;

            try
            {
                ReconfigureComputeResourceRequestType reconfigureComputeResourceRequestType = new ReconfigureComputeResourceRequestType();
                reconfigureComputeResourceRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                reconfigureComputeResourceRequestType.spec   = (VimApi_65.ComputeResourceConfigSpec)VIConvert.ToWsdlType(spec);
                reconfigureComputeResourceRequestType.modify = modify;
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ReconfigureComputeResource_Task(new ReconfigureComputeResource_TaskRequest(reconfigureComputeResourceRequestType)).ReconfigureComputeResource_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Exemplo n.º 4
0
        public ManagedObjectReference AddStandaloneHost_Task(HostConnectSpec spec, ComputeResourceConfigSpec compResSpec, bool addConnected, string license)
        {
            ManagedObjectReference result;

            try
            {
                AddStandaloneHostRequestType addStandaloneHostRequestType = new AddStandaloneHostRequestType();
                addStandaloneHostRequestType._this        = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                addStandaloneHostRequestType.spec         = (VimApi_65.HostConnectSpec)VIConvert.ToWsdlType(spec);
                addStandaloneHostRequestType.compResSpec  = (VimApi_65.ComputeResourceConfigSpec)VIConvert.ToWsdlType(compResSpec);
                addStandaloneHostRequestType.addConnected = addConnected;
                addStandaloneHostRequestType.license      = license;
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.AddStandaloneHost_Task(new AddStandaloneHost_TaskRequest(addStandaloneHostRequestType)).AddStandaloneHost_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }