Deleting commands from Juniper switches

Once you have any of your Juniper EX switches managed by Mist cloud environment it is advised not to make any configuration changes from the switch CLI rather make use of Site/Template/Rule-based/Additional CLI Commands.

To remove any config from the switch we need to append ‘delete’ for any command that needs to be deleted. EX: delete system ntp server 192.168.3.65. As seen from below screenshot we have ‘set’ and ‘delete’ commands. As we hit save, these commands will be sent to switch and we will see a response event for ‘config change performed by user’ as UI_COMMIT_COMPLETED.  These changes are usually performed within a minute but the UI may take some time to reflect these changes. We will also see system commit on the switch for this timeframe. These delete commands will also be updated in the below API call.

https://api.mist.com/api/v1/sites/<site_id>/devices/00000000-0000-0000-1000-<switch_mac>/config_cmd

 

Once these changes are pushed to the switch, these commands will be deleted from the switch.  Later if required, you can select and remove these commands from the CLI commands box and the same will be reflected under API.

NOTE: Just selecting a few commands from any CLI box and hitting backspace/delete button will NOT have these commands deleted from the switch. By doing this you will only remove the commands from  the below API which has current switch configuration that is present on Mist UI dashboard.

https://api.mist.com/api/v1/sites/<site_id>/devices/00000000-0000-0000-1000-<switch_mac>/config_cmd

 

You will see a ‘Config Changed by User’ event generated under switch insights. And there will be no response to this event for config change as you have not pushed any config change to the switch. The changes were only made on UI and not on the switch.

For example, As seen from below screenshot we do not see a UI_COMMIT_COMPLETED for config changed by user at 02:14 PM when the CLI commands were removed from UI since no commands  were sent to switch.