[YANGTOOLS-446] Union node doesn't contain children types in parsed XML Created: 14/Apr/15  Updated: 10/Apr/22  Resolved: 04/Jan/16

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

Type: Bug
Reporter: Zdenko Krnac Assignee: Peter Kajsa
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


External issue ID: 2993

 Description   

I've just built a controller (2015-04-14) with odl-netconf-monitoring feature activated and when I call a request /restconf/modules/module/ietf-netconf-monitoring/2010-10-04/schema I get this data :

<leaf-list name="location">
<type name="union"></type>
<config value="false"></config>
<ordered-by value="system"></ordered-by>
<status value="current"></status>
<description>
<text>One or more locations from which the schema can be
retrieved. This list SHOULD contain at least one
entry per schema.

A schema entry may be located on a remote file system
(e.g., reference to file system for ftp retrieval) or
retrieved directly from a server supporting the
<get-schema> operation (denoted by the value 'NETCONF').</text>
</description>
</leaf-list>

In file in controller opendaylight/netconf/ietf-netconf-monitoring/src/main/yang/ietf-netconf-monitoring.yang are data :

leaf-list location {
type union {
type enumeration {
enum "NETCONF"

{ value 0; }

}
type inet:uri;
}
description
"One or more locations from which the schema can be
retrieved. This list SHOULD contain at least one
entry per schema.

A schema entry may be located on a remote file system
(e.g., reference to file system for ftp retrieval) or
retrieved directly from a server supporting the
<get-schema> operation (denoted by the value 'NETCONF').";
}
} // list schema



 Comments   
Comment by Peter Kajsa [ 11/Dec/15 ]

The bug is fixed on current master branch. Output of the reguest is correct (please see below). Please retry and let us know the result.

<leaf-list name="location">
<type name="union">
<type name="enumeration">
<enum name="NETCONF">
<value value="0"></value>
<status value="current"></status>
</enum>
</type>
<type name="inet:uri"></type>
</type>
<config value="true"></config>
<min-elements value="0"></min-elements>
<max-elements value="2147483647"></max-elements>
<ordered-by value="system"></ordered-by>
<status value="current"></status>
<description>
<text>One or more locations from which the
schema can be
retrieved. This list SHOULD contain at least one
entry per schema.

A schema entry may be located on a remote file system
(e.g., reference to file system for ftp retrieval) or
retrieved directly from a server supporting the
<get-schema> operation (denoted by the value 'NETCONF').</text>
</description>
</leaf-list>

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