In YANG, we can add a tailf:confirm-text to an action to make the CLI automatically prompt the user to confirm ‘yes’ or ‘no’ before performing that action.
Can the confirm-text be made conditional upon whether the action has a certain argument supplied to it? That is, if the action command has an argument ‘force’, the command should proceed without prompting the user. If there is no argument, then the user should be prompted.
A few lines added to a clispec and a few lines of script or some other code doesn’t seem to be “extensive”.
MAAPI doesn’t wait for your tailf:confirm-text. Check that you are not calling maapi_request_action() from the same thread that handle the action (entering a deadlock).