public StorageIORMConfigOption QueryIORMConfigOption(ManagedObjectReference host)
        {
            StorageIORMConfigOption result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim41);
                QueryIORMConfigOptionRequestType queryIORMConfigOptionRequestType = new QueryIORMConfigOptionRequestType();
                queryIORMConfigOptionRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                queryIORMConfigOptionRequestType.host  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                result = (StorageIORMConfigOption)VIConvert.ToVim(this.VimServiceProxy.QueryIORMConfigOption(new QueryIORMConfigOptionRequest(queryIORMConfigOptionRequestType)).QueryIORMConfigOptionResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 2
0
 public void UpdateHostImageAcceptanceLevel(string newAcceptanceLevel)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         UpdateHostImageAcceptanceLevelRequestType updateHostImageAcceptanceLevelRequestType = new UpdateHostImageAcceptanceLevelRequestType();
         updateHostImageAcceptanceLevelRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updateHostImageAcceptanceLevelRequestType.newAcceptanceLevel = newAcceptanceLevel;
         this.VimServiceProxy.UpdateHostImageAcceptanceLevel(new UpdateHostImageAcceptanceLevelRequest(updateHostImageAcceptanceLevelRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public HostSpecification RetrieveHostSpecification(ManagedObjectReference host, bool fromHost)
        {
            HostSpecification result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
                RetrieveHostSpecificationRequestType retrieveHostSpecificationRequestType = new RetrieveHostSpecificationRequestType();
                retrieveHostSpecificationRequestType._this    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                retrieveHostSpecificationRequestType.host     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                retrieveHostSpecificationRequestType.fromHost = fromHost;
                result = (HostSpecification)VIConvert.ToVim(this.VimServiceProxy.RetrieveHostSpecification(new RetrieveHostSpecificationRequest(retrieveHostSpecificationRequestType)).RetrieveHostSpecificationResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 4
0
        public VirtualNicManagerNetConfig QueryNetConfig(string nicType)
        {
            VirtualNicManagerNetConfig result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                QueryNetConfigRequestType queryNetConfigRequestType = new QueryNetConfigRequestType();
                queryNetConfigRequestType._this   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                queryNetConfigRequestType.nicType = nicType;
                result = (VirtualNicManagerNetConfig)VIConvert.ToVim(this.VimServiceProxy.QueryNetConfig(new QueryNetConfigRequest(queryNetConfigRequestType)).QueryNetConfigResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 5
0
        public string HostImageConfigGetAcceptance()
        {
            string returnval;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
                HostImageConfigGetAcceptanceRequestType hostImageConfigGetAcceptanceRequestType = new HostImageConfigGetAcceptanceRequestType();
                hostImageConfigGetAcceptanceRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                returnval = this.VimServiceProxy.HostImageConfigGetAcceptance(new HostImageConfigGetAcceptanceRequest(hostImageConfigGetAcceptanceRequestType)).HostImageConfigGetAcceptanceResponse.returnval;
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(returnval);
        }
Ejemplo n.º 6
0
        public ManagedObjectReference CreateCollectorForEvents(EventFilterSpec filter)
        {
            ManagedObjectReference result;

            try
            {
                CreateCollectorForEventsRequestType createCollectorForEventsRequestType = new CreateCollectorForEventsRequestType();
                createCollectorForEventsRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createCollectorForEventsRequestType.filter = (VimApi_65.EventFilterSpec)VIConvert.ToWsdlType(filter);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CreateCollectorForEvents(new CreateCollectorForEventsRequest(createCollectorForEventsRequestType)).CreateCollectorForEventsResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 7
0
        public ManagedObjectReference CheckProfileCompliance_Task(ManagedObjectReference[] entity)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                CheckProfileComplianceRequestType checkProfileComplianceRequestType = new CheckProfileComplianceRequestType();
                checkProfileComplianceRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                checkProfileComplianceRequestType.entity = (VimApi_65.ManagedObjectReference[])VIConvert.ToWsdlType(entity);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CheckProfileCompliance_Task(new CheckProfileCompliance_TaskRequest(checkProfileComplianceRequestType)).CheckProfileCompliance_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 8
0
 public void ReconfigureSnmpAgent(HostSnmpConfigSpec spec)
 {
     try
     {
         ReconfigureSnmpAgentRequestType reconfigureSnmpAgentRequestType = new ReconfigureSnmpAgentRequestType();
         reconfigureSnmpAgentRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         reconfigureSnmpAgentRequestType.spec  = (VimApi_65.HostSnmpConfigSpec)VIConvert.ToWsdlType(spec);
         this.VimServiceProxy.ReconfigureSnmpAgent(new ReconfigureSnmpAgentRequest(reconfigureSnmpAgentRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
Ejemplo n.º 9
0
 public void SendTestNotification()
 {
     try
     {
         SendTestNotificationRequestType sendTestNotificationRequestType = new SendTestNotificationRequestType();
         sendTestNotificationRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         this.VimServiceProxy.SendTestNotification(new SendTestNotificationRequest(sendTestNotificationRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
Ejemplo n.º 10
0
        public ProfileExecuteResult ExecuteHostProfile(ManagedObjectReference host, ProfileDeferredPolicyOptionParameter[] deferredParam)
        {
            ProfileExecuteResult result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                ExecuteHostProfileRequestType executeHostProfileRequestType = new ExecuteHostProfileRequestType();
                executeHostProfileRequestType._this         = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                executeHostProfileRequestType.host          = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                executeHostProfileRequestType.deferredParam = (VimApi_65.ProfileDeferredPolicyOptionParameter[])VIConvert.ToWsdlType(deferredParam);
                result = (ProfileExecuteResult)VIConvert.ToVim(this.VimServiceProxy.ExecuteHostProfile(new ExecuteHostProfileRequest(executeHostProfileRequestType)).ExecuteHostProfileResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 11
0
        public TaskInfo CreateTask(ManagedObjectReference obj, string taskTypeId, string initiatedBy, bool cancelable, string parentTaskKey, string activationId)
        {
            TaskInfo result;

            try
            {
                CreateTaskRequestType createTaskRequestType = new CreateTaskRequestType();
                createTaskRequestType._this         = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createTaskRequestType.obj           = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(obj);
                createTaskRequestType.taskTypeId    = taskTypeId;
                createTaskRequestType.initiatedBy   = initiatedBy;
                createTaskRequestType.cancelable    = cancelable;
                createTaskRequestType.parentTaskKey = parentTaskKey;
                createTaskRequestType.activationId  = activationId;
                result = (TaskInfo)VIConvert.ToVim(this.VimServiceProxy.CreateTask(new CreateTaskRequest(createTaskRequestType)).CreateTaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 12
0
 public void UpdateHostProfile(HostProfileConfigSpec config)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         UpdateHostProfileRequestType updateHostProfileRequestType = new UpdateHostProfileRequestType();
         updateHostProfileRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updateHostProfileRequestType.config = (VimApi_65.HostProfileConfigSpec)VIConvert.ToWsdlType(config);
         this.VimServiceProxy.UpdateHostProfile(new UpdateHostProfileRequest(updateHostProfileRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public ManagedObjectReference ApplyStorageDrsRecommendationToPod_Task(ManagedObjectReference pod, string key)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
                ApplyStorageDrsRecommendationToPodRequestType applyStorageDrsRecommendationToPodRequestType = new ApplyStorageDrsRecommendationToPodRequestType();
                applyStorageDrsRecommendationToPodRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                applyStorageDrsRecommendationToPodRequestType.pod   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(pod);
                applyStorageDrsRecommendationToPodRequestType.key   = key;
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ApplyStorageDrsRecommendationToPod_Task(new ApplyStorageDrsRecommendationToPod_TaskRequest(applyStorageDrsRecommendationToPodRequestType)).ApplyStorageDrsRecommendationToPod_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
 public StoragePerformanceSummary[] QueryDatastorePerformanceSummary(ManagedObjectReference datastore)
 {
     StoragePerformanceSummary[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim51);
         QueryDatastorePerformanceSummaryRequestType queryDatastorePerformanceSummaryRequestType = new QueryDatastorePerformanceSummaryRequestType();
         queryDatastorePerformanceSummaryRequestType._this     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         queryDatastorePerformanceSummaryRequestType.datastore = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datastore);
         result = (StoragePerformanceSummary[])VIConvert.ToVim(this.VimServiceProxy.QueryDatastorePerformanceSummary(new QueryDatastorePerformanceSummaryRequest(queryDatastorePerformanceSummaryRequestType)).QueryDatastorePerformanceSummaryResponse1);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
Ejemplo n.º 15
0
        public long LookupVmOverheadMemory(ManagedObjectReference vm, ManagedObjectReference host)
        {
            long returnval;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
                LookupVmOverheadMemoryRequestType lookupVmOverheadMemoryRequestType = new LookupVmOverheadMemoryRequestType();
                lookupVmOverheadMemoryRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                lookupVmOverheadMemoryRequestType.vm    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(vm);
                lookupVmOverheadMemoryRequestType.host  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                returnval = this.VimServiceProxy.LookupVmOverheadMemory(new LookupVmOverheadMemoryRequest(lookupVmOverheadMemoryRequestType)).LookupVmOverheadMemoryResponse.returnval;
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(returnval);
        }
Ejemplo n.º 16
0
        public ManagedObjectReference ConfigureHostCache_Task(HostCacheConfigurationSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
                ConfigureHostCacheRequestType configureHostCacheRequestType = new ConfigureHostCacheRequestType();
                configureHostCacheRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                configureHostCacheRequestType.spec  = (VimApi_65.HostCacheConfigurationSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ConfigureHostCache_Task(new ConfigureHostCache_TaskRequest(configureHostCacheRequestType)).ConfigureHostCache_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 17
0
 public EventArgDesc[] RetrieveArgumentDescription(string eventTypeId)
 {
     EventArgDesc[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         RetrieveArgumentDescriptionRequestType retrieveArgumentDescriptionRequestType = new RetrieveArgumentDescriptionRequestType();
         retrieveArgumentDescriptionRequestType._this       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         retrieveArgumentDescriptionRequestType.eventTypeId = eventTypeId;
         result = (EventArgDesc[])VIConvert.ToVim(this.VimServiceProxy.RetrieveArgumentDescription(new RetrieveArgumentDescriptionRequest(retrieveArgumentDescriptionRequestType)).RetrieveArgumentDescriptionResponse1);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
        public ManagedObjectReference createWitnessNode_Task(NodeDeploymentSpec witnessDeploymentSpec, 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));
                }
                createWitnessNodeRequestType createWitnessNodeRequestType = new createWitnessNodeRequestType();
                createWitnessNodeRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createWitnessNodeRequestType.witnessDeploymentSpec = (VimApi_65.NodeDeploymentSpec)VIConvert.ToWsdlType(witnessDeploymentSpec);
                createWitnessNodeRequestType.sourceVcSpec          = (VimApi_65.SourceNodeSpec)VIConvert.ToWsdlType(sourceVcSpec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.createWitnessNode_Task(new createWitnessNode_TaskRequest(createWitnessNodeRequestType)).createWitnessNode_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 19
0
 public void DissociateProfile(ManagedObjectReference[] entity)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         DissociateProfileRequestType dissociateProfileRequestType = new DissociateProfileRequestType();
         dissociateProfileRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         dissociateProfileRequestType.entity = (VimApi_65.ManagedObjectReference[])VIConvert.ToWsdlType(entity);
         this.VimServiceProxy.DissociateProfile(new DissociateProfileRequest(dissociateProfileRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public ManagedObjectReference deployVcha_Task(VchaClusterDeploymentSpec deploymentSpec)
        {
            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));
                }
                deployVchaRequestType deployVchaRequestType = new deployVchaRequestType();
                deployVchaRequestType._this          = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                deployVchaRequestType.deploymentSpec = (VimApi_65.VchaClusterDeploymentSpec)VIConvert.ToWsdlType(deploymentSpec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.deployVcha_Task(new deployVcha_TaskRequest(deployVchaRequestType)).deployVcha_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 21
0
        public ProfileDescription RetrieveDescription()
        {
            ProfileDescription result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
                RetrieveDescriptionRequestType retrieveDescriptionRequestType = new RetrieveDescriptionRequestType();
                retrieveDescriptionRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                result = (ProfileDescription)VIConvert.ToVim(this.VimServiceProxy.RetrieveDescription(new RetrieveDescriptionRequest(retrieveDescriptionRequestType)).RetrieveDescriptionResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 22
0
 public void UpdateProgress(int percentDone)
 {
     try
     {
         UpdateProgressRequestType updateProgressRequestType = new UpdateProgressRequestType();
         updateProgressRequestType._this       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updateProgressRequestType.percentDone = percentDone;
         this.VimServiceProxy.UpdateProgress(new UpdateProgressRequest(updateProgressRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
Ejemplo n.º 23
0
 public void DeselectVnicForNicType(string nicType, string device)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         DeselectVnicForNicTypeRequestType deselectVnicForNicTypeRequestType = new DeselectVnicForNicTypeRequestType();
         deselectVnicForNicTypeRequestType._this   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         deselectVnicForNicTypeRequestType.nicType = nicType;
         deselectVnicForNicTypeRequestType.device  = device;
         this.VimServiceProxy.DeselectVnicForNicType(new DeselectVnicForNicTypeRequest(deselectVnicForNicTypeRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
Ejemplo n.º 24
0
 public void SetTaskDescription(LocalizableMessage description)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         SetTaskDescriptionRequestType setTaskDescriptionRequestType = new SetTaskDescriptionRequestType();
         setTaskDescriptionRequestType._this       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         setTaskDescriptionRequestType.description = (VimApi_65.LocalizableMessage)VIConvert.ToWsdlType(description);
         this.VimServiceProxy.SetTaskDescription(new SetTaskDescriptionRequest(setTaskDescriptionRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
Ejemplo n.º 25
0
        public HostImageProfileSummary HostImageConfigGetProfile()
        {
            HostImageProfileSummary result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
                HostImageConfigGetProfileRequestType hostImageConfigGetProfileRequestType = new HostImageConfigGetProfileRequestType();
                hostImageConfigGetProfileRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                result = (HostImageProfileSummary)VIConvert.ToVim(this.VimServiceProxy.HostImageConfigGetProfile(new HostImageConfigGetProfileRequest(hostImageConfigGetProfileRequestType)).HostImageConfigGetProfileResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
 public void ConfigurePowerPolicy(int key)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim41);
         ConfigurePowerPolicyRequestType configurePowerPolicyRequestType = new ConfigurePowerPolicyRequestType();
         configurePowerPolicyRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         configurePowerPolicyRequestType.key   = key;
         this.VimServiceProxy.ConfigurePowerPolicy(new ConfigurePowerPolicyRequest(configurePowerPolicyRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
Ejemplo n.º 27
0
 public SoftwarePackage[] fetchSoftwarePackages()
 {
     SoftwarePackage[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         fetchSoftwarePackagesRequestType fetchSoftwarePackagesRequestType = new fetchSoftwarePackagesRequestType();
         fetchSoftwarePackagesRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         result = (SoftwarePackage[])VIConvert.ToVim(this.VimServiceProxy.fetchSoftwarePackages(new fetchSoftwarePackagesRequest(fetchSoftwarePackagesRequestType)).fetchSoftwarePackagesResponse1);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
Ejemplo n.º 28
0
        public DatabaseSizeEstimate EstimateDatabaseSize(DatabaseSizeParam dbSizeParam)
        {
            DatabaseSizeEstimate result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                EstimateDatabaseSizeRequestType estimateDatabaseSizeRequestType = new EstimateDatabaseSizeRequestType();
                estimateDatabaseSizeRequestType._this       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                estimateDatabaseSizeRequestType.dbSizeParam = (VimApi_65.DatabaseSizeParam)VIConvert.ToWsdlType(dbSizeParam);
                result = (DatabaseSizeEstimate)VIConvert.ToVim(this.VimServiceProxy.EstimateDatabaseSize(new EstimateDatabaseSizeRequest(estimateDatabaseSizeRequestType)).EstimateDatabaseSizeResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
 public void DeleteHostSpecification(ManagedObjectReference host)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         DeleteHostSpecificationRequestType deleteHostSpecificationRequestType = new DeleteHostSpecificationRequestType();
         deleteHostSpecificationRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         deleteHostSpecificationRequestType.host  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
         this.VimServiceProxy.DeleteHostSpecification(new DeleteHostSpecificationRequest(deleteHostSpecificationRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public StoragePlacementResult RecommendDatastores(StoragePlacementSpec storageSpec)
        {
            StoragePlacementResult result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
                RecommendDatastoresRequestType recommendDatastoresRequestType = new RecommendDatastoresRequestType();
                recommendDatastoresRequestType._this       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                recommendDatastoresRequestType.storageSpec = (VimApi_65.StoragePlacementSpec)VIConvert.ToWsdlType(storageSpec);
                result = (StoragePlacementResult)VIConvert.ToVim(this.VimServiceProxy.RecommendDatastores(new RecommendDatastoresRequest(recommendDatastoresRequestType)).RecommendDatastoresResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }