Search in sources :

Example 66 with VDS

use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.

the class HostListModel method openCockpitWithoutSSO.

private void openCockpitWithoutSSO() {
    // https://[HOST_FQDN]:9000
    String cockpitPort = (String) AsyncDataProvider.getInstance().getConfigValuePreConverted(ConfigValues.CockpitPort);
    for (VDS item : getSelectedItems()) {
        // open new browser-tab for every selected host
        StringBuilder cockpitUrl = new StringBuilder();
        cockpitUrl.append(Uri.SCHEME_HTTPS);
        // $NON-NLS-1$
        cockpitUrl.append("://");
        cockpitUrl.append(item.getHostName());
        if (StringHelper.isNotNullOrEmpty(cockpitPort)) {
            cockpitUrl.append(':');
            cockpitUrl.append(cockpitPort);
        }
        // $NON-NLS-1$
        getLogger().info("About to open: " + cockpitUrl.toString());
        // $NON-NLS-1$
        Window.open(cockpitUrl.toString(), "_blank", "");
    }
}
Also used : VDS(org.ovirt.engine.core.common.businessentities.VDS)

Example 67 with VDS

use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.

the class HostListModel method setGlobalHaMaintenance.

private void setGlobalHaMaintenance(boolean enabled) {
    VDS vds = getSelectedItem();
    if (vds == null || !vds.getHighlyAvailableIsConfigured()) {
        return;
    }
    SetHaMaintenanceParameters params = new SetHaMaintenanceParameters(vds.getId(), HaMaintenanceMode.GLOBAL, enabled);
    Frontend.getInstance().runAction(ActionType.SetHaMaintenance, params);
}
Also used : VDS(org.ovirt.engine.core.common.businessentities.VDS) SetHaMaintenanceParameters(org.ovirt.engine.core.common.action.SetHaMaintenanceParameters)

Example 68 with VDS

use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.

the class HostSetupNetworksModel method queryFreeBonds.

private void queryFreeBonds() {
    // query for all unused, existing bonds on the host
    VDS vds = getEntity();
    Frontend.getInstance().runQuery(QueryType.GetVdsFreeBondsByVdsId, new IdQueryParameters(vds.getId()), new AsyncQuery<QueryReturnValue>(returnValue -> {
        allBonds = returnValue.getReturnValue();
        queryTLVInformation();
        initNetworkModels();
        initNicModels();
        stopProgress();
    }));
}
Also used : SortedSet(java.util.SortedSet) DnsResolverConfiguration(org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration) DataFromHostSetupNetworksModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel) NetworkInterfaceModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel) OperationCandidateEventArgs(org.ovirt.engine.ui.uicommonweb.models.hosts.network.OperationCandidateEventArgs) SimpleAction(org.ovirt.engine.ui.uicommonweb.action.SimpleAction) Event(org.ovirt.engine.ui.uicompat.Event) AnonymousHostNetworkQos(org.ovirt.engine.core.common.businessentities.network.AnonymousHostNetworkQos) SearchableListModel(org.ovirt.engine.ui.uicommonweb.models.SearchableListModel) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) ActionType(org.ovirt.engine.core.common.action.ActionType) UiVdcAction(org.ovirt.engine.ui.uicommonweb.action.UiVdcAction) AllNetworksSelector(org.ovirt.engine.ui.uicommonweb.models.hosts.VfsConfigModel.AllNetworksSelector) CreateOrUpdateBond(org.ovirt.engine.core.common.action.CreateOrUpdateBond) NetworkAttachment(org.ovirt.engine.core.common.businessentities.network.NetworkAttachment) AnonymousHostNetworkQos.fromHostNetworkQos(org.ovirt.engine.core.common.businessentities.network.AnonymousHostNetworkQos.fromHostNetworkQos) Map(java.util.Map) ConstantsManager(org.ovirt.engine.ui.uicompat.ConstantsManager) NicLabel(org.ovirt.engine.core.common.businessentities.network.NicLabel) EventArgs(org.ovirt.engine.ui.uicompat.EventArgs) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider) VdsActionParameters(org.ovirt.engine.core.common.action.VdsActionParameters) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) Collection(java.util.Collection) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) Set(java.util.Set) BusinessEntitiesDefinitions(org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions) Objects(java.util.Objects) LldpInfo(org.ovirt.engine.core.common.businessentities.network.LldpInfo) List(java.util.List) KeyValueModel(org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel) NetworkCommand(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand) Bond(org.ovirt.engine.core.common.businessentities.network.Bond) LogicalNetworkModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel) NetworkCommonUtils(org.ovirt.engine.core.common.utils.NetworkCommonUtils) EventDefinition(org.ovirt.engine.ui.uicompat.EventDefinition) HostNicVfsConfig(org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig) QueryType(org.ovirt.engine.core.common.queries.QueryType) HostSetupNetworksParameters(org.ovirt.engine.core.common.action.HostSetupNetworksParameters) Guid(org.ovirt.engine.core.compat.Guid) UiAction(org.ovirt.engine.ui.uicommonweb.action.UiAction) NewNetworkLabelModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel.NewNetworkLabelModel) HelpTag(org.ovirt.engine.ui.uicommonweb.help.HelpTag) Entities(org.ovirt.engine.core.common.businessentities.Entities) HashMap(java.util.HashMap) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) VdsNetworkInterface(org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Frontend(org.ovirt.engine.ui.frontend.Frontend) NetworkOperation(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation) LexoNumericComparator(org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator) Network(org.ovirt.engine.core.common.businessentities.network.Network) MapNetworkAttachments(org.ovirt.engine.core.common.utils.MapNetworkAttachments) FromNetworkAttachmentModel(org.ovirt.engine.ui.uicommonweb.models.hosts.InterfacePropertiesAccessor.FromNetworkAttachmentModel) UIMessages(org.ovirt.engine.ui.uicompat.UIMessages) HostNetworkQos(org.ovirt.engine.core.common.businessentities.network.HostNetworkQos) Model(org.ovirt.engine.ui.uicommonweb.models.Model) BondNetworkInterfaceModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.BondNetworkInterfaceModel) NetworkItemModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel) Iterator(java.util.Iterator) NetworkOperationFactory(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperationFactory) ConfigValues(org.ovirt.engine.core.common.config.ConfigValues) LogicalNetworkModelParametersHelper(org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModelParametersHelper) NetworkLabelModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel) BaseCommandTarget(org.ovirt.engine.ui.uicommonweb.BaseCommandTarget) Collections(java.util.Collections) VDS(org.ovirt.engine.core.common.businessentities.VDS) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) VDS(org.ovirt.engine.core.common.businessentities.VDS)

Example 69 with VDS

use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.

the class HostSetupNetworksModel method queryNetworks.

