[sysrepo-devel] changing a leaf to boolean
Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)
raszabo at cisco.com
Wed Dec 14 13:00:58 UTC 2016
Hi,
So the issue is that in the notification callback you get the new value set to TRUE if it was actually changed to FALSE in the datastore? If yes, then this is a bug, please report it on Github (and add Sysrepo traces + steps to reproduce please).
Thanks,
Rastislav
From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry
Sent: Wednesday, December 14, 2016 1:27 PM
To: sysrepo-devel at sysrepo.org
Subject: [sysrepo-devel] changing a leaf to boolean
In latest master branch I am seeing an issue where when I modify a leaf value to false (when It was previously true) sysrepo sends the new value as true instead of false.
If I set the value to false internally via code - I am able to modify it via an rpc call to true,.
So for Boolean objects it looks like the only thing you can set it to is true - via an rpc call.
Is this a bug?
In my callback I get modified op code but the new and old value are the same.
MODIFIED: old value/ensemble-config:ensemble-config/ensemble-rate-profile:rate-profiles/rate-profile[name='rate-profile-6']/color-enabled= true
new value/ensemble-config:ensemble-config/ensemble-rate-profile:rate-profiles/rate-profile[name='rate-profile-6']/color-enabled= true
the rpc in netopeer looks correct:
netopeer2-server[697]: Session 1: received message:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="19">
<edit-config>
<target>
<running/>
</target>
<config>
<ensemble-config xmlns="http://www.abc.com/ns/ensemble-config">
<rate-profiles xmlns="http://www.abc.com/ns/ensemble-rate-profile">
<rate-profile>
<name>rate-profile-6</name>
<color-enabled>false</color-enabled>
</rate-profile>
</rate-profiles>
</ensemble-config>
</config>
</edit-config>
</rpc>
I get rpc ok
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sysrepo.org/archives/sysrepo-devel/attachments/20161214/0d9d89b8/attachment.html>
More information about the sysrepo-devel
mailing list