Search in sources :

Example 11 with VnicProfileView

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

the class VnicProfileViewDaoTest method testGetAllForDataCenter.

/**
 * Ensures the right set of vnic profiles is returned for the given data center.
 */
@Test
public void testGetAllForDataCenter() {
    List<VnicProfileView> result = dao.getAllForDataCenter(FixturesTool.DATA_CENTER);
    assertNotNull(result);
    assertFalse(result.isEmpty());
    for (VnicProfileView profile : result) {
        assertEquals(FixturesTool.DATA_CENTER_NAME, profile.getDataCenterName());
    }
}
Also used : VnicProfileView(org.ovirt.engine.core.common.businessentities.network.VnicProfileView) Test(org.junit.Test)

Example 12 with VnicProfileView

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

the class MapVnicFlowTestUtils method profileViewOf.

static VnicProfileView profileViewOf(Guid profileId, String profileName, String networkName, Guid networkId) {
    VnicProfileView vpv = new VnicProfileView();
    vpv.setName(profileName);
    vpv.setNetworkName(networkName);
    vpv.setNetworkId(networkId);
    vpv.setId(profileId);
    return vpv;
}
Also used : VnicProfileView(org.ovirt.engine.core.common.businessentities.network.VnicProfileView)

Example 13 with VnicProfileView

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

the class VnicProfileMappingItem method selectTargetVnicProfileByPredicate.

private void selectTargetVnicProfileByPredicate(Predicate<VnicProfileView> predicate) {
    final VnicProfileView vnicProfile = Linq.firstOrDefault(targetVnicProfile.getItems(), predicate, VnicProfileView.EMPTY);
    targetVnicProfile.setSelectedItem(vnicProfile);
}
Also used : VnicProfileView(org.ovirt.engine.core.common.businessentities.network.VnicProfileView)

Example 14 with VnicProfileView

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

the class VnicProfileListModel method updateActionAvailability.

private void updateActionAvailability() {
    Collection<VnicProfileView> tempVar = getSelectedItems();
    Collection<VnicProfileView> selectedItems = tempVar != null ? tempVar : new ArrayList();
    getEditCommand().setIsExecutionAllowed(selectedItems.size() == 1);
    getRemoveCommand().setIsExecutionAllowed(selectedItems.size() > 0);
}
Also used : VnicProfileView(org.ovirt.engine.core.common.businessentities.network.VnicProfileView) ArrayList(java.util.ArrayList)

Example 15 with VnicProfileView

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

the class MapVnicFlowTestUtils method profileViewOf.

static VnicProfileView profileViewOf(String networkName, String profileName) {
    VnicProfileView vpv = new VnicProfileView();
    vpv.setNetworkName(networkName);
    vpv.setName(profileName);
    return vpv;
}
Also used : VnicProfileView(org.ovirt.engine.core.common.businessentities.network.VnicProfileView)

Aggregations

VnicProfileView (org.ovirt.engine.core.common.businessentities.network.VnicProfileView)22 ArrayList (java.util.ArrayList)5 Test (org.junit.Test)5 VmNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface)4 Network (org.ovirt.engine.core.common.businessentities.network.Network)2 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)2 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)2 Column (com.google.gwt.user.cellview.client.Column)1 List (java.util.List)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1 NetworkQoS (org.ovirt.engine.core.common.businessentities.network.NetworkQoS)1 QueryParametersBase (org.ovirt.engine.core.common.queries.QueryParametersBase)1 QueryType (org.ovirt.engine.core.common.queries.QueryType)1 Guid (org.ovirt.engine.core.compat.Guid)1 AbstractCheckboxColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractCheckboxColumn)1 AbstractDiskSizeColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractDiskSizeColumn)1 AbstractEnumColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractEnumColumn)1 AbstractImageResourceColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractImageResourceColumn)1 AbstractSafeHtmlColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractSafeHtmlColumn)1