コード例 #1
0
        public HostPatchManagerResult QueryHostPatch(HostPatchManagerPatchManagerOperationSpec spec)
        {
            HostPatchManagerResult result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                ManagedObjectReference taskReference = this.QueryHostPatch_Task(spec);
                result = (HostPatchManagerResult)this.Client.WaitForTask(taskReference);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
コード例 #2
0
        public ManagedObjectReference QueryHostPatch_Task(HostPatchManagerPatchManagerOperationSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                QueryHostPatchRequestType queryHostPatchRequestType = new QueryHostPatchRequestType();
                queryHostPatchRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                queryHostPatchRequestType.spec  = (VimApi_65.HostPatchManagerPatchManagerOperationSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.QueryHostPatch_Task(new QueryHostPatch_TaskRequest(queryHostPatchRequestType)).QueryHostPatch_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
コード例 #3
0
        public ManagedObjectReference UninstallHostPatch_Task(string[] bulletinIds, HostPatchManagerPatchManagerOperationSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                UninstallHostPatchRequestType uninstallHostPatchRequestType = new UninstallHostPatchRequestType();
                uninstallHostPatchRequestType._this       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                uninstallHostPatchRequestType.bulletinIds = bulletinIds;
                uninstallHostPatchRequestType.spec        = (VimApi_65.HostPatchManagerPatchManagerOperationSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.UninstallHostPatch_Task(new UninstallHostPatch_TaskRequest(uninstallHostPatchRequestType)).UninstallHostPatch_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
コード例 #4
0
        public ManagedObjectReference ScanHostPatchV2_Task(string[] metaUrls, string[] bundleUrls, HostPatchManagerPatchManagerOperationSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                ScanHostPatchV2RequestType scanHostPatchV2RequestType = new ScanHostPatchV2RequestType();
                scanHostPatchV2RequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                scanHostPatchV2RequestType.metaUrls   = metaUrls;
                scanHostPatchV2RequestType.bundleUrls = bundleUrls;
                scanHostPatchV2RequestType.spec       = (VimApi_65.HostPatchManagerPatchManagerOperationSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ScanHostPatchV2_Task(new ScanHostPatchV2_TaskRequest(scanHostPatchV2RequestType)).ScanHostPatchV2_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
コード例 #5
0
        public HostPatchManagerResult InstallHostPatchV2(string[] metaUrls, string[] bundleUrls, string[] vibUrls, HostPatchManagerPatchManagerOperationSpec spec)
        {
            HostPatchManagerResult result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                ManagedObjectReference taskReference = this.InstallHostPatchV2_Task(metaUrls, bundleUrls, vibUrls, spec);
                result = (HostPatchManagerResult)this.Client.WaitForTask(taskReference);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }