Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create multiple leaves of a leaf-list when it is Augmenting a list. #243

Open
BanuPrakashReddy opened this issue Nov 23, 2016 · 0 comments

Comments

@BanuPrakashReddy
Copy link

BanuPrakashReddy commented Nov 23, 2016

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.";

    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.";
    }

}

}**_

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant