Search in sources :

Example 6 with LocalMcastMacs

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalMcastMacs in project netvirt by opendaylight.

the class NetworkL2gwDeviceInfoCli method printLocalMcastMacs.

@SuppressWarnings("checkstyle:HiddenField")
void printLocalMcastMacs(Node hwvtepNode, String elanName) {
    session.getConsole().println("LocalMcast macs :");
    session.getConsole().println(HEADINGMCAST);
    if (hwvtepNode == null || hwvtepNode.getAugmentation(HwvtepGlobalAugmentation.class) == null) {
        return;
    }
    List<LocalMcastMacs> localMcastMacs = hwvtepNode.getAugmentation(HwvtepGlobalAugmentation.class).getLocalMcastMacs();
    if (localMcastMacs == null || localMcastMacs.isEmpty()) {
        return;
    }
    for (LocalMcastMacs localMac : localMcastMacs) {
        String lsFromLocalMac = getLogicalSwitchValue(localMac.getLogicalSwitchRef());
        if (elanName.equals(lsFromLocalMac)) {
            String mac = localMac.getMacEntryKey().getValue();
            List<String> locatorsets = new ArrayList<>();
            for (LocatorSet locatorSet : localMac.getLocatorSet()) {
                locatorsets.add(getLocatorValue(locatorSet.getLocatorRef()));
            }
            session.getConsole().println(mac + GAP + locatorsets.toString());
        }
    }
}
Also used : LocatorSet(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.locator.set.attributes.LocatorSet) HwvtepGlobalAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation) ArrayList(java.util.ArrayList) LocalMcastMacs(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalMcastMacs)

Aggregations

LocatorSet (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.locator.set.attributes.LocatorSet)4 ArrayList (java.util.ArrayList)3 HwvtepGlobalAugmentation (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation)3 LocalMcastMacs (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalMcastMacs)2 LocalMcastMacsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalMcastMacsBuilder)2 LocalMcastMacsKey (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalMcastMacsKey)2 LocatorSetBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.locator.set.attributes.LocatorSetBuilder)2 LocalMcastCmd (org.opendaylight.netvirt.elan.l2gw.ha.commands.LocalMcastCmd)1 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)1 HwvtepLogicalSwitchRef (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepLogicalSwitchRef)1 HwvtepNodeName (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName)1 LogicalSwitches (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches)1