mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-03 07:25:18 +00:00
[1443] Addressed review comments
- if self.clear_config is None was wrong, should just be if self.clear_config - 'back up' should have been 'create backup of' - default value for unused parameter rename_config_file in b10-cfgmgr_test.py.in MyConfigManager should have been False, not None - reordered message file
This commit is contained in:
@@ -466,7 +466,7 @@ class BoB:
|
|||||||
args.append("--data-path=" + self.data_path)
|
args.append("--data-path=" + self.data_path)
|
||||||
if self.config_filename is not None:
|
if self.config_filename is not None:
|
||||||
args.append("--config-filename=" + self.config_filename)
|
args.append("--config-filename=" + self.config_filename)
|
||||||
if self.clear_config is not None:
|
if self.clear_config:
|
||||||
args.append("--clear-config")
|
args.append("--clear-config")
|
||||||
bind_cfgd = ProcessInfo("b10-cfgmgr", args,
|
bind_cfgd = ProcessInfo("b10-cfgmgr", args,
|
||||||
self.c_channel_env)
|
self.c_channel_env)
|
||||||
@@ -1058,7 +1058,8 @@ def parse_args(args=sys.argv[1:], Parser=OptionParser):
|
|||||||
help="Configuration database filename")
|
help="Configuration database filename")
|
||||||
parser.add_option("--clear-config", action="store_true",
|
parser.add_option("--clear-config", action="store_true",
|
||||||
dest="clear_config", default=False,
|
dest="clear_config", default=False,
|
||||||
help="Back up the configuration file and start with a clean one")
|
help="Create backup of the configuration file and " +
|
||||||
|
"start with a clean configuration")
|
||||||
parser.add_option("-p", "--data-path", dest="data_path",
|
parser.add_option("-p", "--data-path", dest="data_path",
|
||||||
help="Directory to search for configuration files",
|
help="Directory to search for configuration files",
|
||||||
default=None)
|
default=None)
|
||||||
|
@@ -24,7 +24,7 @@ import bind10_config
|
|||||||
from isc.testutils.parse_args import OptsError, TestOptParser
|
from isc.testutils.parse_args import OptsError, TestOptParser
|
||||||
|
|
||||||
class MyConfigManager:
|
class MyConfigManager:
|
||||||
def __init__(self, path, filename, session=None, rename_config_file=None):
|
def __init__(self, path, filename, session=None, rename_config_file=False):
|
||||||
self._path = path
|
self._path = path
|
||||||
self.read_config_called = False
|
self.read_config_called = False
|
||||||
self.notify_boss_called = False
|
self.notify_boss_called = False
|
||||||
|
@@ -51,11 +51,11 @@ error is given. The most likely cause is that the system does not have
|
|||||||
write access to the configuration database file. The updated
|
write access to the configuration database file. The updated
|
||||||
configuration is not stored.
|
configuration is not stored.
|
||||||
|
|
||||||
% CFGMGR_STOPPED_BY_KEYBOARD keyboard interrupt, shutting down
|
|
||||||
There was a keyboard interrupt signal to stop the cfgmgr daemon. The
|
|
||||||
daemon will now shut down.
|
|
||||||
|
|
||||||
% CFGMGR_RENAMED_CONFIG_FILE renamed configuration file %1 to %2, will create new %1
|
% CFGMGR_RENAMED_CONFIG_FILE renamed configuration file %1 to %2, will create new %1
|
||||||
BIND 10 has been started with the command to clear the configuration file.
|
BIND 10 has been started with the command to clear the configuration file.
|
||||||
The existing file is backed up to the given file name, so that data is not
|
The existing file is backed up to the given file name, so that data is not
|
||||||
immediately lost if this was done by accident.
|
immediately lost if this was done by accident.
|
||||||
|
|
||||||
|
% CFGMGR_STOPPED_BY_KEYBOARD keyboard interrupt, shutting down
|
||||||
|
There was a keyboard interrupt signal to stop the cfgmgr daemon. The
|
||||||
|
daemon will now shut down.
|
||||||
|
Reference in New Issue
Block a user