@Override public HostNetworkQos getHostNetworkQos() { return nic.getQos(); }
public NetworkInSyncWithVdsNetworkInterface(VdsNetworkInterface iface, Network network, HostNetworkQos hostNetworkQos, NetworkAttachment networkAttachment, DnsResolverConfiguration reportedDnsResolverConfiguration, Cluster cluster, boolean isDefaultRouteNetwork) { this.iface = iface; this.network = network; this.ifaceQos = iface.getQos(); this.isDefaultRouteNetwork = isDefaultRouteNetwork; this.hostNetworkQos = hostNetworkQos; this.networkAttachment = networkAttachment; this.reportedDnsResolverConfiguration = reportedDnsResolverConfiguration; this.cluster = cluster; }
public void updateAllInBatch(String procedureName, Collection<VdsNetworkInterface> paramValues, MapSqlParameterMapper<VdsNetworkInterface> mapper) { for (VdsNetworkInterface entity : paramValues) { hostNetworkQosDao.persistQosChanges(entity.getId(), entity.getQos()); } getCallsHandler().executeStoredProcAsBatch(procedureName, paramValues, mapper); }
@Override public void saveInterfaceForVds(VdsNetworkInterface nic) { hostNetworkQosDao.persistQosChanges(nic.getId(), nic.getQos()); MapSqlParameterSource parameterSource = createInterfaceParametersMapper(nic); getCallsHandler().executeModification("Insertvds_interface", parameterSource); }
@Override public void updateInterfaceForVds(VdsNetworkInterface nic) { hostNetworkQosDao.persistQosChanges(nic.getId(), nic.getQos()); getCallsHandler().executeModification("Updatevds_interface", createInterfaceParametersMapper(nic)); }
/** * Ensures that saving an interface for a VDS works as expected. */ @Test public void testSaveInterfaceForVds() { newVdsInterface.setVdsId(VDS_ID); dao.saveInterfaceForVds(newVdsInterface); dao.saveStatisticsForVds(newVdsStatistics); List<VdsNetworkInterface> result = dao.getAllInterfacesForVds(VDS_ID); boolean found = false; for (VdsNetworkInterface iface : result) { found |= iface.getName().equals(newVdsInterface.getName()) && iface.getQos().equals(newVdsInterface.getQos()); } assertTrue(found); }
private void testUpdateInterface(Guid interface_id) { VdsNetworkInterface iface = dao.get(interface_id); iface.setName(iface.getName().toUpperCase()); iface.setQos(newQos); dao.updateInterfaceForVds(iface); VdsNetworkInterface ifaced = dao.get(interface_id); assertEquals(iface.getName(), ifaced.getName()); assertEquals(iface.getQos(), ifaced.getQos()); verifyIpv6Properties(iface, ifaced); }
protected ToStringBuilder appendAttributes(ToStringBuilder tsb) { return tsb.append("id", getId()) .append("name", getName()) .append("vdsId", getVdsId()) .append("networkName", getNetworkName()) .append("ipv4BootProtocol", getIpv4BootProtocol()) .append("ipv4Address", getIpv4Address()) .append("ipv4Subnet", getIpv4Subnet()) .append("ipv4Gateway", getIpv4Gateway()) .append("ipv6BootProtocol", getIpv6BootProtocol()) .append("ipv6Address", getIpv6Address()) .append("ipv6Prefix", getIpv6Prefix()) .append("ipv6Gateway", getIpv6Gateway()) .append("mtu", getMtu()) .append("bridged", isBridged()) .append("reportedSwitchType", getReportedSwitchType()) .append("type", getType()) .append("networkImplementationDetails", getNetworkImplementationDetails()) .append("qos", getQos()) .append("adPartnerMac", getAdPartnerMac()) .append("adAggregatorId", adAggregatorId); }
HostNetworkQos qos = entity.getQos(); if (qos != null) { model.setQos(QosMapper.map(qos, null));