ConfD User Community

Removing default value


#1

list abc {
tailf:info “ABC”;
key xyz;
tailf:cli-full-no;
tailf:cli-full-command;
tailf:cli-suppress-list-no;
leaf xyz {
tailf:cli-full-no;
tailf:cli-expose-key-name;
tailf:key-default default-value;
tailf:cli-full-command;
tailf:info “XYZ”;
}

Case:1
—> abc ?
Possible completions:
abc ABC
< cr>
Its fine

Case:2
—> no abc ?
Possible completions:
abc ABC

In case-2 its not showing “< cr>” after using ‘tailf:cli-full-no’ also.

Here I’m using xyz as default key if user didn’t give any value it will take default configuration(while configuring). In roll back case also I’m expecting samething if user didn’t give key value and there is only default configuration and it should be deleted without key value. How can I acheive this.


#2

I don’t think key-default affects deletion; sole no abc would mean to delete all entries, but your cli-suppress-list-no prohibits that.

Possibly with a parallel presence container with alt-name you might be able to achieve this behavior, but … are you sure you want this? I find it quite confusing, I believe any operator would expect that entering no abc deletes the whole list.


#3

If I use ‘no’ it will delete entire list. I agree for that is there any possibility to check before deletion of the list, means if the list contains only ‘default value’ it should be delete entire list otherwise it should have to show the all the values.

In case of deleting entire list also it should display < cr> like case 1 but I’m not getting < cr> in case2 (‘no’). can you help me how to display < cr> in case 2. ( I used ‘ailf:cli-full-no’)

Case:2
no abc ?
Possible completions:
abc ABC


#4

To be able to issue no abc, just remove cli-suppress-list-no from your data model. The command would then remove all list instances - is that what you want?