[YANGTOOLS-62] Absense of qname for container directly under augmentation Created: 30/Nov/13  Updated: 10/Apr/22  Resolved: 27/Feb/14

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Ed Warnicke Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC



 Description   

If I have a model like:

augment "/inv:nodes/inv:node" {

ext:augment-identifier "node-meter-statistics";

container meter-statistics

{ //config "false"; uses meter-types:meter-statistics-reply; }

}

The generated MeterStatistics when added to a Node:

nodeData.addAugmentation(NodeMeterStatistics.class, meterStats.build());

Results in an exception on commit:

2013-11-29 18:15:25.098 IST [pool-18-thread-4] ERROR o.o.c.s.b.d.s.i.TransformerGenerator - Cannot compile DOM Codec for interface org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.NodeMeterStatistics
javassist.CannotCompileException: by javassist.CannotCompileException: [source error] no such field: org/opendaylight/yang/gen/v1/urn/opendaylight/meter/statistics/rev131111/NodeMeterStatistics$QNAME

Because NodeMeter Statistics is generated without a QNAME. Is that same container is wrapped in at the top level of the grouping:

meter-types:meter-statistics-reply

Then the grouping gets a QNAME and a pure 'uses' augmentation works.



 Comments   
Comment by Tony Tkacik [ 27/Feb/14 ]

If the augmentation is not explicitly named with yang-ext:augment-identifier
there is no qname to assign (normal augmentations does not have names).

Generated at Wed Feb 07 20:52:09 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.