use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName in project netvirt by opendaylight.
the class ElanL2GatewayMulticastUtils method deleteRemoteMcastMac.
/**
* Delete remote mcast mac from Hwvtep node.
*
* @param nodeId
* the node id
* @param logicalSwitchName
* the logical switch name
* @return the listenable future
*/
private ListenableFuture<Void> deleteRemoteMcastMac(NodeId nodeId, String logicalSwitchName) {
InstanceIdentifier<LogicalSwitches> logicalSwitch = HwvtepSouthboundUtils.createLogicalSwitchesInstanceIdentifier(nodeId, new HwvtepNodeName(logicalSwitchName));
RemoteMcastMacsKey remoteMcastMacsKey = new RemoteMcastMacsKey(new HwvtepLogicalSwitchRef(logicalSwitch), new MacAddress(ElanConstants.UNKNOWN_DMAC));
LOG.info("Deleting RemoteMcastMacs entry on node: {} for logical switch: {}", nodeId.getValue(), logicalSwitchName);
return HwvtepUtils.deleteRemoteMcastMac(broker, nodeId, remoteMcastMacsKey);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName in project netvirt by opendaylight.
the class ElanL2GatewayMulticastUtils method putRemoteMcastMac.
/**
* Put remote mcast mac in config DS.
*
* @param nodeId
* the node id
* @param logicalSwitchName
* the logical switch name
* @param tepIps
* the tep ips
*/
private static void putRemoteMcastMac(NodeId nodeId, String logicalSwitchName, ArrayList<IpAddress> tepIps) {
List<LocatorSet> locators = new ArrayList<>();
for (IpAddress tepIp : tepIps) {
HwvtepPhysicalLocatorAugmentation phyLocatorAug = HwvtepSouthboundUtils.createHwvtepPhysicalLocatorAugmentation(String.valueOf(tepIp.getValue()));
HwvtepPhysicalLocatorRef phyLocRef = new HwvtepPhysicalLocatorRef(HwvtepSouthboundUtils.createPhysicalLocatorInstanceIdentifier(nodeId, phyLocatorAug));
locators.add(new LocatorSetBuilder().setLocatorRef(phyLocRef).build());
}
HwvtepLogicalSwitchRef lsRef = new HwvtepLogicalSwitchRef(HwvtepSouthboundUtils.createLogicalSwitchesInstanceIdentifier(nodeId, new HwvtepNodeName(logicalSwitchName)));
RemoteMcastMacs remoteMcastMac = new RemoteMcastMacsBuilder().setMacEntryKey(new MacAddress(ElanConstants.UNKNOWN_DMAC)).setLogicalSwitchRef(lsRef).setLocatorSet(locators).build();
InstanceIdentifier<RemoteMcastMacs> iid = HwvtepSouthboundUtils.createRemoteMcastMacsInstanceIdentifier(nodeId, remoteMcastMac.getKey());
ResourceBatchingManager.getInstance().put(ResourceBatchingManager.ShardResource.CONFIG_TOPOLOGY, iid, remoteMcastMac);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName in project netvirt by opendaylight.
the class LogicalSwitchesCmdTest method buildData.
LogicalSwitches buildData(String name, String tunnelKey) {
LogicalSwitchesBuilder logicalSwitchesBuilder = new LogicalSwitchesBuilder();
logicalSwitchesBuilder.setKey(new LogicalSwitchesKey(new HwvtepNodeName(name)));
logicalSwitchesBuilder.setTunnelKey(tunnelKey);
logicalSwitchesBuilder.setHwvtepNodeName(new HwvtepNodeName(name));
return logicalSwitchesBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName in project netvirt by opendaylight.
the class PhysicalSwitchHelper method createInstanceIdentifier.
public static InstanceIdentifier<LogicalSwitches> createInstanceIdentifier(String logicalSwitch) {
NodeId id = dId.firstKeyOf(Node.class).getNodeId();
NodeKey nodeKey = new NodeKey(id);
InstanceIdentifier<LogicalSwitches> iid = null;
iid = InstanceIdentifier.builder(NetworkTopology.class).child(Topology.class, new TopologyKey(HwvtepSouthboundConstants.HWVTEP_TOPOLOGY_ID)).child(Node.class, nodeKey).augmentation(HwvtepGlobalAugmentation.class).child(LogicalSwitches.class, new LogicalSwitchesKey(new HwvtepNodeName(logicalSwitch))).build();
return iid;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName in project netvirt by opendaylight.
the class TestBuilders method buildLogicalSwitch.
public static LogicalSwitches buildLogicalSwitch(String logicalSwitch, String tunnelKey) {
LogicalSwitchesBuilder logicalSwitchesBuilder = new LogicalSwitchesBuilder();
logicalSwitchesBuilder.setKey(new LogicalSwitchesKey(new HwvtepNodeName(logicalSwitch)));
logicalSwitchesBuilder.setHwvtepNodeName(new HwvtepNodeName(logicalSwitch));
logicalSwitchesBuilder.setTunnelKey(tunnelKey);
Uuid lgoicalSwitchUuid = getUUid(logicalSwitch);
logicalSwitchesBuilder.setLogicalSwitchUuid(lgoicalSwitchUuid);
return logicalSwitchesBuilder.build();
}
Aggregations