Search in sources :

Example 76 with NodeKey

use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey in project openflowplugin by opendaylight.

the class LLDPLinkAgerTest method setUp.

@Before
public void setUp() throws Exception {
    lldpLinkAger = new LLDPLinkAger(getConfig(), notificationService, getConfigurationService(), eos);
    Mockito.when(link.getDestination()).thenReturn(new NodeConnectorRef(InstanceIdentifier.create(Nodes.class).child(Node.class, new NodeKey(new NodeId("openflow:1")))));
    Mockito.when(eos.getOwnershipState(Mockito.any(Entity.class))).thenReturn(Optional.of(EntityOwnershipState.IS_OWNER));
}
Also used : Entity(org.opendaylight.mdsal.eos.binding.api.Entity) NodeConnectorRef(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorRef) NodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId) NodeKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes) Before(org.junit.Before)

Example 77 with NodeKey

use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey in project openflowplugin by opendaylight.

the class DeviceStateUtilTest method createNodeInstanceIdentifierTest.

@Test
public void createNodeInstanceIdentifierTest() {
    final NodeId nodeId = new NodeId("dummyId");
    final KeyedInstanceIdentifier<Node, NodeKey> expectedII = InstanceIdentifier.create(Nodes.class).child(Node.class, new NodeKey(nodeId));
    final KeyedInstanceIdentifier<Node, NodeKey> nodeInstanceIdentifier = DeviceStateUtil.createNodeInstanceIdentifier(nodeId);
    assertEquals(expectedII, nodeInstanceIdentifier);
}
Also used : Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) NodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId) NodeKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes) Test(org.junit.Test)

Example 78 with NodeKey

use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey in project openflowplugin by opendaylight.

the class PacketOutConvertorTest method createNodeRef.

private static NodeRef createNodeRef(final String nodeId) {
    NodeKey key = new NodeKey(new NodeId(nodeId));
    InstanceIdentifier<Node> path = InstanceIdentifier.<Nodes>builder(Nodes.class).<Node, NodeKey>child(Node.class, key).build();
    return new NodeRef(path);
}
Also used : NodeRef(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) NodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId) NodeKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes)

Example 79 with NodeKey

use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey in project controller by opendaylight.

the class DataServiceIT method createNode.

private static UnorderedList createNode(final String string) {
    UnorderedListBuilder ret = new UnorderedListBuilder();
    UnorderedListKey nodeKey = new UnorderedListKey(string);
    ret.setKey(nodeKey);
    ret.setName("name of " + string);
    ret.setName("value of " + string);
    return ret.build();
}
Also used : UnorderedListBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.store.rev140422.lists.unordered.container.UnorderedListBuilder) UnorderedListKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.store.rev140422.lists.unordered.container.UnorderedListKey)

Example 80 with NodeKey

use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey in project controller by opendaylight.

the class EventSourceTopology method insert.

private void insert(final KeyedInstanceIdentifier<Node, NodeKey> sourcePath) {
    final NodeKey nodeKey = sourcePath.getKey();
    final InstanceIdentifier<Node1> augmentPath = sourcePath.augmentation(Node1.class);
    final Node1 nodeAgument = new Node1Builder().setEventSourceNode(new NodeId(nodeKey.getNodeId().getValue())).build();
    putData(OPERATIONAL, augmentPath, nodeAgument);
}
Also used : Node1(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.Node1) Node1Builder(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.Node1Builder) NodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId) NodeKey(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey)

Aggregations

NodeKey (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey)98 NodeId (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId)64 Node (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node)63 Nodes (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes)55 NodeKey (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey)47 Node (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node)42 NodeId (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId)33 FlowCapableNode (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode)31 Test (org.junit.Test)26 NodeBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder)19 Before (org.junit.Before)18 NetworkTopology (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology)18 TopologyKey (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey)18 NodeRef (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef)16 NodeConnectorRef (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorRef)15 ReadOnlyTransaction (org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction)14 NodeConnector (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector)14 NodeConnectorKey (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey)14 WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)12 ArrayList (java.util.ArrayList)11