cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1230
Views
5
Helpful
2
Replies

Modifying default NSO commands

Anton_Ts
Level 1
Level 1

Hi guys,

Is there a way to override, modify, or add an additional prompt when using a default NSO command?

For example, if I would like to execute "request devices sync-from", it would be great to be prompted with "yes/no", OR to reject a command.

Thank you.

2 Replies 2

snovello
Cisco Employee
Cisco Employee
Modifying built in commands in NSO is really not recommended or supported. For example you would hit an issue when you installed a new version, where you would have to re-implement all your modifications. I suggest you write your own sync-from action which calls the existing sync-from to get the behaviour you want. To prompt for anything specify an input leaf and set it ‘mandatory true’. To avoid users accessing the built in commands you can write NACM rules that disallow the use. Given you have namespaces in yang your action can have the same ‘sync-from’ name if you want.

@snovello Got it, thanks. 

It seems that "avoid users accessing the built-in commands you can write NACM rules that disallow the use" way fits me the most. 

Do you have an example or guidance regarding such a modification?