You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that augmenting a leaf-list to a list is pretty normal and it should work. But, when I am augmenting a leaf-list to a list in ietf-system.yang file. I am facing the problem as mentioned below:
Even after configuring multiple leaves(one by one) of an augmented leaf-list, only the last leaf exist in the configuration.
augment "/sys:system/sys:authentication/sys:user" {
description
"Augment the local user with an optional user group
assignment.";
leaf-list system-defined-group {
type string;
description
"The name of the system defined group(s) to which the user
is assigned. A system defined group is one that exists
on the system but is not explicity created.";
}
I know that augmenting a leaf-list to a list is pretty normal and it should work. But, when I am augmenting a leaf-list to a list in ietf-system.yang file. I am facing the problem as mentioned below:
Even after configuring multiple leaves(one by one) of an augmented leaf-list, only the last leaf exist in the configuration.
Below is the yang file , which I used :
_**module abc-system-authentication {
namespace "http://www.abc.com/ns/yang/" +
"abc-system-authentication";
prefix a-sys-auth;
import ietf-system {
prefix sys;
}
contact
"http://www.abc.com/";
description
"This module contains a collection of YANG definitions to
support extension of authentication functionality on the device.";
revision 2016-11-22 {
description
"Initial revision.";
reference
"None.";
}
augment "/sys:system/sys:authentication/sys:user" {
description
"Augment the local user with an optional user group
assignment.";
}
}**_
Below it the configuration I pushed first :
<sys:system xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system">
sys:authentication
<sys:user nc:operation="merge">
sys:nametest</sys:name>
<a-sys-auth:system-defined-group xmlns:a-sys-auth="http://www.abc.com/ns/yang/abc-system-authentication">xyz</a-sys-auth:system-defined-group>
</sys:user>
</sys:authentication>
</sys:system>
Then pushed the below configuration :
<sys:system xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system">
sys:authentication
<sys:user nc:operation="merge">
sys:nametest</sys:name>
<a-sys-auth:system-defined-group xmlns:a-sys-auth="http://www.abc.com/ns/yang/abc-system-authentication">xyz2</a-sys-auth:system-defined-group>
</sys:user>
</sys:authentication>
</sys:system>
When I do get-configuration, I always see output as :
<sys:system xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system">
sys:authentication
sys:user
sys:nametest</sys:name>
<a-sys-auth:system-defined-group xmlns:a-sys-auth="http://www.abc.com/ns/yang/abc-system-authentication">xyz2</a-sys-auth:system-defined-group>
</sys:user>
</sys:authentication>
</sys:system>
The text was updated successfully, but these errors were encountered: