public void DestroyProfile()
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         DestroyProfileRequestType destroyProfileRequestType = new DestroyProfileRequestType();
         destroyProfileRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         this.VimServiceProxy.DestroyProfile(new DestroyProfileRequest(destroyProfileRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#2
0
        /* private static readonly string VIMSERVICE_VERSIONSXML_URL = "sdk/vimServiceVersions.xml";
         * private static readonly string VIMSERVICE_WSDL_URL = "sdk/vimService?wsdl";
         * internal static string GetVIServerTNS(string serviceUrl)
         * {
         *      return "urn:vim25";
         * }
         * internal static Dictionary<string, string> GetVIServerSupportedVersions(string serviceUrl)
         * {
         *      if (serviceUrl == null)
         *      {
         *              throw new ArgumentNullException(Resources.InvalidServiceUrl);
         *      }
         *      Dictionary<string, string> dictionary = new Dictionary<string, string>();
         *      Uri uri = new Uri(serviceUrl);
         *      Uri uri2 = new Uri(new Uri(uri.GetLeftPart(UriPartial.Authority)), VersionUtils.VIMSERVICE_VERSIONSXML_URL);
         *      XmlTextReader xmlTextReader = new XmlTextReader(uri2.ToString());
         *      xmlTextReader.WhitespaceHandling = WhitespaceHandling.None;
         *      try
         *      {
         *              while (xmlTextReader.ReadToFollowing("namespace"))
         *              {
         *                      xmlTextReader.ReadStartElement("namespace");
         *                      xmlTextReader.ReadStartElement("name");
         *                      string key = xmlTextReader.ReadString();
         *                      xmlTextReader.ReadEndElement();
         *                      xmlTextReader.ReadStartElement("version");
         *                      string value = xmlTextReader.ReadString();
         *                      xmlTextReader.ReadEndElement();
         *                      dictionary.Add(key, value);
         *              }
         *              xmlTextReader.Close();
         *      }
         *      catch (WebException)
         *      {
         *      }
         *      return dictionary;
         * }
         * internal static VimVersion GetVIServerVersion(string serviceUrl)
         * {
         *      Dictionary<string, string> vIServerSupportedVersions = VersionUtils.GetVIServerSupportedVersions(serviceUrl);
         *      string vIServerTNS = VersionUtils.GetVIServerTNS(serviceUrl);
         *      VimVersion result;
         *      if (vIServerSupportedVersions.ContainsKey(vIServerTNS))
         *      {
         *              result = VersionUtils.GetVersionFromApi(vIServerSupportedVersions[vIServerTNS]);
         *      }
         *      else
         *      {
         *              result = VersionUtils.GetVersionFromTNS(vIServerTNS);
         *      }
         *      return result;
         * }
         * internal static string GetVimServiceTNS(VimVersion ver)
         * {
         *      return "urn:vim25";
         * }
         * internal static Type GetVimServiceType(VimVersion ver)
         * {
         *      return typeof(VimService);
         * }
         * internal static Type GetVimType(string typeName, VimVersion ver)
         * {
         *      Assembly assembly = typeof(VimApi_65.ManagedObjectReference).Assembly;
         *      typeName = "VimApi_65." + typeName;
         *      return assembly.GetType(typeName, false);
         * }
         * internal static VimVersion GetVersionFromTNS(string tns)
         * {
         *      if (tns.Equals("urn:vim25"))
         *      {
         *              return VimVersion.Vim25;
         *      }
         *      if (tns.Equals("urn:vim25"))
         *      {
         *              return VimVersion.Vim4;
         *      }
         *      if (tns.Equals("urn:vim25"))
         *      {
         *              return VimVersion.Vim41;
         *      }
         *      if (tns.Equals("urn:vim25"))
         *      {
         *              return VimVersion.Vim50;
         *      }
         *      if (tns.Equals("urn:vim25"))
         *      {
         *              return VimVersion.Vim51;
         *      }
         * if (tns.Equals("urn:vim25"))
         * {
         * return VimVersion.Vim55;
         * }
         *      return VimVersion.Vim60;
         * } */

        internal static VimVersion GetVIServerVersion(ServiceContent content)
        {
            string apiVersion;

            if (content != null && content.About != null && content.About.ApiVersion != null)
            {
                apiVersion = (content.About.ApiVersion ?? string.Empty);
            }
            else
            {
                apiVersion = string.Empty;
            }
            return(VersionUtils.GetVersionFromApi(apiVersion));
        }
示例#3
0
 public void ConfigureCryptoKey(CryptoKeyId keyId)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         ConfigureCryptoKeyRequestType configureCryptoKeyRequestType = new ConfigureCryptoKeyRequestType();
         configureCryptoKeyRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         configureCryptoKeyRequestType.keyId = (VimApi_65.CryptoKeyId)VIConvert.ToWsdlType(keyId);
         this.VimServiceProxy.ConfigureCryptoKey(new ConfigureCryptoKeyRequest(configureCryptoKeyRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#4
0
 public void UpdateIpmi(HostIpmiInfo ipmiInfo)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         UpdateIpmiRequestType updateIpmiRequestType = new UpdateIpmiRequestType();
         updateIpmiRequestType._this    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updateIpmiRequestType.ipmiInfo = (VimApi_65.HostIpmiInfo)VIConvert.ToWsdlType(ipmiInfo);
         this.VimServiceProxy.UpdateIpmi(new UpdateIpmiRequest(updateIpmiRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#5
0
 public CheckResult[] CheckMigrate(ManagedObjectReference vm, ManagedObjectReference host, ManagedObjectReference pool, VirtualMachinePowerState?state, string[] testType)
 {
     CheckResult[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.CheckMigrate_Task(vm, host, pool, state, testType);
         result = (CheckResult[])this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
示例#6
0
 public CheckResult[] CheckRelocate(ManagedObjectReference vm, VirtualMachineRelocateSpec spec, string[] testType)
 {
     CheckResult[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.CheckRelocate_Task(vm, spec, testType);
         result = (CheckResult[])this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
示例#7
0
 public void RemoveAssignedLicense(string entityId)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         RemoveAssignedLicenseRequestType removeAssignedLicenseRequestType = new RemoveAssignedLicenseRequestType();
         removeAssignedLicenseRequestType._this    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         removeAssignedLicenseRequestType.entityId = entityId;
         this.VimServiceProxy.RemoveAssignedLicense(new RemoveAssignedLicenseRequest(removeAssignedLicenseRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#8
0
 public void ReplaceSmartCardTrustAnchors(string[] certs)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
         ReplaceSmartCardTrustAnchorsRequestType replaceSmartCardTrustAnchorsRequestType = new ReplaceSmartCardTrustAnchorsRequestType();
         replaceSmartCardTrustAnchorsRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         replaceSmartCardTrustAnchorsRequestType.certs = certs;
         this.VimServiceProxy.ReplaceSmartCardTrustAnchors(new ReplaceSmartCardTrustAnchorsRequest(replaceSmartCardTrustAnchorsRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void UpdateSystemUsers(string[] users)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
         UpdateSystemUsersRequestType updateSystemUsersRequestType = new UpdateSystemUsersRequestType();
         updateSystemUsersRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updateSystemUsersRequestType.users = users;
         this.VimServiceProxy.UpdateSystemUsers(new UpdateSystemUsersRequest(updateSystemUsersRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void ChangeLockdownMode(HostLockdownMode mode)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
         ChangeLockdownModeRequestType changeLockdownModeRequestType = new ChangeLockdownModeRequestType();
         changeLockdownModeRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         changeLockdownModeRequestType.mode  = (VimApi_65.HostLockdownMode)VIConvert.ToWsdlType(mode);
         this.VimServiceProxy.ChangeLockdownMode(new ChangeLockdownModeRequest(changeLockdownModeRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#11
0
 public void CancelRecommendation(string key)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim41);
         CancelRecommendationRequestType cancelRecommendationRequestType = new CancelRecommendationRequestType();
         cancelRecommendationRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         cancelRecommendationRequestType.key   = key;
         this.VimServiceProxy.CancelRecommendation(new CancelRecommendationRequest(cancelRecommendationRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#12
0
 public void EnableNetworkResourceManagement(bool enable)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim41);
         EnableNetworkResourceManagementRequestType enableNetworkResourceManagementRequestType = new EnableNetworkResourceManagementRequestType();
         enableNetworkResourceManagementRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         enableNetworkResourceManagementRequestType.enable = enable;
         this.VimServiceProxy.EnableNetworkResourceManagement(new EnableNetworkResourceManagementRequest(enableNetworkResourceManagementRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#13
0
 public void RemoveNetworkResourcePool(string[] key)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         RemoveNetworkResourcePoolRequestType removeNetworkResourcePoolRequestType = new RemoveNetworkResourcePoolRequestType();
         removeNetworkResourcePoolRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         removeNetworkResourcePoolRequestType.key   = key;
         this.VimServiceProxy.RemoveNetworkResourcePool(new RemoveNetworkResourcePoolRequest(removeNetworkResourcePoolRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#14
0
 public void AddNetworkResourcePool(DVSNetworkResourcePoolConfigSpec[] configSpec)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         AddNetworkResourcePoolRequestType addNetworkResourcePoolRequestType = new AddNetworkResourcePoolRequestType();
         addNetworkResourcePoolRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         addNetworkResourcePoolRequestType.configSpec = (VimApi_65.DVSNetworkResourcePoolConfigSpec[])VIConvert.ToWsdlType(configSpec);
         this.VimServiceProxy.AddNetworkResourcePool(new AddNetworkResourcePoolRequest(addNetworkResourcePoolRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#15
0
 public void RefreshDVPortState(string[] portKeys)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         RefreshDVPortStateRequestType refreshDVPortStateRequestType = new RefreshDVPortStateRequestType();
         refreshDVPortStateRequestType._this    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         refreshDVPortStateRequestType.portKeys = portKeys;
         this.VimServiceProxy.RefreshDVPortState(new RefreshDVPortStateRequest(refreshDVPortStateRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#16
0
 public VsanHostDiskMapResult[] InitializeDisks(VsanHostDiskMapping[] mapping)
 {
     VsanHostDiskMapResult[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim55);
         ManagedObjectReference taskReference = this.InitializeDisks_Task(mapping);
         result = (VsanHostDiskMapResult[])this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
示例#17
0
 public void InstallSmartCardTrustAnchor(string cert)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
         InstallSmartCardTrustAnchorRequestType installSmartCardTrustAnchorRequestType = new InstallSmartCardTrustAnchorRequestType();
         installSmartCardTrustAnchorRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         installSmartCardTrustAnchorRequestType.cert  = cert;
         this.VimServiceProxy.InstallSmartCardTrustAnchor(new InstallSmartCardTrustAnchorRequest(installSmartCardTrustAnchorRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void CancelRetrievePropertiesEx(string token)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim41);
         CancelRetrievePropertiesExRequestType cancelRetrievePropertiesExRequestType = new CancelRetrievePropertiesExRequestType();
         cancelRetrievePropertiesExRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         cancelRetrievePropertiesExRequestType.token = token;
         this.VimServiceProxy.CancelRetrievePropertiesEx(new CancelRetrievePropertiesExRequest(cancelRetrievePropertiesExRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void ScheduleReconcileDatastoreInventory(ManagedObjectReference datastore)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         ScheduleReconcileDatastoreInventoryRequestType scheduleReconcileDatastoreInventoryRequestType = new ScheduleReconcileDatastoreInventoryRequestType();
         scheduleReconcileDatastoreInventoryRequestType._this     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         scheduleReconcileDatastoreInventoryRequestType.datastore = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datastore);
         this.VimServiceProxy.ScheduleReconcileDatastoreInventory(new ScheduleReconcileDatastoreInventoryRequest(scheduleReconcileDatastoreInventoryRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void UpdateCounterLevelMapping(PerformanceManagerCounterLevelMapping[] counterLevelMap)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         UpdateCounterLevelMappingRequestType updateCounterLevelMappingRequestType = new UpdateCounterLevelMappingRequestType();
         updateCounterLevelMappingRequestType._this           = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updateCounterLevelMappingRequestType.counterLevelMap = (VimApi_65.PerformanceManagerCounterLevelMapping[])VIConvert.ToWsdlType(counterLevelMap);
         this.VimServiceProxy.UpdateCounterLevelMapping(new UpdateCounterLevelMappingRequest(updateCounterLevelMappingRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#21
0
 public void UpdateGraphicsConfig(HostGraphicsConfig config)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         UpdateGraphicsConfigRequestType updateGraphicsConfigRequestType = new UpdateGraphicsConfigRequestType();
         updateGraphicsConfigRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updateGraphicsConfigRequestType.config = (VimApi_65.HostGraphicsConfig)VIConvert.ToWsdlType(config);
         this.VimServiceProxy.UpdateGraphicsConfig(new UpdateGraphicsConfigRequest(updateGraphicsConfigRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void ResetCounterLevelMapping(int[] counters)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         ResetCounterLevelMappingRequestType resetCounterLevelMappingRequestType = new ResetCounterLevelMappingRequestType();
         resetCounterLevelMappingRequestType._this    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         resetCounterLevelMappingRequestType.counters = counters;
         this.VimServiceProxy.ResetCounterLevelMapping(new ResetCounterLevelMappingRequest(resetCounterLevelMappingRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#23
0
 public CheckResult[] QueryVMotionCompatibilityEx(ManagedObjectReference[] vm, ManagedObjectReference[] host)
 {
     CheckResult[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.QueryVMotionCompatibilityEx_Task(vm, host);
         result = (CheckResult[])this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
示例#24
0
 public void HttpNfcLeaseAbort(LocalizedMethodFault fault)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         HttpNfcLeaseAbortRequestType httpNfcLeaseAbortRequestType = new HttpNfcLeaseAbortRequestType();
         httpNfcLeaseAbortRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         httpNfcLeaseAbortRequestType.fault = (VimApi_65.LocalizedMethodFault)VIConvert.ToWsdlType(fault);
         this.VimServiceProxy.HttpNfcLeaseAbort(new HttpNfcLeaseAbortRequest(httpNfcLeaseAbortRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#25
0
 public void UpdateSystemSwapConfiguration(HostSystemSwapConfiguration sysSwapConfig)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim51);
         UpdateSystemSwapConfigurationRequestType updateSystemSwapConfigurationRequestType = new UpdateSystemSwapConfigurationRequestType();
         updateSystemSwapConfigurationRequestType._this         = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updateSystemSwapConfigurationRequestType.sysSwapConfig = (VimApi_65.HostSystemSwapConfiguration)VIConvert.ToWsdlType(sysSwapConfig);
         this.VimServiceProxy.UpdateSystemSwapConfiguration(new UpdateSystemSwapConfigurationRequest(updateSystemSwapConfigurationRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#26
0
 public void HttpNfcLeaseProgress(int percent)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         HttpNfcLeaseProgressRequestType httpNfcLeaseProgressRequestType = new HttpNfcLeaseProgressRequestType();
         httpNfcLeaseProgressRequestType._this   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         httpNfcLeaseProgressRequestType.percent = percent;
         this.VimServiceProxy.HttpNfcLeaseProgress(new HttpNfcLeaseProgressRequest(httpNfcLeaseProgressRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#27
0
 public void EnableCrypto(CryptoKeyPlain keyPlain)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         EnableCryptoRequestType enableCryptoRequestType = new EnableCryptoRequestType();
         enableCryptoRequestType._this    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         enableCryptoRequestType.keyPlain = (VimApi_65.CryptoKeyPlain)VIConvert.ToWsdlType(keyPlain);
         this.VimServiceProxy.EnableCrypto(new EnableCryptoRequest(enableCryptoRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#28
0
 public VsanHostDiskMapResult[] RemoveDiskMapping(VsanHostDiskMapping[] mapping, HostMaintenanceSpec maintenanceSpec, int?timeout)
 {
     VsanHostDiskMapResult[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim55);
         ManagedObjectReference taskReference = this.RemoveDiskMapping_Task(mapping, maintenanceSpec, timeout);
         result = (VsanHostDiskMapResult[])this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
示例#29
0
 public void UpdateVAppConfig(VAppConfigSpec spec)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         UpdateVAppConfigRequestType updateVAppConfigRequestType = new UpdateVAppConfigRequestType();
         updateVAppConfigRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updateVAppConfigRequestType.spec  = (VimApi_65.VAppConfigSpec)VIConvert.ToWsdlType(spec);
         this.VimServiceProxy.UpdateVAppConfig(new UpdateVAppConfigRequest(updateVAppConfigRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
示例#30
0
 public VsanHostDiskMapResult[] AddDisks(HostScsiDisk[] disk)
 {
     VsanHostDiskMapResult[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim55);
         ManagedObjectReference taskReference = this.AddDisks_Task(disk);
         result = (VsanHostDiskMapResult[])this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }