Search in sources :

Example 26 with TerminationPointKey

use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project genius by opendaylight.

the class OvsdbSouthboundTestUtil method createTerminationPointInstanceIdentifier.

public static InstanceIdentifier<TerminationPoint> createTerminationPointInstanceIdentifier(NodeKey nodeKey, String portName) {
    InstanceIdentifier<TerminationPoint> terminationPointPath = InstanceIdentifier.create(NetworkTopology.class).child(Topology.class, new TopologyKey(OVSDB_TOPOLOGY_ID)).child(Node.class, nodeKey).child(TerminationPoint.class, new TerminationPointKey(new TpId(portName)));
    LOG.debug("Termination point InstanceIdentifier generated : {}", terminationPointPath);
    return terminationPointPath;
}
Also used : TpId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId) TopologyKey(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey) TerminationPointKey(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey) NetworkTopology(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology) Node(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node) TerminationPoint(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint)

Example 27 with TerminationPointKey

use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project genius by opendaylight.

the class HwVTEPInterfaceConfigAddHelper method createPhysicalLocatorEntry.

/*
     * This method writes the termination end point details to the topology
     * Config DS
     */
private static void createPhysicalLocatorEntry(WriteTransaction transaction, InstanceIdentifier<TerminationPoint> tpPath, TerminationPointKey terminationPointKey, IpAddress destIPAddress) {
    TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
    HwvtepPhysicalLocatorAugmentationBuilder tpAugmentationBuilder = new HwvtepPhysicalLocatorAugmentationBuilder();
    tpBuilder.setKey(terminationPointKey);
    tpBuilder.setTpId(terminationPointKey.getTpId());
    tpAugmentationBuilder.setEncapsulationType(EncapsulationTypeVxlanOverIpv4.class);
    SouthboundUtils.setDstIp(tpAugmentationBuilder, destIPAddress);
    tpBuilder.addAugmentation(HwvtepPhysicalLocatorAugmentation.class, tpAugmentationBuilder.build());
    LOG.debug("creating physical locator entry for {}", terminationPointKey);
    transaction.put(LogicalDatastoreType.CONFIGURATION, tpPath, tpBuilder.build(), true);
}
Also used : HwvtepPhysicalLocatorAugmentationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepPhysicalLocatorAugmentationBuilder) TerminationPointBuilder(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder)

Aggregations

TerminationPointKey (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey)26 TerminationPoint (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint)20 TpId (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId)19 Node (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node)11 NodeKey (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey)8 TerminationPointBuilder (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder)7 NodeId (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId)6 CountDownLatch (java.util.concurrent.CountDownLatch)5 Test (org.junit.Test)5 Mockito.doReturn (org.mockito.Mockito.doReturn)5 DataTreeModification (org.opendaylight.controller.md.sal.binding.api.DataTreeModification)5 ReadWriteTransaction (org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction)5 TestUtils.newInvNodeKey (org.opendaylight.openflowplugin.applications.topology.manager.TestUtils.newInvNodeKey)5 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)5 Topology (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology)4 TestUtils.newLink (org.opendaylight.openflowplugin.applications.topology.manager.TestUtils.newLink)3 NetworkTopology (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology)3 TopologyBuilder (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyBuilder)3 TopologyKey (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey)3 NodeBuilder (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder)3