use of org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration in project ovirt-engine by oVirt.
the class ReportedConfigurationsFillerTest method setUp.
@Before
public void setUp() {
hostId = Guid.newGuid();
clusterId = Guid.newGuid();
VdsStatic vdsStatic = new VdsStatic();
vdsStatic.setId(hostId);
vdsStatic.setClusterId(clusterId);
reportedDnsResolverConfiguration = new DnsResolverConfiguration();
VdsDynamic vdsDynamic = new VdsDynamic();
vdsDynamic.setId(hostId);
vdsDynamic.setReportedDnsResolverConfiguration(reportedDnsResolverConfiguration);
baseNic = createNic("eth0");
vlanNic = createNic("eth0.1");
vlanNic.setBaseInterface(baseNic.getName());
baseNicNetwork = createNetwork("baseNicNetwork");
vlanNetwork = createNetwork("vlanNicNetwork");
vlanNetwork.setVlanId(1);
baseNicNetworkQos = new HostNetworkQos();
baseNicNetworkQos.setId(baseNicNetwork.getQosId());
vlanNetworkQos = new HostNetworkQos();
vlanNetworkQos.setId(vlanNetwork.getQosId());
when(vdsStaticDao.get(hostId)).thenReturn(vdsStatic);
when(vdsDynamicDao.get(hostId)).thenReturn(vdsDynamic);
cluster = new Cluster();
cluster.setCompatibilityVersion(Version.v4_1);
when(clusterDao.get(any())).thenReturn(cluster);
}
use of org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration in project ovirt-engine by oVirt.
the class NetworkAttachmentDaoImpl method save.
@Override
public void save(NetworkAttachment entity) {
verifyRelationWithHostNetworkQos(entity);
hostNetworkQosDao.persistQosChanges(entity.getId(), asHostNetworkQos(entity.getHostNetworkQos()));
DnsResolverConfiguration dnsResolverConfiguration = entity.getDnsResolverConfiguration();
if (dnsResolverConfiguration != null) {
dnsResolverConfigurationDao.save(dnsResolverConfiguration);
}
super.save(entity);
}
use of org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration in project ovirt-engine by oVirt.
the class NetworkDaoImpl method save.
@Override
public void save(Network entity) {
DnsResolverConfiguration dnsResolverConfiguration = entity.getDnsResolverConfiguration();
if (dnsResolverConfiguration != null) {
dnsResolverConfigurationDao.save(dnsResolverConfiguration);
}
super.save(entity);
}
use of org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration in project ovirt-engine by oVirt.
the class NetworkAttachmentDaoImplTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
dao = dbFacade.getNetworkAttachmentDao();
dnsResolverConfigurationDao = dbFacade.getDnsResolverConfigurationDao();
networkAttachment = new NetworkAttachment();
networkAttachment.setNicId(FixturesTool.VDS_NETWORK_INTERFACE);
networkAttachment.setProperties(new HashMap<>());
networkAttachment.setId(Guid.newGuid());
networkAttachment.setNetworkId(FixturesTool.NETWORK_ENGINE);
networkAttachment.setIpConfiguration(createIpConfiguration(Ipv4BootProtocol.DHCP, Ipv6BootProtocol.AUTOCONF));
networkAttachment.setDnsResolverConfiguration(new DnsResolverConfiguration());
networkAttachment.getDnsResolverConfiguration().setNameServers(new ArrayList<>(Arrays.asList(new NameServer("1.1.1.1"))));
}
use of org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration in project ovirt-engine by oVirt.
the class DnsResolverConfigurationDaoTest method generateNewEntity.
@Override
protected DnsResolverConfiguration generateNewEntity() {
DnsResolverConfiguration dnsResolverConfiguration = new DnsResolverConfiguration();
dnsResolverConfiguration.setNameServers(new ArrayList<>(Arrays.asList(new NameServer("1.1.1.1"))));
return dnsResolverConfiguration;
}
Aggregations