ConfD User Community

Delete a parameter twice should trigger an error message


#1

I am wondering how can I trigger an error message when user tries to delete a parameter twice (by mistake). Currently confd even though prompts “Invalid input detected” message when we try to tab an already deleted entry, it just accepts the command when we press enter.

Wondering if there is a way to trigger an error message when user presses enter?

root@cavium-thunderx 21:16:07% show link vlan-map
vlan-map 0 {
    vid [ 3 100 200 ];
}
[ok][2018-01-12 21:16:09]

[edit]

    root@cavium-thunderx 21:16:09% delete link vlan-map 0 vid 3
    [ok][2018-01-12 21:16:17]

    [edit]
    root@cavium-thunderx 21:16:18% show link vlan-map
    vlan-map 0 {
        vid [ 100 200 ];
    }
    [ok][2018-01-12 21:16:20]

    [edit]
    root@cavium-thunderx 21:16:20% delete link vlan-map 0 vid 3
                                                              ^
    % Invalid input detected at '^' marker.

    root@cavium-thunderx 21:16:33% delete link vlan-map 0 vid 3
    [ok][2018-01-12 21:17:31]

    [edit]

#2

You basically asked the same question and got an answer 6 months ago:
Displaying error message when user tries to delete something that doesnt exist in DB?


#3

My sincere apologies. Didnt follow up the previous post.