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());
}
}
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;
}
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);
}
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);
}
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;
}
Aggregations