public ManagedObjectReference PerformVsanUpgrade_Task(ManagedObjectReference cluster, bool?performObjectUpgrade, bool?downgradeFormat, bool?allowReducedRedundancy, ManagedObjectReference[] excludeHosts)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
                PerformVsanUpgradeRequestType performVsanUpgradeRequestType = new PerformVsanUpgradeRequestType();
                performVsanUpgradeRequestType._this   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                performVsanUpgradeRequestType.cluster = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(cluster);
                performVsanUpgradeRequestType.performObjectUpgrade          = performObjectUpgrade.GetValueOrDefault();
                performVsanUpgradeRequestType.performObjectUpgradeSpecified = performObjectUpgrade.HasValue;
                performVsanUpgradeRequestType.downgradeFormat                 = downgradeFormat.GetValueOrDefault();
                performVsanUpgradeRequestType.downgradeFormatSpecified        = downgradeFormat.HasValue;
                performVsanUpgradeRequestType.allowReducedRedundancy          = allowReducedRedundancy.GetValueOrDefault();
                performVsanUpgradeRequestType.allowReducedRedundancySpecified = allowReducedRedundancy.HasValue;
                performVsanUpgradeRequestType.excludeHosts = (VimApi_65.ManagedObjectReference[])VIConvert.ToWsdlType(excludeHosts);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.PerformVsanUpgrade_Task(new PerformVsanUpgrade_TaskRequest(performVsanUpgradeRequestType)).PerformVsanUpgrade_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
示例#2
0
        public GuestListFileInfo ListFilesInGuest(ManagedObjectReference vm, GuestAuthentication auth, string filePath, int?index, int?maxResults, string matchPattern)
        {
            GuestListFileInfo result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
                ListFilesInGuestRequestType listFilesInGuestRequestType = new ListFilesInGuestRequestType();
                listFilesInGuestRequestType._this               = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                listFilesInGuestRequestType.vm                  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(vm);
                listFilesInGuestRequestType.auth                = (VimApi_65.GuestAuthentication)VIConvert.ToWsdlType(auth);
                listFilesInGuestRequestType.filePath            = filePath;
                listFilesInGuestRequestType.index               = index.GetValueOrDefault();
                listFilesInGuestRequestType.indexSpecified      = index.HasValue;
                listFilesInGuestRequestType.maxResults          = maxResults.GetValueOrDefault();
                listFilesInGuestRequestType.maxResultsSpecified = maxResults.HasValue;
                listFilesInGuestRequestType.matchPattern        = matchPattern;
                result = (GuestListFileInfo)VIConvert.ToVim(this.VimServiceProxy.ListFilesInGuest(new ListFilesInGuestRequest(listFilesInGuestRequestType)).ListFilesInGuestResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
 public void EagerZeroVirtualDisk(string name, ManagedObjectReference datacenter)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.EagerZeroVirtualDisk_Task(name, datacenter);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#4
0
 public void PowerOffVApp(bool force)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.PowerOffVApp_Task(force);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void ReconcileDatastoreInventory(ManagedObjectReference datastore)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         ManagedObjectReference taskReference = this.ReconcileDatastoreInventory_Task(datastore);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#6
0
 public void ImportCertificateForCAM(string certPath, string camServer)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         ManagedObjectReference taskReference = this.ImportCertificateForCAM_Task(certPath, camServer);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#7
0
 public void JoinDomain(string domainName, string userName, string password)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim41);
         ManagedObjectReference taskReference = this.JoinDomain_Task(domainName, userName, password);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void ReconfigureDVPortgroup(DVPortgroupConfigSpec spec)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.ReconfigureDVPortgroup_Task(spec);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#9
0
 public void PerformDvsProductSpecOperation(string operation, DistributedVirtualSwitchProductSpec productSpec)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.PerformDvsProductSpecOperation_Task(operation, productSpec);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void UninstallIoFilter(string filterId, ManagedObjectReference compRes)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
         ManagedObjectReference taskReference = this.UninstallIoFilter_Task(filterId, compRes);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void ResolveInstallationErrorsOnCluster(string filterId, ManagedObjectReference cluster)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
         ManagedObjectReference taskReference = this.ResolveInstallationErrorsOnCluster_Task(filterId, cluster);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#12
0
 public void ConfigureHostCache(HostCacheConfigurationSpec spec)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         ManagedObjectReference taskReference = this.ConfigureHostCache_Task(spec);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void ConfigureDatastoreIORM(ManagedObjectReference datastore, StorageIORMConfigSpec spec)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim41);
         ManagedObjectReference taskReference = this.ConfigureDatastoreIORM_Task(datastore, spec);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void ConfigureStorageDrsForPod(ManagedObjectReference pod, StorageDrsConfigSpec spec, bool modify)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         ManagedObjectReference taskReference = this.ConfigureStorageDrsForPod_Task(pod, spec, modify);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void UpdateDVSLacpGroupConfig(VMwareDvsLacpGroupSpec[] lacpGroupSpec)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim55);
         ManagedObjectReference taskReference = this.UpdateDVSLacpGroupConfig_Task(lacpGroupSpec);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#16
0
 public void EvacuateVsanNode(HostMaintenanceSpec maintenanceSpec, int timeout)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
         ManagedObjectReference taskReference = this.EvacuateVsanNode_Task(maintenanceSpec, timeout);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#17
0
 public void RecommissionVsanNode()
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
         ManagedObjectReference taskReference = this.RecommissionVsanNode_Task();
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#18
0
 public void MergeDvs(ManagedObjectReference dvs)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.MergeDvs_Task(dvs);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#19
0
 public void LeaveCurrentDomain(bool force)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim41);
         ManagedObjectReference taskReference = this.LeaveCurrentDomain_Task(force);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#20
0
 public void MoveDVPort(string[] portKey, string destinationPortgroupKey)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.MoveDVPort_Task(portKey, destinationPortgroupKey);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#21
0
 public void JoinDomainWithCAM(string domainName, string camServer)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         ManagedObjectReference taskReference = this.JoinDomainWithCAM_Task(domainName, camServer);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#22
0
 public void RectifyDvsHost(ManagedObjectReference[] hosts)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.RectifyDvsHost_Task(hosts);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void DeleteVStorageObject(ID id, ManagedObjectReference datastore)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         ManagedObjectReference taskReference = this.DeleteVStorageObject_Task(id, datastore);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#24
0
 public void DvsReconfigureVmVnicNetworkResourcePool(DvsVmVnicResourcePoolConfigSpec[] configSpec)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
         ManagedObjectReference taskReference = this.DvsReconfigureVmVnicNetworkResourcePool_Task(configSpec);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void ExtendDisk(ID id, ManagedObjectReference datastore, long newCapacityInMB)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         ManagedObjectReference taskReference = this.ExtendDisk_Task(id, datastore, newCapacityInMB);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#26
0
 public void UpdateDVSHealthCheckConfig(DVSHealthCheckConfig[] healthCheckConfig)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim51);
         ManagedObjectReference taskReference = this.UpdateDVSHealthCheckConfig_Task(healthCheckConfig);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void DatastoreExitMaintenanceMode()
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         ManagedObjectReference taskReference = this.DatastoreExitMaintenanceMode_Task();
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#28
0
 public void StampAllRulesWithUuid()
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
         ManagedObjectReference taskReference = this.StampAllRulesWithUuid_Task();
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#29
0
 public void unregisterVApp()
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.unregisterVApp_Task();
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#30
0
 public void UpdateVsan(VsanHostConfigInfo config)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim55);
         ManagedObjectReference taskReference = this.UpdateVsan_Task(config);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }