public ManagedObjectReference ExpandVmfsDatastore(ManagedObjectReference datastore, VmfsDatastoreExpandSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                ExpandVmfsDatastoreRequestType expandVmfsDatastoreRequestType = new ExpandVmfsDatastoreRequestType();
                expandVmfsDatastoreRequestType._this     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                expandVmfsDatastoreRequestType.datastore = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datastore);
                expandVmfsDatastoreRequestType.spec      = (VimApi_65.VmfsDatastoreExpandSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ExpandVmfsDatastore(new ExpandVmfsDatastoreRequest(expandVmfsDatastoreRequestType)).ExpandVmfsDatastoreResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public LicenseManagerLicenseInfo AddLicense(string licenseKey, KeyValue[] labels)
        {
            LicenseManagerLicenseInfo result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                AddLicenseRequestType addLicenseRequestType = new AddLicenseRequestType();
                addLicenseRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                addLicenseRequestType.licenseKey = licenseKey;
                addLicenseRequestType.labels     = (VimApi_65.KeyValue[])VIConvert.ToWsdlType(labels);
                result = (LicenseManagerLicenseInfo)VIConvert.ToVim(this.VimServiceProxy.AddLicense(new AddLicenseRequest(addLicenseRequestType)).AddLicenseResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
예제 #3
0
 public GuestProcessInfo[] ListProcessesInGuest(ManagedObjectReference vm, GuestAuthentication auth, long[] pids)
 {
     GuestProcessInfo[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         ListProcessesInGuestRequestType listProcessesInGuestRequestType = new ListProcessesInGuestRequestType();
         listProcessesInGuestRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         listProcessesInGuestRequestType.vm    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(vm);
         listProcessesInGuestRequestType.auth  = (VimApi_65.GuestAuthentication)VIConvert.ToWsdlType(auth);
         listProcessesInGuestRequestType.pids  = pids;
         result = (GuestProcessInfo[])VIConvert.ToVim(this.VimServiceProxy.ListProcessesInGuest(new ListProcessesInGuestRequest(listProcessesInGuestRequestType)).ListProcessesInGuestResponse1);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
        public ManagedObjectReference CreateVirtualDisk_Task(string name, ManagedObjectReference datacenter, VirtualDiskSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                CreateVirtualDiskRequestType createVirtualDiskRequestType = new CreateVirtualDiskRequestType();
                createVirtualDiskRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createVirtualDiskRequestType.name       = name;
                createVirtualDiskRequestType.datacenter = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datacenter);
                createVirtualDiskRequestType.spec       = (VimApi_65.VirtualDiskSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CreateVirtualDisk_Task(new CreateVirtualDisk_TaskRequest(createVirtualDiskRequestType)).CreateVirtualDisk_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public ManagedObjectReference EagerZeroVirtualDisk_Task(string name, ManagedObjectReference datacenter)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                EagerZeroVirtualDiskRequestType eagerZeroVirtualDiskRequestType = new EagerZeroVirtualDiskRequestType();
                eagerZeroVirtualDiskRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                eagerZeroVirtualDiskRequestType.name       = name;
                eagerZeroVirtualDiskRequestType.datacenter = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datacenter);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.EagerZeroVirtualDisk_Task(new EagerZeroVirtualDisk_TaskRequest(eagerZeroVirtualDiskRequestType)).EagerZeroVirtualDisk_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        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);
        }
        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);
        }
        public UserSession LoginExtensionByCertificate(string extensionKey, string locale)
        {
            UserSession result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                LoginExtensionByCertificateRequestType loginExtensionByCertificateRequestType = new LoginExtensionByCertificateRequestType();
                loginExtensionByCertificateRequestType._this        = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                loginExtensionByCertificateRequestType.extensionKey = extensionKey;
                loginExtensionByCertificateRequestType.locale       = locale;
                result = (UserSession)VIConvert.ToVim(this.VimServiceProxy.LoginExtensionByCertificate(new LoginExtensionByCertificateRequest(loginExtensionByCertificateRequestType)).LoginExtensionByCertificateResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public UserSession Login(string userName, string password, string locale)
        {
            UserSession result;

            try
            {
                LoginRequestType loginRequestType = new LoginRequestType();
                loginRequestType._this    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                loginRequestType.userName = userName;
                loginRequestType.password = password;
                loginRequestType.locale   = locale;
                result = (UserSession)VIConvert.ToVim(this.VimServiceProxy.Login(new LoginRequest(loginRequestType)).LoginResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
예제 #10
0
        public bool HasMonitoredEntity(string providerId, ManagedObjectReference entity)
        {
            bool returnval;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
                HasMonitoredEntityRequestType hasMonitoredEntityRequestType = new HasMonitoredEntityRequestType();
                hasMonitoredEntityRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                hasMonitoredEntityRequestType.providerId = providerId;
                hasMonitoredEntityRequestType.entity     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(entity);
                returnval = this.VimServiceProxy.HasMonitoredEntity(new HasMonitoredEntityRequest(hasMonitoredEntityRequestType)).HasMonitoredEntityResponse.returnval;
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(returnval);
        }
예제 #11
0
        public string RegisterHealthUpdateProvider(string name, HealthUpdateInfo[] healthUpdateInfo)
        {
            string returnval;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
                RegisterHealthUpdateProviderRequestType registerHealthUpdateProviderRequestType = new RegisterHealthUpdateProviderRequestType();
                registerHealthUpdateProviderRequestType._this            = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                registerHealthUpdateProviderRequestType.name             = name;
                registerHealthUpdateProviderRequestType.healthUpdateInfo = (VimApi_65.HealthUpdateInfo[])VIConvert.ToWsdlType(healthUpdateInfo);
                returnval = this.VimServiceProxy.RegisterHealthUpdateProvider(new RegisterHealthUpdateProviderRequest(registerHealthUpdateProviderRequestType)).RegisterHealthUpdateProviderResponse.returnval;
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(returnval);
        }
        public ManagedObjectReference GenerateHostProfileTaskList_Task(HostConfigSpec configSpec, ManagedObjectReference host)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim55);
                GenerateHostProfileTaskListRequestType generateHostProfileTaskListRequestType = new GenerateHostProfileTaskListRequestType();
                generateHostProfileTaskListRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                generateHostProfileTaskListRequestType.configSpec = (VimApi_65.HostConfigSpec)VIConvert.ToWsdlType(configSpec);
                generateHostProfileTaskListRequestType.host       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.GenerateHostProfileTaskList_Task(new GenerateHostProfileTaskList_TaskRequest(generateHostProfileTaskListRequestType)).GenerateHostProfileTaskList_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public AnswerFile RetrieveAnswerFileForProfile(ManagedObjectReference host, HostApplyProfile applyProfile)
        {
            AnswerFile result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim51);
                RetrieveAnswerFileForProfileRequestType retrieveAnswerFileForProfileRequestType = new RetrieveAnswerFileForProfileRequestType();
                retrieveAnswerFileForProfileRequestType._this        = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                retrieveAnswerFileForProfileRequestType.host         = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                retrieveAnswerFileForProfileRequestType.applyProfile = (VimApi_65.HostApplyProfile)VIConvert.ToWsdlType(applyProfile);
                result = (AnswerFile)VIConvert.ToVim(this.VimServiceProxy.RetrieveAnswerFileForProfile(new RetrieveAnswerFileForProfileRequest(retrieveAnswerFileForProfileRequestType)).RetrieveAnswerFileForProfileResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public ManagedObjectReference UpdateAnswerFile_Task(ManagedObjectReference host, AnswerFileCreateSpec configSpec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
                UpdateAnswerFileRequestType updateAnswerFileRequestType = new UpdateAnswerFileRequestType();
                updateAnswerFileRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                updateAnswerFileRequestType.host       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                updateAnswerFileRequestType.configSpec = (VimApi_65.AnswerFileCreateSpec)VIConvert.ToWsdlType(configSpec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.UpdateAnswerFile_Task(new UpdateAnswerFile_TaskRequest(updateAnswerFileRequestType)).UpdateAnswerFile_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public ManagedObjectReference ConfigureDatastoreIORM_Task(ManagedObjectReference datastore, StorageIORMConfigSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim41);
                ConfigureDatastoreIORMRequestType configureDatastoreIORMRequestType = new ConfigureDatastoreIORMRequestType();
                configureDatastoreIORMRequestType._this     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                configureDatastoreIORMRequestType.datastore = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datastore);
                configureDatastoreIORMRequestType.spec      = (VimApi_65.StorageIORMConfigSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ConfigureDatastoreIORM_Task(new ConfigureDatastoreIORM_TaskRequest(configureDatastoreIORMRequestType)).ConfigureDatastoreIORM_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
예제 #16
0
 public void MoveFileInGuest(ManagedObjectReference vm, GuestAuthentication auth, string srcFilePath, string dstFilePath, bool overwrite)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         MoveFileInGuestRequestType moveFileInGuestRequestType = new MoveFileInGuestRequestType();
         moveFileInGuestRequestType._this       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         moveFileInGuestRequestType.vm          = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(vm);
         moveFileInGuestRequestType.auth        = (VimApi_65.GuestAuthentication)VIConvert.ToWsdlType(auth);
         moveFileInGuestRequestType.srcFilePath = srcFilePath;
         moveFileInGuestRequestType.dstFilePath = dstFilePath;
         moveFileInGuestRequestType.overwrite   = overwrite;
         this.VimServiceProxy.MoveFileInGuest(new MoveFileInGuestRequest(moveFileInGuestRequestType));
     }
     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);
        }
예제 #18
0
        public ManagedObjectReference ReconfigureDatacenter_Task(DatacenterConfigSpec spec, bool modify)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim51);
                ReconfigureDatacenterRequestType reconfigureDatacenterRequestType = new ReconfigureDatacenterRequestType();
                reconfigureDatacenterRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                reconfigureDatacenterRequestType.spec   = (VimApi_65.DatacenterConfigSpec)VIConvert.ToWsdlType(spec);
                reconfigureDatacenterRequestType.modify = modify;
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ReconfigureDatacenter_Task(new ReconfigureDatacenter_TaskRequest(reconfigureDatacenterRequestType)).ReconfigureDatacenter_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
예제 #19
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);
        }
예제 #20
0
 public string[] ReadEnvironmentVariableInGuest(ManagedObjectReference vm, GuestAuthentication auth, string[] names)
 {
     string[] readEnvironmentVariableInGuestResponse;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         ReadEnvironmentVariableInGuestRequestType readEnvironmentVariableInGuestRequestType = new ReadEnvironmentVariableInGuestRequestType();
         readEnvironmentVariableInGuestRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         readEnvironmentVariableInGuestRequestType.vm    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(vm);
         readEnvironmentVariableInGuestRequestType.auth  = (VimApi_65.GuestAuthentication)VIConvert.ToWsdlType(auth);
         readEnvironmentVariableInGuestRequestType.names = names;
         readEnvironmentVariableInGuestResponse          = this.VimServiceProxy.ReadEnvironmentVariableInGuest(new ReadEnvironmentVariableInGuestRequest(readEnvironmentVariableInGuestRequestType)).ReadEnvironmentVariableInGuestResponse1;
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(readEnvironmentVariableInGuestResponse);
 }
 public VmfsDatastoreOption[] QueryVmfsDatastoreExtendOptions(ManagedObjectReference datastore, string devicePath, bool?suppressExpandCandidates)
 {
     VmfsDatastoreOption[] result;
     try
     {
         QueryVmfsDatastoreExtendOptionsRequestType queryVmfsDatastoreExtendOptionsRequestType = new QueryVmfsDatastoreExtendOptionsRequestType();
         queryVmfsDatastoreExtendOptionsRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         queryVmfsDatastoreExtendOptionsRequestType.datastore  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datastore);
         queryVmfsDatastoreExtendOptionsRequestType.devicePath = devicePath;
         queryVmfsDatastoreExtendOptionsRequestType.suppressExpandCandidates          = suppressExpandCandidates.GetValueOrDefault();
         queryVmfsDatastoreExtendOptionsRequestType.suppressExpandCandidatesSpecified = suppressExpandCandidates.HasValue;
         result = (VmfsDatastoreOption[])VIConvert.ToVim(this.VimServiceProxy.QueryVmfsDatastoreExtendOptions(new QueryVmfsDatastoreExtendOptionsRequest(queryVmfsDatastoreExtendOptionsRequestType)).QueryVmfsDatastoreExtendOptionsResponse1);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
예제 #22
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);
        }
        public string AllocateIpv4Address(ManagedObjectReference dc, int poolId, string allocationId)
        {
            string returnval;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim51);
                AllocateIpv4AddressRequestType allocateIpv4AddressRequestType = new AllocateIpv4AddressRequestType();
                allocateIpv4AddressRequestType._this        = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                allocateIpv4AddressRequestType.dc           = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(dc);
                allocateIpv4AddressRequestType.poolId       = poolId;
                allocateIpv4AddressRequestType.allocationId = allocationId;
                returnval = this.VimServiceProxy.AllocateIpv4Address(new AllocateIpv4AddressRequest(allocateIpv4AddressRequestType)).AllocateIpv4AddressResponse.returnval;
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(returnval);
        }
