use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs in project netvirt by opendaylight.
the class L2GwValidateCli method verifyMcastMac.
private boolean verifyMcastMac(String logicalSwitchName, InstanceIdentifier<Node> nodeIid) {
NodeId nodeId = nodeIid.firstKeyOf(Node.class).getNodeId();
HwvtepLogicalSwitchRef lsRef = new HwvtepLogicalSwitchRef(HwvtepSouthboundUtils.createLogicalSwitchesInstanceIdentifier(new NodeId(new Uri(nodeId)), new HwvtepNodeName(logicalSwitchName)));
RemoteMcastMacs remoteMcastMac = new RemoteMcastMacsBuilder().setMacEntryKey(new MacAddress(ElanConstants.UNKNOWN_DMAC)).setLogicalSwitchRef(lsRef).build();
InstanceIdentifier<RemoteMcastMacs> mcastMacIid = HwvtepSouthboundUtils.createRemoteMcastMacsInstanceIdentifier(new NodeId(new Uri(nodeId)), remoteMcastMac.getKey());
if (!isPresent(configNodesData, nodeIid, mcastMacIid)) {
pw.println("Failed to find config mcast mac for logical switch " + logicalSwitchName + " node id " + nodeId.getValue());
return false;
}
if (!isPresent(operationalNodesData, nodeIid, mcastMacIid)) {
pw.println("Failed to find operational mcast mac for logical switch " + logicalSwitchName + " node id " + nodeId.getValue());
return false;
}
return true;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs in project netvirt by opendaylight.
the class DhcpExternalTunnelManager method putRemoteMcastMac.
private WriteTransaction putRemoteMcastMac(WriteTransaction transaction, String elanName, L2GatewayDevice device, IpAddress internalTunnelIp) {
Optional<Node> optionalNode = getNode(broker, device.getHwvtepNodeId());
Node dstNode = optionalNode.get();
if (dstNode == null) {
LOG.trace("could not get device node {} ", device.getHwvtepNodeId());
return null;
}
RemoteMcastMacs macs = createRemoteMcastMac(dstNode, elanName, internalTunnelIp);
HwvtepUtils.putRemoteMcastMac(transaction, dstNode.getNodeId(), macs);
return transaction;
}
Aggregations