use of org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface in project ovirt-engine by oVirt.
the class HostNetworkAttachmentsPersister method initReportedNetworksAndNics.
private void initReportedNetworksAndNics(List<VdsNetworkInterface> nics) {
for (VdsNetworkInterface nic : nics) {
if (nic.getNetworkName() != null) {
Network network = clusterNetworks.get(nic.getNetworkName());
if (network != null) {
reportedNetworksById.put(network.getId(), network);
reportedNicsByNetworkId.put(network.getId(), nic);
}
}
}
}
use of org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface in project ovirt-engine by oVirt.
the class HostNetworkInterfacesPersisterImpl method createNewInterfaces.
private void createNewInterfaces() {
List<VdsNetworkInterface> nicsForCreate = prepareNicsForCreate();
for (VdsNetworkInterface nicForCreate : nicsForCreate) {
interfaceDao.saveInterfaceForVds(nicForCreate);
interfaceDao.saveStatisticsForVds(nicForCreate.getStatistics());
}
}
use of org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface in project ovirt-engine by oVirt.
the class HostNetworkAttachmentsPersisterTest method createVdsNetworkInterface.
private VdsNetworkInterface createVdsNetworkInterface(Guid id, String name) {
VdsNetworkInterface vdsNetworkInterface = new VdsNetworkInterface();
vdsNetworkInterface.setName(name);
vdsNetworkInterface.setId(id);
return vdsNetworkInterface;
}
use of org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface in project ovirt-engine by oVirt.
the class ExecuteNetworkCommandInNetworkOperationTest method assertBond.
private void assertBond(CreateOrUpdateBond bond, Guid bondId, List<VdsNetworkInterface> slaves) {
// $NON-NLS-1$
assertThat("id mismatch", bond.getId(), is(bondId));
for (VdsNetworkInterface slave : slaves) {
// $NON-NLS-1$
assertThat("missing slave", bond.getSlaves().contains(slave.getName()), is(true));
}
// $NON-NLS-1$
assertThat("invalid slaves count", bond.getSlaves().size(), is(slaves.size()));
}
use of org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface in project ovirt-engine by oVirt.
the class ReportedConfigurationsFiller method fillReportedConfigurations.
private void fillReportedConfigurations(Map<String, VdsNetworkInterface> networkNameToNicMap, BusinessEntityMap<Network> networkMap, NetworkAttachment networkAttachment, DnsResolverConfiguration reportedDnsResolverConfiguration, Cluster cluster) {
Network network = networkMap.get(networkAttachment.getNetworkId());
VdsNetworkInterface nic = getNicToWhichIsNetworkAttached(networkNameToNicMap, networkMap, networkAttachment);
if (nic != null) {
NetworkInSyncWithVdsNetworkInterface isInSync = createNetworkInSyncWithVdsNetworkInterface(networkAttachment, nic, network, reportedDnsResolverConfiguration, cluster);
ReportedConfigurations reportedConfigurations = isInSync.reportConfigurationsOnHost();
networkAttachment.setReportedConfigurations(reportedConfigurations);
}
}
Aggregations