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

Revision history [back]

click to hide/show revision 1
initial version

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

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 YangDataUtils.java

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);

    }
    return map;
}

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

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 YangDataUtils.java

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);

    }
    return map;
}

The node type is "bucket"

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

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 YangDataUtils.java

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);

    }
    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 com.google.common.base.Preconditions.checkArgument(Preconditions.java:92) ~[bundlefile:na] at org.opendaylight.controller.sal.dom.broker.util.YangDataUtils.getKeyMap(YangDataUtils.java:44) ~[na:na] at org.opendaylight.controller.sal.dom.broker.util.YangDataUtils.toIndexMap(YangDataUtils.java:32) ~[na:na] at org.opendaylight.controller.sal.dom.broker.util.YangDataOperations.mergeMultiple(YangDataOperations.java:103) ~[na:na] at org.opendaylight.controller.sal.dom.broker.util.YangDataOperations.mergeMultiple(YangDataOperations.java:219) ~[na:na] at org.opendaylight.controller.sal.dom.broker.util.YangDataOperations.mergeContainer(YangDataOperations.java:187) ~[na:na] at org.opendaylight.controller.sal.dom.broker.util.YangDataOperations.merge(YangDataOperations.java:48) ~[na:na] at org.opendaylight.controller.sal.dom.broker.util.YangDataOperations.mergeMultiple(YangDataOperations.java:84) ~[na:na] at org.opendaylight.controller.sal.dom.broker.util.YangDataOperations.mergeMultiple(YangDataOperations.java:213) ~[na:na] at org.opendaylight.controller.sal.dom.broker.util.YangDataOperations.mergeContainer(YangDataOperations.java:187) ~[na:na] at org.opendaylight.controller.sal.dom.broker.util.YangDataOperations.merge(YangDataOperations.java:48) ~[na:na] at org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareDataStoreAdapter.mergeData(SchemaAwareDataStoreAdapter.java:153) ~[na:na] at org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareDataStoreAdapter$NormalizedDataModification.mergeConfigurationData(SchemaAwareDataStoreAdapter.java:312) ~[na:na] at org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareDataStoreAdapter$NormalizedDataModification.mergeConfigurationData(SchemaAwareDataStoreAdapter.java:283) ~[na:na] at org.opendaylight.controller.md.sal.common.impl.AbstractDataModification.putConfigurationData(AbstractDataModification.java:77) ~[bundlefile:na] at org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareDataStoreAdapter.prepareMergedTransaction(SchemaAwareDataStoreAdapter.java:170) ~[na:na] at org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareDataStoreAdapter.requestCommit(SchemaAwareDataStoreAdapter.java:109) ~[na:na] at org.opendaylight.controller.md.sal.common.impl.service.TwoPhaseCommit.call(TwoPhaseCommit.java:83) [bundlefile:na] at org.opendaylight.controller.md.sal.common.impl.service.TwoPhaseCommit.call(TwoPhaseCommit.java:38) [bundlefile:na] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.055] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.055] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.055] at java.lang.Thread.run(Thread.java:744) [na:1.7.055] 2014-05-29 19:43:04.778 PDT [nioEventLoopGroup-9-1] WARN o.o.o.p.i.s.SerializationFactory - No correct encoder found in EncoderTable for arguments: msgVersion: 1 msgType: org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GroupModInputBuilder$GroupModInputImpl 2014-05-29 19:43:04.779 PDT [nioEventLoopGroup-9-1] WARN o.o.o.protocol.impl.core.OFEncoder - Translated buffer is empty