예제 #24
0
        public long QueryMemoryOverhead(long memorySize, int?videoRamSize, int numVcpus)
        {
            long returnval;

            try
            {
                QueryMemoryOverheadRequestType queryMemoryOverheadRequestType = new QueryMemoryOverheadRequestType();
                queryMemoryOverheadRequestType._this                 = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                queryMemoryOverheadRequestType.memorySize            = memorySize;
                queryMemoryOverheadRequestType.videoRamSize          = videoRamSize.GetValueOrDefault();
                queryMemoryOverheadRequestType.videoRamSizeSpecified = videoRamSize.HasValue;
                queryMemoryOverheadRequestType.numVcpus              = numVcpus;
                returnval = this.VimServiceProxy.QueryMemoryOverhead(new QueryMemoryOverheadRequest(queryMemoryOverheadRequestType)).QueryMemoryOverheadResponse.returnval;
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(returnval);
        }
예제 #25
0
        public ManagedObjectReference CloneVApp_Task(string name, ManagedObjectReference target, VAppCloneSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                CloneVAppRequestType cloneVAppRequestType = new CloneVAppRequestType();
                cloneVAppRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                cloneVAppRequestType.name   = name;
                cloneVAppRequestType.target = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(target);
                cloneVAppRequestType.spec   = (VimApi_65.VAppCloneSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CloneVApp_Task(new CloneVApp_TaskRequest(cloneVAppRequestType)).CloneVApp_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
예제 #26
0
        public ManagedObjectReference EnterMaintenanceMode_Task(int timeout, bool?evacuatePoweredOffVms, HostMaintenanceSpec maintenanceSpec)
        {
            ManagedObjectReference result;

            try
            {
                EnterMaintenanceModeRequestType enterMaintenanceModeRequestType = new EnterMaintenanceModeRequestType();
                enterMaintenanceModeRequestType._this   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                enterMaintenanceModeRequestType.timeout = timeout;
                enterMaintenanceModeRequestType.evacuatePoweredOffVms          = evacuatePoweredOffVms.GetValueOrDefault();
                enterMaintenanceModeRequestType.evacuatePoweredOffVmsSpecified = evacuatePoweredOffVms.HasValue;
                enterMaintenanceModeRequestType.maintenanceSpec = (VimApi_65.HostMaintenanceSpec)VIConvert.ToWsdlType(maintenanceSpec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.EnterMaintenanceMode_Task(new EnterMaintenanceMode_TaskRequest(enterMaintenanceModeRequestType)).EnterMaintenanceMode_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
예제 #27
0
        public ManagedObjectReference CheckRelocate_Task(ManagedObjectReference vm, VirtualMachineRelocateSpec spec, string[] testType)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                CheckRelocateRequestType checkRelocateRequestType = new CheckRelocateRequestType();
                checkRelocateRequestType._this    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                checkRelocateRequestType.vm       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(vm);
                checkRelocateRequestType.spec     = (VimApi_65.VirtualMachineRelocateSpec)VIConvert.ToWsdlType(spec);
                checkRelocateRequestType.testType = testType;
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CheckRelocate_Task(new CheckRelocate_TaskRequest(checkRelocateRequestType)).CheckRelocate_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
예제 #28
0
        public ManagedObjectReference ImportVApp(ImportSpec spec, ManagedObjectReference folder, ManagedObjectReference host)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                ImportVAppRequestType importVAppRequestType = new ImportVAppRequestType();
                importVAppRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                importVAppRequestType.spec   = (VimApi_65.ImportSpec)VIConvert.ToWsdlType(spec);
                importVAppRequestType.folder = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(folder);
                importVAppRequestType.host   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ImportVApp(new ImportVAppRequest(importVAppRequestType)).ImportVAppResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
예제 #29
0
        public ManagedObjectReference RegisterChildVM_Task(string path, string name, ManagedObjectReference host)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                RegisterChildVMRequestType registerChildVMRequestType = new RegisterChildVMRequestType();
                registerChildVMRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                registerChildVMRequestType.path  = path;
                registerChildVMRequestType.name  = name;
                registerChildVMRequestType.host  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.RegisterChildVM_Task(new RegisterChildVM_TaskRequest(registerChildVMRequestType)).RegisterChildVM_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
예제 #30
0
        public LicenseManagerLicenseInfo UpdateAssignedLicense(string entity, string licenseKey, string entityDisplayName)
        {
            LicenseManagerLicenseInfo result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                UpdateAssignedLicenseRequestType updateAssignedLicenseRequestType = new UpdateAssignedLicenseRequestType();
                updateAssignedLicenseRequestType._this             = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                updateAssignedLicenseRequestType.entity            = entity;
                updateAssignedLicenseRequestType.licenseKey        = licenseKey;
                updateAssignedLicenseRequestType.entityDisplayName = entityDisplayName;
                result = (LicenseManagerLicenseInfo)VIConvert.ToVim(this.VimServiceProxy.UpdateAssignedLicense(new UpdateAssignedLicenseRequest(updateAssignedLicenseRequestType)).UpdateAssignedLicenseResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }