Search in sources :

Example 1 with SrcnodeAugmentation

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentation in project netvirt by opendaylight.

the class LocalUcastCmd method transform.

@Override
public LocalUcastMacs transform(InstanceIdentifier<Node> nodePath, LocalUcastMacs src) {
    LocalUcastMacsBuilder ucmlBuilder = new LocalUcastMacsBuilder(src);
    ucmlBuilder.setLocatorRef(HwvtepHAUtil.convertLocatorRef(src.getLocatorRef(), nodePath));
    ucmlBuilder.setLogicalSwitchRef(HwvtepHAUtil.convertLogicalSwitchRef(src.getLogicalSwitchRef(), nodePath));
    String srcTorNodeId = ((InstanceIdentifier<LogicalSwitches>) src.getLogicalSwitchRef().getValue()).firstKeyOf(Node.class).getNodeId().getValue();
    SrcnodeAugmentation srcnodeAugmentation = new SrcnodeAugmentationBuilder().setSrcTorNodeid(srcTorNodeId).build();
    ucmlBuilder.addAugmentation(srcnodeAugmentation);
    ucmlBuilder.setMacEntryUuid(HwvtepHAUtil.getUUid(src.getMacEntryKey().getValue()));
    LocalUcastMacsKey key = new LocalUcastMacsKey(ucmlBuilder.getLogicalSwitchRef(), ucmlBuilder.getMacEntryKey());
    ucmlBuilder.withKey(key);
    return ucmlBuilder.build();
}
Also used : LocalUcastMacsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsBuilder) SrcnodeAugmentationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentationBuilder) SrcnodeAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentation) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) LocalUcastMacsKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsKey)

Example 2 with SrcnodeAugmentation

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentation in project netvirt by opendaylight.

the class LocalUcastMacListener method buildPrevLocalUcast.

public LocalUcastMacs buildPrevLocalUcast(LocalUcastMacs newLocalUcastMac, MacEntry prevElanMac) {
    LocalUcastMacsBuilder builder = new LocalUcastMacsBuilder(newLocalUcastMac);
    InstanceIdentifier<Node> nodePath = torNodeIdFromElanMac(prevElanMac);
    builder.setLocatorRef(convertLocatorRef(nodePath));
    builder.setLogicalSwitchRef(HwvtepHAUtil.convertLogicalSwitchRef(newLocalUcastMac.getLogicalSwitchRef(), nodePath));
    SrcnodeAugmentation srcnodeAugmentation = new SrcnodeAugmentationBuilder().setSrcTorNodeid(prevElanMac.getSrcTorNodeid()).build();
    builder.addAugmentation(srcnodeAugmentation);
    builder.setMacEntryUuid(HwvtepHAUtil.getUUid(newLocalUcastMac.getMacEntryKey().getValue()));
    LocalUcastMacsKey key = new LocalUcastMacsKey(builder.getLogicalSwitchRef(), builder.getMacEntryKey());
    builder.withKey(key);
    return builder.build();
}
Also used : LocalUcastMacsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsBuilder) SrcnodeAugmentationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentationBuilder) Node(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node) SrcnodeAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentation) LocalUcastMacsKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsKey)

Aggregations

SrcnodeAugmentation (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentation)2 SrcnodeAugmentationBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentationBuilder)2 LocalUcastMacsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsBuilder)2 LocalUcastMacsKey (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsKey)2 Node (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node)1 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)1