use of org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations in project ovirt-engine by oVirt.
the class NetworkInSyncWithVdsNetworkInterfaceTest method testReportConfigurationsOnHostWhenIfaceQosIsNull.
@Test
public void testReportConfigurationsOnHostWhenIfaceQosIsNull() throws Exception {
ifaceQos = null;
iface.setQos(null);
NetworkInSyncWithVdsNetworkInterface testedInstanceWithSameNonQosValues = createTestedInstanceWithSameNonQosValues();
networkQos.setOutAverageLinkshare(1);
networkQos.setOutAverageUpperlimit(1);
networkQos.setOutAverageRealtime(1);
ReportedConfigurations reportedConfigurations = testedInstanceWithSameNonQosValues.reportConfigurationsOnHost();
assertThat(createTestedInstanceWithSameNonQosValues().isNetworkInSync(), is(false));
assertThat(reportedConfigurations.isNetworkInSync(), is(false));
List<ReportedConfiguration> reportedConfigurationList = reportedConfigurations.getReportedConfigurationList();
List<ReportedConfiguration> expectedReportedConfigurations = addReportedConfigurations(createBasicReportedConfigurations(), defaultRouteReportedConfiguration(false), new ReportedConfiguration(ReportedConfigurationType.OUT_AVERAGE_LINK_SHARE, null, networkQos.getOutAverageLinkshare(), false), new ReportedConfiguration(ReportedConfigurationType.OUT_AVERAGE_REAL_TIME, null, networkQos.getOutAverageRealtime(), false), new ReportedConfiguration(ReportedConfigurationType.OUT_AVERAGE_UPPER_LIMIT, null, networkQos.getOutAverageUpperlimit(), false));
assertThat(reportedConfigurationList.containsAll(expectedReportedConfigurations), is(true));
assertThat(reportedConfigurationList.size(), is(expectedReportedConfigurations.size()));
}
use of org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations in project ovirt-engine by oVirt.
the class NetworkInSyncWithVdsNetworkInterfaceTest method testReportConfigurationsOnHost.
@Test
public void testReportConfigurationsOnHost() throws Exception {
NetworkInSyncWithVdsNetworkInterface testedInstanceWithSameNonQosValues = createTestedInstanceWithSameNonQosValues();
ifaceQos.setOutAverageLinkshare(1);
ifaceQos.setOutAverageUpperlimit(1);
ifaceQos.setOutAverageRealtime(1);
ReportedConfigurations reportedConfigurations = testedInstanceWithSameNonQosValues.reportConfigurationsOnHost();
assertThat(reportedConfigurations.isNetworkInSync(), is(false));
List<ReportedConfiguration> reportedConfigurationList = reportedConfigurations.getReportedConfigurationList();
List<ReportedConfiguration> expectedReportedConfigurations = addReportedConfigurations(combineReportedConfigurations(createBasicReportedConfigurations(), reportQos(false)), defaultRouteReportedConfiguration(false));
assertThat(reportedConfigurationList.containsAll(expectedReportedConfigurations), is(true));
assertThat(reportedConfigurationList.size(), is(expectedReportedConfigurations.size()));
}
use of org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations in project ovirt-engine by oVirt.
the class ItemInfoPopup method filterSyncProperties.
/**
* will filter out all sync properties
* @param networkModel must be managed
*/
private List<ReportedConfiguration> filterSyncProperties(LogicalNetworkModel networkModel) {
ReportedConfigurations reportedConfigurations = networkModel.getReportedConfigurations();
List<ReportedConfiguration> reportedConfigurationList = reportedConfigurations.getReportedConfigurationList();
return Linq.where(reportedConfigurationList, reportedConfiguration -> !reportedConfiguration.isInSync());
}
Aggregations