Search in sources :

Example 1 with GetAllServerCpuListParameters

use of org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method initCpuMap.

private void initCpuMap() {
    cpuMap = new HashMap<>();
    final List<QueryType> queryTypes = new ArrayList<>();
    final List<QueryParametersBase> queryParams = new ArrayList<>();
    for (Version version : Version.ALL) {
        queryTypes.add(QueryType.GetAllServerCpuList);
        queryParams.add(new GetAllServerCpuListParameters(version));
    }
    final IFrontendMultipleQueryAsyncCallback callback = result -> {
        for (int i = 0; i < result.getReturnValues().size(); i++) {
            final List<ServerCpu> cpus = result.getReturnValues().get(i).getReturnValue();
            final Version version = ((GetAllServerCpuListParameters) result.getParameters().get(i)).getVersion();
            initCpuMapForVersion(version, cpus);
        }
    };
    Frontend.getInstance().runMultipleQueries(queryTypes, queryParams, callback);
}
Also used : StorageDomainsAndStoragePoolIdQueryParameters(org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters) BusinessEntity(org.ovirt.engine.core.common.businessentities.BusinessEntity) ServiceType(org.ovirt.engine.core.common.businessentities.gluster.ServiceType) StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) GetConfigurationValueParameters(org.ovirt.engine.core.common.queries.GetConfigurationValueParameters) Map(java.util.Map) VdsNumaNode(org.ovirt.engine.core.common.businessentities.VdsNumaNode) ProfileEntry(org.ovirt.engine.core.aaa.ProfileEntry) AsyncQuery(org.ovirt.engine.ui.frontend.AsyncQuery) DisplayType(org.ovirt.engine.core.common.businessentities.DisplayType) AdditionalFeature(org.ovirt.engine.core.common.businessentities.AdditionalFeature) GlusterGeoRepSession(org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession) ActionUtils(org.ovirt.engine.core.common.ActionUtils) RefObject(org.ovirt.engine.core.compat.RefObject) SetupNetworksBondModel(org.ovirt.engine.ui.uicommonweb.models.hosts.SetupNetworksBondModel) GlusterVolumeQueriesParameters(org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters) StringHelper(org.ovirt.engine.core.compat.StringHelper) NetworkQoSModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkQoSModel) VolumeType(org.ovirt.engine.core.common.businessentities.storage.VolumeType) DbUser(org.ovirt.engine.core.common.businessentities.aaa.DbUser) GlusterParameters(org.ovirt.engine.core.common.queries.gluster.GlusterParameters) GlusterVolumeEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity) DiskInterface(org.ovirt.engine.core.common.businessentities.storage.DiskInterface) GraphicsType(org.ovirt.engine.core.common.businessentities.GraphicsType) GlusterServerService(org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService) GetStorageDomainsByConnectionParameters(org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters) QueryType(org.ovirt.engine.core.common.queries.QueryType) LoginModel(org.ovirt.engine.ui.uicommonweb.models.LoginModel) GlusterVolumeProfileParameters(org.ovirt.engine.core.common.queries.gluster.GlusterVolumeProfileParameters) ServerCpu(org.ovirt.engine.core.common.businessentities.ServerCpu) StorageDomain(org.ovirt.engine.core.common.businessentities.StorageDomain) ExternalDiscoveredHost(org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost) NfsStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel) DiskImage(org.ovirt.engine.core.common.businessentities.storage.DiskImage) ProviderQueryParameters(org.ovirt.engine.core.common.queries.ProviderQueryParameters) AuthzGroup(org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup) OsQueryParameters(org.ovirt.engine.core.common.queries.OsQueryParameters) GlusterClusterService(org.ovirt.engine.core.common.businessentities.gluster.GlusterClusterService) GlusterVolumeSnapshotSchedule(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotSchedule) MigrationPolicy(org.ovirt.engine.core.common.migration.MigrationPolicy) HostNetworkQos(org.ovirt.engine.core.common.businessentities.network.HostNetworkQos) Pair(org.ovirt.engine.core.common.utils.Pair) ExternalComputeResource(org.ovirt.engine.core.common.businessentities.ExternalComputeResource) VmPool(org.ovirt.engine.core.common.businessentities.VmPool) IdsQueryParameters(org.ovirt.engine.core.common.queries.IdsQueryParameters) VmNetworkInterface(org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface) Quota(org.ovirt.engine.core.common.businessentities.Quota) GlusterHookQueryParameters(org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters) VmCommonUtils(org.ovirt.engine.core.common.utils.VmCommonUtils) SupportedAdditionalClusterFeature(org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature) VM(org.ovirt.engine.core.common.businessentities.VM) QosType(org.ovirt.engine.core.common.businessentities.qos.QosType) VnicProfileView(org.ovirt.engine.core.common.businessentities.network.VnicProfileView) GetExistingStorageDomainListParameters(org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters) GlusterStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel) GlusterVolumeRemoveBricksQueriesParameters(org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksQueriesParameters) QuotaComparator(org.ovirt.engine.ui.uicommonweb.comparators.QuotaComparator) SearchType(org.ovirt.engine.core.common.interfaces.SearchType) NetworkModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel) GetSupportedCpuListParameters(org.ovirt.engine.core.common.queries.GetSupportedCpuListParameters) SortedSet(java.util.SortedSet) GetClusterFeaturesByVersionAndCategoryParameters(org.ovirt.engine.core.common.queries.GetClusterFeaturesByVersionAndCategoryParameters) GetVmsFromExternalProviderQueryParameters(org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters) GetAllProvidersParameters(org.ovirt.engine.core.common.queries.GetAllProvidersParameters) OriginType(org.ovirt.engine.core.common.businessentities.OriginType) PosixStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel) KeyValuePairCompat(org.ovirt.engine.core.compat.KeyValuePairCompat) Version(org.ovirt.engine.core.compat.Version) EventArgs(org.ovirt.engine.ui.uicompat.EventArgs) StorageType(org.ovirt.engine.core.common.businessentities.storage.StorageType) Collection(java.util.Collection) WanColorDepth(org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth) Collectors(java.util.stream.Collectors) TagsType(org.ovirt.engine.core.common.businessentities.TagsType) GetPermittedStorageDomainsByStoragePoolIdParameters(org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters) GlusterVolumeAdvancedDetails(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails) ApplicationModeHelper(org.ovirt.engine.ui.uicommonweb.models.ApplicationModeHelper) VDSStatus(org.ovirt.engine.core.common.businessentities.VDSStatus) GetTagsByUserGroupIdParameters(org.ovirt.engine.core.common.queries.GetTagsByUserGroupIdParameters) Entry(java.util.Map.Entry) Converter(org.ovirt.engine.ui.frontend.Converter) VdcEventNotificationUtils(org.ovirt.engine.core.common.VdcEventNotificationUtils) IStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel) GetAllAttachableDisksForVmQueryParameters(org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters) IntegerCompat(org.ovirt.engine.core.compat.IntegerCompat) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) ImportIscsiStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.ImportIscsiStorageModel) ExternalHostGroup(org.ovirt.engine.core.common.businessentities.ExternalHostGroup) GetAllServerCpuListParameters(org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters) HashSet(java.util.HashSet) Frontend(org.ovirt.engine.ui.frontend.Frontend) GetTagsByUserIdParameters(org.ovirt.engine.core.common.queries.GetTagsByUserIdParameters) VolumeFormat(org.ovirt.engine.core.common.businessentities.storage.VolumeFormat) QueryParametersBase(org.ovirt.engine.core.common.queries.QueryParametersBase) CinderVolumeType(org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType) GetStoragePoolsByClusterServiceParameters(org.ovirt.engine.core.common.queries.GetStoragePoolsByClusterServiceParameters) VmTemplateStatus(org.ovirt.engine.core.common.businessentities.VmTemplateStatus) GetVmChangedFieldsForNextRunParameters(org.ovirt.engine.core.common.queries.GetVmChangedFieldsForNextRunParameters) DbGroup(org.ovirt.engine.core.common.businessentities.aaa.DbGroup) ConfigurationType(org.ovirt.engine.core.common.businessentities.ConfigurationType) ClusterEditWarnings(org.ovirt.engine.core.common.businessentities.ClusterEditWarnings) GetHostListFromExternalProviderParameters(org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters) GetLunsByVgIdParameters(org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters) Role(org.ovirt.engine.core.common.businessentities.Role) StorageDomainType(org.ovirt.engine.core.common.businessentities.StorageDomainType) Comparator(java.util.Comparator) VmManagementParametersBase(org.ovirt.engine.core.common.action.VmManagementParametersBase) RpmVersion(org.ovirt.engine.core.compat.RpmVersion) Arrays(java.util.Arrays) GetConnectionsByDataCenterAndStorageTypeParameters(org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters) Provider(org.ovirt.engine.core.common.businessentities.Provider) GetDataCentersWithPermittedActionOnClustersParameters(org.ovirt.engine.core.common.queries.GetDataCentersWithPermittedActionOnClustersParameters) ApplicationMode(org.ovirt.engine.core.common.mode.ApplicationMode) QuotaEnforcementTypeEnum(org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) ActionType(org.ovirt.engine.core.common.action.ActionType) HostDeviceView(org.ovirt.engine.core.common.businessentities.HostDeviceView) GetVmTemplateParameters(org.ovirt.engine.core.common.queries.GetVmTemplateParameters) Snapshot(org.ovirt.engine.core.common.businessentities.Snapshot) Tags(org.ovirt.engine.core.common.businessentities.Tags) GlusterVolumeGeoRepEligibilityParameters(org.ovirt.engine.core.common.queries.gluster.GlusterVolumeGeoRepEligibilityParameters) SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) VmTemplate(org.ovirt.engine.core.common.businessentities.VmTemplate) Set(java.util.Set) NameQueryParameters(org.ovirt.engine.core.common.queries.NameQueryParameters) VmGuestAgentInterface(org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface) EventNotificationEntity(org.ovirt.engine.core.common.EventNotificationEntity) GetVmTemplatesFromStorageDomainParameters(org.ovirt.engine.core.common.queries.GetVmTemplatesFromStorageDomainParameters) FenceAgent(org.ovirt.engine.core.common.businessentities.pm.FenceAgent) GlusterServiceQueryParameters(org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters) PairQueryable(org.ovirt.engine.core.common.utils.PairQueryable) Label(org.ovirt.engine.core.common.businessentities.Label) ProviderType(org.ovirt.engine.core.common.businessentities.ProviderType) VdcObjectType(org.ovirt.engine.core.common.VdcObjectType) VmWithStatusForExclusiveLock(org.ovirt.engine.core.common.businessentities.VmWithStatusForExclusiveLock) ClusterEditParameters(org.ovirt.engine.core.common.queries.ClusterEditParameters) BondMode(org.ovirt.engine.core.common.businessentities.network.BondMode) LibvirtSecretUsageType(org.ovirt.engine.core.common.businessentities.storage.LibvirtSecretUsageType) VmIconIdSizePair(org.ovirt.engine.core.common.queries.VmIconIdSizePair) GlusterGeoRepNonEligibilityReason(org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepNonEligibilityReason) GetStorageDomainDefaultWipeAfterDeleteParameters(org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters) Guid(org.ovirt.engine.core.compat.Guid) GlusterServersQueryParameters(org.ovirt.engine.core.common.queries.gluster.GlusterServersQueryParameters) TreeSet(java.util.TreeSet) OsRepositoryVerb(org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb) ArrayList(java.util.ArrayList) ArchCapabilitiesVerb(org.ovirt.engine.core.common.queries.ArchCapabilitiesParameters.ArchCapabilitiesVerb) StorageDomainStatic(org.ovirt.engine.core.common.businessentities.StorageDomainStatic) Permission(org.ovirt.engine.core.common.businessentities.Permission) VmHostDevice(org.ovirt.engine.core.common.businessentities.VmHostDevice) ConfigValues(org.ovirt.engine.core.common.config.ConfigValues) ImportFcpStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.ImportFcpStorageModel) Disk(org.ovirt.engine.core.common.businessentities.storage.Disk) LocalStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel) CertificateInfo(org.ovirt.engine.core.common.businessentities.CertificateInfo) Nameable(org.ovirt.engine.core.common.businessentities.Nameable) NumaTuneMode(org.ovirt.engine.core.common.businessentities.NumaTuneMode) NetworkQoS(org.ovirt.engine.core.common.businessentities.network.NetworkQoS) VmInterfaceType(org.ovirt.engine.core.common.businessentities.network.VmInterfaceType) GetAgentFenceOptionsQueryParameters(org.ovirt.engine.core.common.queries.GetAgentFenceOptionsQueryParameters) GetValidHostsForVmsParameters(org.ovirt.engine.core.common.queries.GetValidHostsForVmsParameters) StorageServerConnectionQueryParametersBase(org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase) GlusterBrickEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity) ConstantsManager(org.ovirt.engine.ui.uicompat.ConstantsManager) QosQueryParameterBase(org.ovirt.engine.core.common.queries.QosQueryParameterBase) ServerParameters(org.ovirt.engine.core.common.queries.ServerParameters) NetworkFilterParameterModel(org.ovirt.engine.ui.uicommonweb.models.vms.NetworkFilterParameterModel) List(java.util.List) Cluster(org.ovirt.engine.core.common.businessentities.Cluster) GetVmFromConfigurationQueryParameters(org.ovirt.engine.core.common.queries.GetVmFromConfigurationQueryParameters) GetVmFromOvaQueryParameters(org.ovirt.engine.core.common.queries.GetVmFromOvaQueryParameters) AuditLogType(org.ovirt.engine.core.common.AuditLogType) OsValueAutoCompleter(org.ovirt.engine.core.searchbackend.OsValueAutoCompleter) IFrontendMultipleQueryAsyncCallback(org.ovirt.engine.ui.uicompat.IFrontendMultipleQueryAsyncCallback) GlusterHookContentQueryParameters(org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters) GetAllFromExportDomainQueryParameters(org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters) ArchitectureType(org.ovirt.engine.core.common.businessentities.ArchitectureType) GlusterHookEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity) WanDisableEffects(org.ovirt.engine.core.common.console.ConsoleOptions.WanDisableEffects) IscsiStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.IscsiStorageModel) HashMap(java.util.HashMap) ArchCapabilitiesParameters(org.ovirt.engine.core.common.queries.ArchCapabilitiesParameters) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) SimpleDependencyInjector(org.ovirt.engine.core.common.utils.SimpleDependencyInjector) VdsNetworkInterface(org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface) NoMigrationPolicy(org.ovirt.engine.core.common.migration.NoMigrationPolicy) GetTagsByVdsIdParameters(org.ovirt.engine.core.common.queries.GetTagsByVdsIdParameters) StorageDevice(org.ovirt.engine.core.common.businessentities.gluster.StorageDevice) GetTagsByVmIdParameters(org.ovirt.engine.core.common.queries.GetTagsByVmIdParameters) LexoNumericComparator(org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator) GlusterVolumeSnapshotEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity) Network(org.ovirt.engine.core.common.businessentities.network.Network) NameableComparator(org.ovirt.engine.core.common.businessentities.comparators.NameableComparator) GetHostsForStorageOperationParameters(org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters) FcpStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.FcpStorageModel) Iterator(java.util.Iterator) GlusterVolumeAdvancedDetailsParameters(org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters) ValidateVmMacsParameters(org.ovirt.engine.core.common.queries.ValidateVmMacsParameters) ActionGroup(org.ovirt.engine.core.common.businessentities.ActionGroup) Collections(java.util.Collections) VDS(org.ovirt.engine.core.common.businessentities.VDS) LUNs(org.ovirt.engine.core.common.businessentities.storage.LUNs) GetEntitiesWithPermittedActionParameters(org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters) AddedGlusterServersParameters(org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters) Version(org.ovirt.engine.core.compat.Version) RpmVersion(org.ovirt.engine.core.compat.RpmVersion) ArrayList(java.util.ArrayList) GetAllServerCpuListParameters(org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters) QueryParametersBase(org.ovirt.engine.core.common.queries.QueryParametersBase) StorageServerConnectionQueryParametersBase(org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase) IFrontendMultipleQueryAsyncCallback(org.ovirt.engine.ui.uicompat.IFrontendMultipleQueryAsyncCallback) ArrayList(java.util.ArrayList) List(java.util.List) QueryType(org.ovirt.engine.core.common.queries.QueryType)

Example 2 with GetAllServerCpuListParameters

use of org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getCPUList.

public void getCPUList(AsyncQuery<List<ServerCpu>> aQuery, Version version) {
    aQuery.converterCallback = new ListConverter<>();
    Frontend.getInstance().runQuery(QueryType.GetAllServerCpuList, new GetAllServerCpuListParameters(version), aQuery);
}
Also used : GetAllServerCpuListParameters(org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters)

Aggregations

GetAllServerCpuListParameters (org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters)2 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 Comparator (java.util.Comparator)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 Set (java.util.Set)1 SortedSet (java.util.SortedSet)1 TreeSet (java.util.TreeSet)1 Collectors (java.util.stream.Collectors)1 ProfileEntry (org.ovirt.engine.core.aaa.ProfileEntry)1 ActionUtils (org.ovirt.engine.core.common.ActionUtils)1 AuditLogType (org.ovirt.engine.core.common.AuditLogType)1 EventNotificationEntity (org.ovirt.engine.core.common.EventNotificationEntity)1