cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
700
Views
0
Helpful
3
Replies

default sub-statement for leaf-list in yang v1.1 doesnt work

momeirz
Cisco Employee
Cisco Employee

Hello All,
i have set a default value for a leaf-list using yang version 1.1. The assigned default value appears by pressing info button in NSO GUI but the leaf-list data shows nothing. I have tried to access the leaf-list using ncs.magic function but the list returns empty as well. Is there any way to access this default value store in cdb? And why this is happening, am I missing something?

the yang model example:

```
module pe-interface {

namespace "http://example.com/pe-interface";
prefix pe-interface;
yang-version 1.1;

import ietf-inet-types {
prefix inet;
}
import tailf-common {
prefix tailf;
}
import tailf-ncs {
prefix ncs;
}

description
"PE Port Turnup Service";

revision 2023-11-01 {
description
"Initial revision.";
}

list ar-ftu-mgmt {
description
"This is an RFS skeleton service";

uses ncs:service-data;
ncs:servicepoint pe-interface-servicepoint;

key "ar-name";

leaf ar-name {
tailf:info "Device Name of AR to be connected to PE";
tailf:cli-allow-range;
type string;
}

container service {
leaf-list dhcp-server {
tailf:info "DHCP Server IP-address";
type inet:ipv4-address;
default 10.1.90.31;
}
}
}
}
```

momeirz_0-1698870847921.png

 

3 Replies 3

divitgupta
Level 1
Level 1

looks all ok 

snovello
Cisco Employee
Cisco Employee

You should open a TAC case for changing the behavior of the maagic API.

 

Hi snovello, a case has been already opened and I will update once I get an answer.

Thanks