<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:15:34 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[NETCONF-658] RFC 8040 &quot;fields&quot; query fails if requested subelement missing</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-658</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;The RFC8040 implementation is too brittle to support real-word filtering situations. In this case, we&apos;re trying to retrieve the active alarm list from a set of components (logical-termination-points - LTPs).&lt;br/&gt;
The subelement that contains the alarm list does not exist in all LTPs, and if it is missing from any of the LTPs the entire query fails with error:&lt;br/&gt;
{&lt;br/&gt;
  &quot;errors&quot;: {&lt;br/&gt;
      &quot;error&quot;: [&lt;/p&gt;

{ &quot;error-message&quot;: &quot;Child ethernet-container-pac node missing in logical-termination-point&quot;,                &quot;error-tag&quot;: &quot;invalid-value&quot;,                 &quot;error-type&quot;: &quot;protocol&quot;             }
&lt;p&gt;        ]&lt;br/&gt;
    }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Query:&lt;br/&gt;
[http://controller:8181/rests/data/&lt;br/&gt;
about:blank]network-topology:network-topology/topology=topology-netconf/node=siae_alcplus2e_12969/yang-ext:mount/&lt;br/&gt;
core-model-1-4:control-construct?content=nonconfig&lt;br/&gt;
&amp;amp;fields=logical-termination-point(local-id;layer-protocol(administrative-state);ethernet-container-2-0:ethernet-container-pac(ethernet-container-current-problems))&lt;br/&gt;
Partial tree model:&lt;br/&gt;
module: ethernet-container-2-0&lt;br/&gt;
  augment /core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol:&lt;br/&gt;
    +--rw ethernet-container-pac&lt;br/&gt;
       .&lt;br/&gt;
       .&lt;br/&gt;
       .&lt;br/&gt;
       +--ro ethernet-container-current-problems&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;  +--ro current-problem-list* &lt;span class=&quot;error&quot;&gt;&amp;#91;sequence-number&amp;#93;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;     +--ro problem-name?       string&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;     +--ro sequence-number     int16&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;     +--ro timestamp?          yang:date-and-time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;     +--ro problem-severity?   severity-type&lt;br/&gt;
       .&lt;br/&gt;
       .&lt;br/&gt;
       .&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;


&lt;p&gt;Expected behavior:&lt;br/&gt;
If a particular subelement doesn&#8217;t exist, simply don&#8217;t return it.&lt;/p&gt;</description>
                <environment></environment>
        <key id="32457">NETCONF-658</key>
            <summary>RFC 8040 &quot;fields&quot; query fails if requested subelement missing</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.opendaylight.org/images/icons/priorities/critical.svg">High</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10001">Won&apos;t Do</resolution>
                                        <assignee username="allanclarke">Allan Clarke</assignee>
                                    <reporter username="allanclarke">Allan Clarke</reporter>
                        <labels>
                    </labels>
                <created>Wed, 4 Mar 2020 19:59:30 +0000</created>
                <updated>Fri, 6 Mar 2020 22:29:10 +0000</updated>
                            <resolved>Fri, 6 Mar 2020 22:29:10 +0000</resolved>
                                                                    <component>netconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                    <progress percentage="100">
                                    <originalProgress>
                                                    <row percentage="0" backgroundColor="#89afd7"/>
                                                    <row percentage="100" backgroundColor="transparent"/>
                                            </originalProgress>
                                                    <currentProgress>
                                                    <row percentage="100" backgroundColor="#51a825"/>
                                                    <row percentage="0" backgroundColor="#ec8e00"/>
                                            </currentProgress>
                            </progress>
                                    <aggregateprogress percentage="100">
                                    <originalProgress>
                                                    <row percentage="0" backgroundColor="#89afd7"/>
                                                    <row percentage="100" backgroundColor="transparent"/>
                                            </originalProgress>
                                                    <currentProgress>
                                                    <row percentage="100" backgroundColor="#51a825"/>
                                                    <row percentage="0" backgroundColor="#ec8e00"/>
                                            </currentProgress>
                            </aggregateprogress>
                                            <timeestimate seconds="0">0 minutes</timeestimate>
                            <timespent seconds="50400">1 day, 6 hours</timespent>
                                <comments>
                            <comment id="67933" author="allanclarke" created="Wed, 4 Mar 2020 20:05:36 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-657&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.opendaylight.org/browse/NETCONF-657&lt;/a&gt; (useful resources and links in the comments)&lt;/p&gt;</comment>
                            <comment id="67934" author="allanclarke" created="Wed, 4 Mar 2020 20:09:36 +0000"  >&lt;p&gt;Workflow...&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Create YANG models suitable for reproduction and confirm with reporter (DONE)&lt;/li&gt;
	&lt;li&gt;Confirm buggy behavior (IN-PROGRESS)&lt;/li&gt;
	&lt;li&gt;Review NETCONF code around defect&lt;/li&gt;
	&lt;li&gt;Propose change/design&lt;/li&gt;
	&lt;li&gt;Implement unit test showing defect&lt;/li&gt;
	&lt;li&gt;Implement code change&lt;/li&gt;
	&lt;li&gt;Get QA sign off on feature coverage&lt;/li&gt;
	&lt;li&gt;Get 3rd party acceptance of implementation (see original reporter, Frank Sandoval @ Lumina)&lt;/li&gt;
	&lt;li&gt;PR and review process&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="67935" author="allanclarke" created="Wed, 4 Mar 2020 20:13:25 +0000"  >&lt;p&gt;Resources...&lt;br/&gt;
&lt;a href=&quot;https://tools.ietf.org/html/rfc8040#section-1.1.6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/rfc8040#section-1.1.6&lt;/a&gt; (RESTCONF)&lt;br/&gt;
&lt;a href=&quot;https://tools.ietf.org/html/draft-ietf-netconf-yang-patch-14&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/draft-ietf-netconf-yang-patch-14&lt;/a&gt; (Yang Patch)&lt;br/&gt;
&lt;a href=&quot;https://docs.opendaylight.org/en/latest/developer-guide/yang-tools.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.opendaylight.org/en/latest/developer-guide/yang-tools.html&lt;/a&gt; (YangTools)&lt;br/&gt;
&lt;a href=&quot;https://tools.ietf.org/html/rfc7950&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/rfc7950&lt;/a&gt; (Yang)&lt;/p&gt;</comment>
                            <comment id="67936" author="allanclarke" created="Wed, 4 Mar 2020 21:21:36 +0000"  >&lt;p&gt;&lt;br/&gt;
karaf&amp;gt; feature:install odl-restconf odl-netconf-topology odl-restconf-nb-rfc8040 odl-netconf-connector-all&lt;/p&gt;</comment>
                            <comment id="67948" author="allanclarke" created="Fri, 6 Mar 2020 21:22:07 +0000"  >&lt;p&gt;Ran testtool loaded with directory of attached Yang models...&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
echo &lt;span class=&quot;code-quote&quot;&gt;&quot;Starting testtool (port=17830,cred=admin/admin) using extra schemas...&quot;&lt;/span&gt;
java -jar ./netconf/tools/netconf-testtool/target/netconf-testtool-*-SNAPSHOT-executable.jar  --device-count 1  --schemas-dir ./extra_schemas/netconf-658b --md-sal &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="67949" author="allanclarke" created="Fri, 6 Mar 2020 22:17:51 +0000"  >&lt;p&gt;Use the attached Postman collection to mount testtool as device, create content, apply query&lt;/p&gt;</comment>
                            <comment id="67950" author="allanclarke" created="Fri, 6 Mar 2020 22:25:40 +0000"  >&lt;p&gt;So I got the back haul model 3 Yang files loaded into testtool (acting as a device).&lt;/p&gt;

&lt;p&gt;I made minor modifications by commenting out some of the model so my payloads were simpler.&lt;/p&gt;


&lt;p&gt;I created an instance in the device and the read gave this, which looks fine to me: &lt;/p&gt;

&lt;p&gt;&amp;lt;control-construct xmlns=&quot;urn:onf:yang:core-model-1-4&quot;&amp;gt;&lt;/p&gt;

&lt;p&gt;    &amp;lt;logical-termination-point&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;uuid&amp;gt;xyz&amp;lt;/uuid&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;layer-protocol&amp;gt;&lt;/p&gt;

&lt;p&gt;            &amp;lt;local-id&amp;gt;foobar&amp;lt;/local-id&amp;gt;&lt;/p&gt;

&lt;p&gt;            &amp;lt;ethernet-container-pac xmlns=&quot;urn:onf:yang:ethernet-container-2-0&quot;&amp;gt;&lt;/p&gt;

&lt;p&gt;                &amp;lt;ethernet-container-current-problems&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;sequence-number&amp;gt;3&amp;lt;/sequence-number&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;problem-severity&amp;gt;SEVERITY_TYPE_MINOR&amp;lt;/problem-severity&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;timestamp&amp;gt;2020-03-06T11:00:02Z&amp;lt;/timestamp&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;/current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;sequence-number&amp;gt;2&amp;lt;/sequence-number&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;timestamp&amp;gt;2020-03-06T11:00:01Z&amp;lt;/timestamp&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;problem-name&amp;gt;bar&amp;lt;/problem-name&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;/current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;sequence-number&amp;gt;1&amp;lt;/sequence-number&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;problem-severity&amp;gt;SEVERITY_TYPE_CRITICAL&amp;lt;/problem-severity&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;timestamp&amp;gt;2020-03-06T11:00:00Z&amp;lt;/timestamp&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;problem-name&amp;gt;foo&amp;lt;/problem-name&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;/current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                &amp;lt;/ethernet-container-current-problems&amp;gt;&lt;/p&gt;

&lt;p&gt;            &amp;lt;/ethernet-container-pac&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;/layer-protocol&amp;gt;&lt;/p&gt;

&lt;p&gt;    &amp;lt;/logical-termination-point&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;/control-construct&amp;gt;&lt;/p&gt;


&lt;p&gt;I ran the original query URL (ignore the missing content type) from the JIRA issue, shown below: &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://127.0.0.1:8181/rests/data/network-topology:network-topology/topology=topology-netconf/node=testtool/yang-ext:mount/core-model-1-4:control-construct?fields=logical-termination-point(local-id;layer-protocol(administrative-state);ethernet-container-2-0:ethernet-container-pac(ethernet-container-current-problems&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://127.0.0.1:8181/rests/data/network-topology:network-topology/topology=topology-netconf/node=testtool/yang-ext:mount/core-model-1-4:control-construct?fields=logical-termination-point(local-id;layer-protocol(administrative-state);ethernet-container-2-0:ethernet-container-pac(ethernet-container-current-problems&lt;/a&gt;))&lt;/p&gt;


&lt;p&gt;It resulted in the following error:&lt;/p&gt;

&lt;p&gt;&amp;lt;errors xmlns=&quot;urn:ietf:params:xml:ns:yang:ietf-restconf&quot;&amp;gt;&lt;/p&gt;

&lt;p&gt;    &amp;lt;error&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;error-message&amp;gt;Child ethernet-container-pac node missing in logical-termination-point&amp;lt;/error-message&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;error-tag&amp;gt;invalid-value&amp;lt;/error-tag&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;error-type&amp;gt;protocol&amp;lt;/error-type&amp;gt;&lt;/p&gt;

&lt;p&gt;    &amp;lt;/error&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;/errors&amp;gt;&lt;/p&gt;



&lt;p&gt;I think that URL is not compatible with the Yang model. I changed the query URL to be:&lt;/p&gt;

&lt;p&gt; &lt;a href=&quot;http://127.0.0.1:8181/rests/data/network-topology:network-topology/topology=topology-netconf/node=testtool/yang-ext:mount/core-model-1-4:control-construct?fields=logical-termination-point(local-id;layer-protocol(administrative-state;ethernet-container-2-0:ethernet-container-pac(ethernet-container-current-problems&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://127.0.0.1:8181/rests/data/network-topology:network-topology/topology=topology-netconf/node=testtool/yang-ext:mount/core-model-1-4:control-construct?fields=logical-termination-point(local-id;layer-protocol(administrative-state;ethernet-container-2-0:ethernet-container-pac(ethernet-container-current-problems&lt;/a&gt;)))&lt;/p&gt;


&lt;p&gt;So this resulted in a successful query, yielding:&lt;/p&gt;

&lt;p&gt;&amp;lt;control-construct xmlns=&quot;urn:onf:yang:core-model-1-4&quot;&amp;gt;&lt;/p&gt;

&lt;p&gt;    &amp;lt;logical-termination-point&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;layer-protocol&amp;gt;&lt;/p&gt;

&lt;p&gt;            &amp;lt;ethernet-container-pac xmlns=&quot;urn:onf:yang:ethernet-container-2-0&quot;&amp;gt;&lt;/p&gt;

&lt;p&gt;                &amp;lt;ethernet-container-current-problems&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;sequence-number&amp;gt;3&amp;lt;/sequence-number&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;problem-severity&amp;gt;SEVERITY_TYPE_MINOR&amp;lt;/problem-severity&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;timestamp&amp;gt;2020-03-06T11:00:02Z&amp;lt;/timestamp&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;/current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;sequence-number&amp;gt;2&amp;lt;/sequence-number&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;timestamp&amp;gt;2020-03-06T11:00:01Z&amp;lt;/timestamp&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;problem-name&amp;gt;bar&amp;lt;/problem-name&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;/current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;sequence-number&amp;gt;1&amp;lt;/sequence-number&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;problem-severity&amp;gt;SEVERITY_TYPE_CRITICAL&amp;lt;/problem-severity&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;timestamp&amp;gt;2020-03-06T11:00:00Z&amp;lt;/timestamp&amp;gt;&lt;/p&gt;

&lt;p&gt;                        &amp;lt;problem-name&amp;gt;foo&amp;lt;/problem-name&amp;gt;&lt;/p&gt;

&lt;p&gt;                    &amp;lt;/current-problem-list&amp;gt;&lt;/p&gt;

&lt;p&gt;                &amp;lt;/ethernet-container-current-problems&amp;gt;&lt;/p&gt;

&lt;p&gt;            &amp;lt;/ethernet-container-pac&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;/layer-protocol&amp;gt;&lt;/p&gt;

&lt;p&gt;    &amp;lt;/logical-termination-point&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;/control-construct&amp;gt;&lt;/p&gt;


&lt;p&gt;So the original URL shows an error that is really more of a &#8220;typo&#8221; in the query.&lt;/p&gt;</comment>
                            <comment id="67951" author="allanclarke" created="Fri, 6 Mar 2020 22:29:10 +0000"  >&lt;p&gt;Not a bug. User error.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="15607" name="NETCONF-658.postman_collection.json" size="36109" author="allanclarke" created="Fri, 6 Mar 2020 22:17:13 +0000"/>
                            <attachment id="15606" name="netconf-658b.zip" size="60491" author="allanclarke" created="Fri, 6 Mar 2020 21:22:18 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03rbz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>