Hi Tom, Robert,

Is this any possibility of getting default values in protocol plugin layer in 
near future?

Can we raise defect on this so that we can track it.

-Karthik

-----Original Message-----
From: Robert Varga [mailto:n...@hq.sk] 
Sent: Friday, September 1, 2017 12:58 AM
To: Tom Pantelis <tompante...@gmail.com>; Karthik Rajagopalan 
<krajagopa...@advaoptical.com>
Cc: controller-dev@lists.opendaylight.org
Subject: Re: [controller-dev] Default values in yang are not set when fetch 
from datastore with restconf

On 31/08/17 15:22, Tom Pantelis wrote:
>               I don’t see the ip-address value in my restconf response.
>     Where when I check the dataobject, the object has the default value
>     set.____
> 
>               How do I ensure the default value is set even in mdsal?
> 
> 
> Default values aren't actually stored in the data store - they're 
> provided via reads when no actual data exists. However this is only 
> provided via the binding API and not the DOM API which restconf uses. 
> I don't know why it wasn't implemented in the DOM layer.

The reason for this is the difference between explictly setting the value to 
default vs. not setting it at all.

At DOM layer, applications have the effective model available, hence can 
recover default values from there. At the binding layer, the model is not 
available, and hence default values are filled in by the DOM/binding codec.

I am not sure if RFC8040 defines the equivalent of RFC6243, but reporting of 
default values should happen at the protocol plugin layer.

Bye,
Robert

_______________________________________________
controller-dev mailing list
controller-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/controller-dev

Reply via email to