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


"Node must contains all keys." when trying to post flow group data to the yang data tree.

asked 2014-05-29 19:30:32 -0700

CobyS gravatar image

updated 2014-05-29 19:46:31 -0700

I am trying to add a flow Group under a Node and I am getting the error stated in the question. Can anyone provide some insight into what keys the API is complaining about. Here is the code snippet that reports the error. It is in

public static Map<qname,object> getKeyMap(CompositeNode node, List<qname> keys) { Map<qname,object> map = new HashMap<>(); for(QName key : keys) { SimpleNode keyNode = node.getFirstSimpleByName(QName.create(node.getNodeType(), key.getLocalName())); checkArgument(keyNode != null,"Node must contains all keys."); Object value = keyNode.getValue(); map.put(key, value);</qname,object></qname></qname,object>

    return map;

The node type is "bucket"

Here is the callstack:

osgi> Initializing session 2014-05-29 19:43:04.777 PDT [pool-19-thread-4] ERROR o.o.c.m.s.c.i.service.TwoPhaseCommit - Transaction: DOM-355727 Request Commit failed java.lang.IllegalArgumentException: Node must contains all keys. at ~[bundlefile:na] at ~[na:na] at ~[na:na] at ~[na:na] at ~[na:na] at ~[na:na] at ~[na:na] at ~[na:na] at ~[na:na] at ~[na:na] at ~[na:na] at ~[na:na] at$NormalizedDataModification.mergeConfigurationData( ~[na:na] at$NormalizedDataModification.mergeConfigurationData( ~[na:na] at ~[bundlefile:na] at ~[na:na] at ~[na:na] at [bundlefile:na] at [bundlefile:na] at [na:1.7.055] at java.util.concurrent.ThreadPoolExecutor.runWorker( [na:1.7.055] at java.util.concurrent.ThreadPoolExecutor$ [na:1.7.055] at [na:1.7.055] 2014-05-29 19:43:04.778 PDT [nioEventLoopGroup-9-1] WARN o.o.o.p.i.s ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-30 00:10:32 -0700

Tony Tkacik gravatar image

Your object (or one of its subobjects) which you are trying to store to datastore implements Identifiable interface nd in YANG is modeled as list, with key statement present. In order to store that object you must specify key for all list items you are storing.

See Bucket class and BucketBuilder for getKey and setKey method.

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

Question Tools

1 follower


Asked: 2014-05-29 19:30:32 -0700

Seen: 5,192 times

Last updated: May 30 '14