private void queryNetworks() {
    VDS vds = getEntity();
    // query for networks
    AsyncDataProvider.getInstance().getClusterNetworkList(new AsyncQuery<>(returnValue -> {
        allNetworks = returnValue;
        // chain the qoss query
        queryQoss();
    }), vds.getClusterId());
}
Also used : SortedSet(java.util.SortedSet) DnsResolverConfiguration(org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration) DataFromHostSetupNetworksModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel) NetworkInterfaceModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel) OperationCandidateEventArgs(org.ovirt.engine.ui.uicommonweb.models.hosts.network.OperationCandidateEventArgs) SimpleAction(org.ovirt.engine.ui.uicommonweb.action.SimpleAction) Event(org.ovirt.engine.ui.uicompat.Event) AnonymousHostNetworkQos(org.ovirt.engine.core.common.businessentities.network.AnonymousHostNetworkQos) SearchableListModel(org.ovirt.engine.ui.uicommonweb.models.SearchableListModel) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) ActionType(org.ovirt.engine.core.common.action.ActionType) UiVdcAction(org.ovirt.engine.ui.uicommonweb.action.UiVdcAction) AllNetworksSelector(org.ovirt.engine.ui.uicommonweb.models.hosts.VfsConfigModel.AllNetworksSelector) CreateOrUpdateBond(org.ovirt.engine.core.common.action.CreateOrUpdateBond) NetworkAttachment(org.ovirt.engine.core.common.businessentities.network.NetworkAttachment) AnonymousHostNetworkQos.fromHostNetworkQos(org.ovirt.engine.core.common.businessentities.network.AnonymousHostNetworkQos.fromHostNetworkQos) Map(java.util.Map) ConstantsManager(org.ovirt.engine.ui.uicompat.ConstantsManager) NicLabel(org.ovirt.engine.core.common.businessentities.network.NicLabel) EventArgs(org.ovirt.engine.ui.uicompat.EventArgs) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider) VdsActionParameters(org.ovirt.engine.core.common.action.VdsActionParameters) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) Collection(java.util.Collection) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) Set(java.util.Set) BusinessEntitiesDefinitions(org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions) Objects(java.util.Objects) LldpInfo(org.ovirt.engine.core.common.businessentities.network.LldpInfo) List(java.util.List) KeyValueModel(org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel) NetworkCommand(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand) Bond(org.ovirt.engine.core.common.businessentities.network.Bond) LogicalNetworkModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel) NetworkCommonUtils(org.ovirt.engine.core.common.utils.NetworkCommonUtils) EventDefinition(org.ovirt.engine.ui.uicompat.EventDefinition) HostNicVfsConfig(org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig) QueryType(org.ovirt.engine.core.common.queries.QueryType) HostSetupNetworksParameters(org.ovirt.engine.core.common.action.HostSetupNetworksParameters) Guid(org.ovirt.engine.core.compat.Guid) UiAction(org.ovirt.engine.ui.uicommonweb.action.UiAction) NewNetworkLabelModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel.NewNetworkLabelModel) HelpTag(org.ovirt.engine.ui.uicommonweb.help.HelpTag) Entities(org.ovirt.engine.core.common.businessentities.Entities) HashMap(java.util.HashMap) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) VdsNetworkInterface(org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Frontend(org.ovirt.engine.ui.frontend.Frontend) NetworkOperation(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation) LexoNumericComparator(org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator) Network(org.ovirt.engine.core.common.businessentities.network.Network) MapNetworkAttachments(org.ovirt.engine.core.common.utils.MapNetworkAttachments) FromNetworkAttachmentModel(org.ovirt.engine.ui.uicommonweb.models.hosts.InterfacePropertiesAccessor.FromNetworkAttachmentModel) UIMessages(org.ovirt.engine.ui.uicompat.UIMessages) HostNetworkQos(org.ovirt.engine.core.common.businessentities.network.HostNetworkQos) Model(org.ovirt.engine.ui.uicommonweb.models.Model) BondNetworkInterfaceModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.BondNetworkInterfaceModel) NetworkItemModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel) Iterator(java.util.Iterator) NetworkOperationFactory(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperationFactory) ConfigValues(org.ovirt.engine.core.common.config.ConfigValues) LogicalNetworkModelParametersHelper(org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModelParametersHelper) NetworkLabelModel(org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel) BaseCommandTarget(org.ovirt.engine.ui.uicommonweb.BaseCommandTarget) Collections(java.util.Collections) VDS(org.ovirt.engine.core.common.businessentities.VDS) VDS(org.ovirt.engine.core.common.businessentities.VDS)

Example 70 with VDS

use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.

the class HostSetupNetworksModel method queryInterfaces.

private void queryInterfaces() {
    VDS vds = getEntity();
    IdQueryParameters params = new IdQueryParameters(vds.getId());
    params.setRefresh(false);
    // query for interfaces
    Frontend.getInstance().runQuery(QueryType.GetVdsInterfacesByVdsId, params, new AsyncQuery<>((QueryReturnValue returnValue) -> {
        allExistingNics = returnValue.getReturnValue();
        existingVlanDevicesByVlanId = mapVlanDevicesByVlanId();
        initCreateOrUpdateBondParameters();
        initNicLabelsParameters();
        // chain the network attachments query
        queryNetworkAttachments();
    }));
}
Also used : QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) VDS(org.ovirt.engine.core.common.businessentities.VDS)

Aggregations

VDS (org.ovirt.engine.core.common.businessentities.VDS)578 ArrayList (java.util.ArrayList)160 Test (org.junit.Test)138 Guid (org.ovirt.engine.core.compat.Guid)132 List (java.util.List)78 VM (org.ovirt.engine.core.common.businessentities.VM)65 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)55 HashMap (java.util.HashMap)53 HashSet (java.util.HashSet)48 Map (java.util.Map)45 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)42 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)42 Set (java.util.Set)40 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)39 UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)39 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)39 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)38 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)38 ConstantsManager (org.ovirt.engine.ui.uicompat.ConstantsManager)37 Frontend (org.ovirt.engine.ui.frontend.Frontend)35