Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


Is there a way to set the Id's on the nodes?

asked 2014-06-03 11:25:57 -0700

CobyS gravatar image

The node ids in open daylight appear to be pseudo random. Is there a way to programmatically set them to something else?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-06-03 21:53:44 -0700

updated 2014-06-03 21:55:00 -0700

Hi CobyS,

Not sure if this is what you are looking for - but this is how you can set the NodeId before publishing the Node to MD-SAL:

NotificationProviderService notifService = session.getSALService(NotificationProviderService.class)
NodeUpdatedBuilder builder = new NodeUpdatedBuilder();
NodeId nodeId = new NodeId("node_001"); //Setting node id
NodeKey nodeKey = new NodeKey(nodeId);
InstanceIdentifier<Node> identifier = InstanceIdentifier.builder(Nodes.class).child(Node.class, nodeKey).toInstance();
NodeRef nodeRef = new NodeRef(identifier);

Same is explained at below link:


edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-06-03 11:25:57 -0700

Seen: 257 times

Last updated: Jun 03 '14