Your question seems to be whether the server should return the
canonical format or the format used in the request. My take is that
the server should always return the canonical format. See RFC 7950
Section 9.1.

/js

On Tue, Aug 29, 2023 at 01:01:42AM +0800, 老空楼 wrote:
> If a list key is date-and-time type, is it a little bit strange for a netconf 
> server to reply data with key value different from that in get/get-config 
> request ?
> 
> Demo module:
> 
> module test {
> 
> namespace "urn:test";
> 
> prefix test;
> 
> import ietf-yang-types {
> 
> prefix yang;
> 
> }
> 
> container con {
> 
> list time-range {
> 
> key "start-time";
> 
> leaf start-time {
> 
> type yang:date-and-time;
> 
> }
> 
> leaf else {
> 
> type string;
> 
> }
> 
> }
> 
> }
> 
> }
> 
> Suppose a client send a get rpc to query the /test:con 
> <get xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <filter type="subtree">
> <con xmlns="urn:test">
> </con>
> </filter>
> </get>
> and the server reply 
> <data>
>       <con xmlns="urn:test">
>               <time-range>
>                       <start-time>2022-02-01T08:00:00+08:00</start-time>
>                       <else>something</else>
>               </time-range>
>       </con>
> </data>
> which mean there only on list entry with key "2022-02-01T08:00:00+08:00".
> And then if the client send another get rpc with list key value 
> "2022-02-01T00:00:00Z" in subtree
> <get xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
>       <filter type="subtree">
>               <con xmlns="urn:test">
>                       <start-time>2022-02-01T00:00:00Z</start-time>
>               </con>
>       </filter>
> </get>
> shoud the server reply the list entry with key "2022-02-01T08:00:00+08:00" as 
> in the previous get rpc?
> <data>
>       <con xmlns="urn:test">
>               <time-range>
>                       <start-time>2022-02-01T08:00:00+08:00</start-time>
>                       <else>something</else>
>               </time-range>
>       </con>
> </data>
> Although I know that according to RF6991 the date-and-time value should be 
> canolicalize, but I think it still seems a little strange for a server to 
> reply value different from the request ? 
> How the working group consider this situation? 
> Thanks.
> 
> 
> 

-- 
Jürgen Schönwälder              Constructor University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://constructor.university/>

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to