Closed miaofenk closed 7 years ago
I'm afraid that YANG does not allow to encode a value as CDATA. What is the YANG schema for your example?
The YANG schema is as follow:
list configkey { key "cfgPATH"; leaf cfgPATH { description "The system level path in etcd for a configuration key"; type string; } leaf vnfcname { description "The vnfc name"; type string; mandatory true; } leaf cfgvalue { description "The value stored in etcd for a configuration key"; type string; default "NA"; } }
Although YANG doesn't support CDATA type it should be treated as a normal text. The whole text should be replaced by the new value in "merge" method.
This use case is not implemented in libnetconf (nor libyang/libnetconf2), you are supposed to provide the final data where the CDATA are already instantiated.
Hi,
When I try to update a parameter value using "merge" method, I found the value just append after the orig value rather than replace it. After a few trails, I found the issue was caused by the value type is "CDATA". If the value type is "text", "merge" method works correct.
Orig data:
Merge "CDATA" data:
Merge "text" data:
Is that a issue? Hope to get your response. Thanks a lot!