* Fixed: Validate/commit error with false positive yang choice changes detected in validation found in ietf-ipfix-psamp.yang.
This commit is contained in:
parent
6465022f57
commit
0b3391836f
3 changed files with 7 additions and 16 deletions
|
|
@ -70,6 +70,7 @@ Users may have to change how they access the system
|
|||
|
||||
### Corrected Bugs
|
||||
|
||||
* Fixed: Validate/commit error with false positive yang choice changes detected in validation found in ietf-ipfix-psamp.yang.
|
||||
* Fixed: Accepted added subtrees containing lists with duplicate keys.
|
||||
* Fixed: [default state data returned with get-config](https://github.com/clicon/clixon/issues/140)
|
||||
* Generalized default code for both config and state
|
||||
|
|
|
|||
|
|
@ -584,21 +584,11 @@ xml_diff1(cxobj *x0,
|
|||
* if so, continute compare children but without yang
|
||||
*/
|
||||
yc = xml_spec(x0c);
|
||||
if (yc && yang_choice(yc)){
|
||||
/* if x0c and x1c are choice/case, then they are changed */
|
||||
if (cxvec_append(x0c, changed_x0, changedlen) < 0)
|
||||
goto done;
|
||||
(*changedlen)--; /* append two vectors */
|
||||
if (cxvec_append(x1c, changed_x1, changedlen) < 0)
|
||||
goto done;
|
||||
}
|
||||
else if (yc && yang_keyword_get(yc) == Y_LEAF){
|
||||
/* if x0c and x1c are leafs w bodies, then they are changed */
|
||||
if ((b1 = xml_body(x0c)) == NULL) /* empty type */
|
||||
break;
|
||||
if ((b2 = xml_body(x1c)) == NULL) /* empty type */
|
||||
break;
|
||||
if (strcmp(b1, b2)){
|
||||
if (yc && yang_keyword_get(yc) == Y_LEAF){
|
||||
/* if x0c and x1c are leafs w bodies, then they may be changed */
|
||||
if ((b1 = xml_body(x0c)) != NULL && /* skip empty type */
|
||||
(b2 = xml_body(x1c)) != NULL && /* skip empty type */
|
||||
strcmp(b1, b2) != 0){
|
||||
if (cxvec_append(x0c, changed_x0, changedlen) < 0)
|
||||
goto done;
|
||||
(*changedlen)--; /* append two vectors */
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ new "restconf get protocol tcp"
|
|||
expectpart "$(curl $CURLOPTS -X GET $RCPROTO://localhost/restconf/data/system:system)" 0 "HTTP/1.1 200 OK" '{"system:system":{"protocol":{"tcp":\[null\]}}}'
|
||||
|
||||
new "restconf set protocol tcp+udp fail again"
|
||||
expectpart "$(curl $CURLOPTS -X PUT -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/system:system/protocol -d '{"system:protocol":{"tcp": [null], "udp": [null]}}')" 0 "HTTP/1.1 400 Bad Request" '{"ietf-restconf:errors":{"error":{"error-type":"application","error-tag":"bad-element","error-info":{"bad-element":"udp"},"error-severity":"error","error-message":"Element in choice statement already exists"}}}'
|
||||
expectpart "$(curl $CURLOPTS -X PUT -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/system:system/protocol -d '{"system:protocol":{"tcp": [null], "udp": [null]}}')" 0 "HTTP/1.1 400 Bad Request" '{"ietf-restconf:errors":{"error":{"error-type":"application","error-tag":"bad-element","error-info":{"bad-element":"tcp"},"error-severity":"error","error-message":"Element in choice statement already exists"}}}'
|
||||
|
||||
new "cli set protocol udp"
|
||||
expectfn "$clixon_cli -1 -f $cfg -l o set system protocol udp" 0 "^$"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue