====== Commit ====== .. sidebar:: Contents .. contents:: :depth: 3 :local: This chapter covers some aspects related to the ``system cli configuration commit`` tool, which allows you to configure the behaviour of the "commit" command in OSDx. Commit Alarm ============ One of the available options is to configure the system to feed an ``alarm`` based on whether the execution of the "commit" command succeeds or fails. * If the commit **fails**, the alarm will be **activated**. * If the commit **succeeds**, the alarm will be **deactivated**. Configuration ------------- This is the syntax to configure the behaviour of the "commit" command in OSDx: .. code-block:: none set system cli configuration commit [ ... ] Examples -------- Enable the feeding of an alarm based on commit validation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Imagine you want to configure the system so that the status of alarm ALARM_COMMIT is updated based on the commit result. In OSDx, this can be achieved by setting the following commands: .. code-block:: none set system cli configuration commit alarm ALARM_COMMIT Commit Confirmation Needed ========================== Use this command to ask for confirmation after each commit. This is useful when you want to make sure you are still connected to the device once the new configuration is committed. When the commit confirmation-needed command is set, the system will wait for a confirmation after each commit. This confirmation can be done in 3 different ways: * If the confirmation-needed option is still set, any other **commit** will require confirmation. If it is not set, the previous commit will be considered confirmed. * **Save**: if the user saves the configuration, it is assumed to be safe and correct. The commit will, therefore, be considered confirmed. * :osdx:op:`system cli configuration commit confirm`: this operational command will confirm the last commit. If no confirmation is received after timeout, the commit will be automatically rolled back (meaning the previous configuration that was saved will be committed). Configuration ------------- To configure commit confirmation, you need to set the following commands: .. code-block:: none set system cli configuration commit confirm-needed set system cli configuration commit confirm-needed timeout By default, the timeout is set to **600** seconds. Use the following command to confirm the commit: .. code-block:: none system cli configuration commit confirm .. osdx:cmdtree:: cfg system cli configuration commit .. osdx:cmdtree:: op system cli configuration commit