BIND 10 #3118: Feature Request (with patch): bindctl - check on "quit" if pending changes exist
BIND 10 Development
do-not-reply at isc.org
Sat Aug 24 05:49:54 UTC 2013
#3118: Feature Request (with patch): bindctl - check on "quit" if pending changes
exist
-------------------------------------+-------------------------------------
Reporter: cas | Type:
Status: new | enhancement
Milestone: New Tasks | Priority:
Keywords: | medium
Sensitive: 0 | Component: bind-
Sub-Project: Core | ctl
Estimated Difficulty: 0 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Author: Carsten Strotmann <cas at strotmann.de>
Date: Sat Aug 24 07:43:57 2013 +0200
Feature: bindctl - check on "quit" if pending changes exist, if there
are pending changes, stop the termination of bindctl, print a warning and
the list of pending changes
{{{
diff --git a/src/bin/bindctl/bindcmd.py b/src/bin/bindctl/bindcmd.py
index 03b5d6b..e0ed038 100644
--- a/src/bin/bindctl/bindcmd.py
+++ b/src/bin/bindctl/bindcmd.py
@@ -503,8 +503,13 @@ WARNING: The Python readline module isn't available,
so some command line
def onecmd(self, line):
if line == 'EOF' or line.lower() == "quit":
- self.conn.close()
- return True
+ if (self.config_data.get_local_changes() == {}):
+ self.conn.close()
+ return True
+ else:
+ self._print("Aborting QUIT, there are uncomitted changes.
Use 'config revert' if you want to delete the pending changes")
+ self._print(self.config_data.get_local_changes())
+ line = ''
if line == 'h':
line = 'help'
}}}
--
Ticket URL: <http://bind10.isc.org/ticket/3118>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list