diff options
-rw-r--r-- | interface-definitions/system_config-management.xml.in | 43 | ||||
-rwxr-xr-x | src/conf_mode/system_config-management.py | 3 |
2 files changed, 27 insertions, 19 deletions
diff --git a/interface-definitions/system_config-management.xml.in b/interface-definitions/system_config-management.xml.in index b8fb6cdb5..a23d44aea 100644 --- a/interface-definitions/system_config-management.xml.in +++ b/interface-definitions/system_config-management.xml.in @@ -67,26 +67,33 @@ <constraintErrorMessage>Number of revisions must be between 0 and 65535</constraintErrorMessage> </properties> </leafNode> - <leafNode name="commit-confirm"> + <node name="commit-confirm"> <properties> - <help>Commit confirm rollback type if no confirmation</help> - <completionHelp> - <list>reload reboot</list> - </completionHelp> - <valueHelp> - <format>reload</format> - <description>Reload previous configuration if not confirmed</description> - </valueHelp> - <valueHelp> - <format>reboot</format> - <description>Reboot to saved configuration if not confirmed</description> - </valueHelp> - <constraint> - <regex>(reload|reboot)</regex> - </constraint> + <help>Commit confirm options</help> </properties> - <defaultValue>reboot</defaultValue> - </leafNode> + <children> + <leafNode name="action"> + <properties> + <help>Commit confirm revert action</help> + <completionHelp> + <list>reload reboot</list> + </completionHelp> + <valueHelp> + <format>reload</format> + <description>Reload previous configuration if not confirmed</description> + </valueHelp> + <valueHelp> + <format>reboot</format> + <description>Reboot to saved configuration if not confirmed</description> + </valueHelp> + <constraint> + <regex>(reload|reboot)</regex> + </constraint> + </properties> + <defaultValue>reboot</defaultValue> + </leafNode> + </children> + </node> </children> </node> </children> diff --git a/src/conf_mode/system_config-management.py b/src/conf_mode/system_config-management.py index a1ee136cd..8de4e5342 100755 --- a/src/conf_mode/system_config-management.py +++ b/src/conf_mode/system_config-management.py @@ -40,7 +40,8 @@ def get_config(config=None): def verify(mgmt): d = mgmt.config_dict - if d.get('commit_confirm', '') == 'reload' and 'commit_revisions' not in d: + confirm = d.get('commit_confirm', {}) + if confirm.get('action', '') == 'reload' and 'commit_revisions' not in d: raise ConfigError('commit-confirm reload requires non-zero commit-revisions') return |