use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.Identifier in project netvirt by opendaylight.
the class DhcpMcastMacListener method added.
@Override
protected void added(InstanceIdentifier<RemoteMcastMacs> identifier, RemoteMcastMacs add) {
String elanInstanceName = getElanName(add);
IpAddress tunnelIp = dhcpL2GwUtil.getHwvtepNodeTunnelIp(identifier.firstIdentifierOf(Node.class));
if (tunnelIp == null) {
LOG.error("Could not find tunnelIp for {}", identifier);
return;
}
List<BigInteger> dpns = DhcpServiceUtils.getListOfDpns(dataBroker);
BigInteger designatedDpnId = externalTunnelManager.designateDpnId(tunnelIp, elanInstanceName, dpns);
if (designatedDpnId == null || designatedDpnId.equals(DhcpMConstants.INVALID_DPID)) {
LOG.error("Unable to designate a DPN for {}", identifier);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.Identifier in project netvirt by opendaylight.
the class QosPolicyChangeListener method add.
private void add(InstanceIdentifier<DscpmarkingRules> identifier, DscpmarkingRules input) {
LOG.trace("Adding DscpMarkingRules : key: {}, value={}", identifier, input);
Uuid qosUuid = identifier.firstKeyOf(QosPolicy.class).getUuid();
for (Network network : qosNeutronUtils.getQosNetworks(qosUuid)) {
qosNeutronUtils.handleNeutronNetworkQosUpdate(network, qosUuid);
}
for (Port port : qosNeutronUtils.getQosPorts(qosUuid)) {
jobCoordinator.enqueueJob("QosPort-" + port.getUuid().getValue(), () -> {
WriteTransaction wrtConfigTxn = dataBroker.newWriteOnlyTransaction();
List<ListenableFuture<Void>> futures = new ArrayList<>();
qosNeutronUtils.setPortDscpMarking(port, input);
futures.add(wrtConfigTxn.submit());
return futures;
});
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.Identifier in project netvirt by opendaylight.
the class QosPolicyChangeListener method update.
private void update(InstanceIdentifier<DscpmarkingRules> identifier, DscpmarkingRules original, DscpmarkingRules update) {
LOG.trace("Updating DscpMarkingRules : key: {}, original value={}, update value={}", identifier, original, update);
Uuid qosUuid = identifier.firstKeyOf(QosPolicy.class).getUuid();
update(qosUuid, update);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.Identifier in project netvirt by opendaylight.
the class QosPolicyChangeListener method remove.
private void remove(InstanceIdentifier<DscpmarkingRules> identifier, DscpmarkingRules input) {
LOG.trace("Removing DscpMarkingRules : key: {}, value={}", identifier, input);
Uuid qosUuid = identifier.firstKeyOf(QosPolicy.class).getUuid();
for (Network network : qosNeutronUtils.getQosNetworks(qosUuid)) {
qosNeutronUtils.handleNeutronNetworkQosDscpRuleRemove(network);
}
for (Port port : qosNeutronUtils.getQosPorts(qosUuid)) {
jobCoordinator.enqueueJob("QosPort-" + port.getUuid().getValue(), () -> {
WriteTransaction wrtConfigTxn = dataBroker.newWriteOnlyTransaction();
List<ListenableFuture<Void>> futures = new ArrayList<>();
qosNeutronUtils.unsetPortDscpMark(port);
futures.add(wrtConfigTxn.submit());
return futures;
});
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.Identifier in project netvirt by opendaylight.
the class QosPolicyChangeListener method remove.
private void remove(InstanceIdentifier<BandwidthLimitRules> identifier, BandwidthLimitRules input) {
LOG.trace("Removing BandwidthLimitRules : key: {}, value={}", identifier, input);
Uuid qosUuid = identifier.firstKeyOf(QosPolicy.class).getUuid();
BandwidthLimitRulesBuilder bwLimitBuilder = new BandwidthLimitRulesBuilder();
BandwidthLimitRules zeroBwLimitRule = bwLimitBuilder.setMaxBurstKbps(BigInteger.ZERO).setMaxKbps(BigInteger.ZERO).build();
for (Network network : qosNeutronUtils.getQosNetworks(qosUuid)) {
qosAlertManager.removeFromQosAlertCache(network);
qosNeutronUtils.handleNeutronNetworkQosBwRuleRemove(network, zeroBwLimitRule);
}
for (Port port : qosNeutronUtils.getQosPorts(qosUuid)) {
qosAlertManager.removeFromQosAlertCache(port);
jobCoordinator.enqueueJob("QosPort-" + port.getUuid().getValue(), () -> {
WriteTransaction wrtConfigTxn = dataBroker.newWriteOnlyTransaction();
List<ListenableFuture<Void>> futures = new ArrayList<>();
qosNeutronUtils.setPortBandwidthLimits(port, zeroBwLimitRule, wrtConfigTxn);
futures.add(wrtConfigTxn.submit());
return futures;
});
}
}
Aggregations