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));
}
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);
}
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);
}
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();
}
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);
}
Aggregations