BIND 10 trac615, updated. 1e67f2cbd82e555241a366d5b93a7a6ec52c7921 [trac615] Small cleanups
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Mar 14 16:38:21 UTC 2011
The branch, trac615 has been updated
via 1e67f2cbd82e555241a366d5b93a7a6ec52c7921 (commit)
from 170485efd4eb6cb6ba6af78d62be71b2354befd8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1e67f2cbd82e555241a366d5b93a7a6ec52c7921
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Mar 14 17:33:26 2011 +0100
[trac615] Small cleanups
* A variable name
* Clarification of man pages
-----------------------------------------------------------------------
Summary of changes:
src/bin/bind10/bind10.xml | 7 ++++---
src/bin/cfgmgr/b10-cfgmgr.py.in | 4 ++--
src/bin/cfgmgr/b10-cfgmgr.xml | 4 +++-
src/bin/cfgmgr/tests/b10-cfgmgr_test.py.in | 10 +++++-----
4 files changed, 14 insertions(+), 11 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/bind10/bind10.xml b/src/bin/bind10/bind10.xml
index 059f474..207b74b 100644
--- a/src/bin/bind10/bind10.xml
+++ b/src/bin/bind10/bind10.xml
@@ -101,9 +101,10 @@
<option>--data-path</option> <replaceable>data-path</replaceable>
</term>
<listitem>
- <para>The path where BIND looks for configuration files, if their
- names are not absolute. It might be used for other data files in
- future as well.</para>
+ <para>The path where BIND 10 programs look for various data files.
+ Currently only b10-cfgmgr uses it to locate the configuration file,
+ but the usage might be extended for other programs and other types
+ of files.</para>
</listitem>
</varlistentry>
diff --git a/src/bin/cfgmgr/b10-cfgmgr.py.in b/src/bin/cfgmgr/b10-cfgmgr.py.in
index 41a6790..5355582 100755
--- a/src/bin/cfgmgr/b10-cfgmgr.py.in
+++ b/src/bin/cfgmgr/b10-cfgmgr.py.in
@@ -51,7 +51,7 @@ def parse_options(args=sys.argv[1:], Parser=OptionParser):
parser.add_option("-p", "--data-path", dest="data_path",
help="Directory to search for configuration files " +
"(default=" + DATA_PATH + ")", default=DATA_PATH)
- parser.add_option("-c", "--config-filename", dest="file_name",
+ parser.add_option("-c", "--config-filename", dest="config_file",
help="Configuration database filename " +
"(default=" + DEFAULT_CONFIG_FILE + ")",
default=DEFAULT_CONFIG_FILE)
@@ -69,7 +69,7 @@ def main():
options = parse_options()
global cm
try:
- cm = ConfigManager(options.data_path, options.file_name)
+ cm = ConfigManager(options.data_path, options.config_file)
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
cm.read_config()
diff --git a/src/bin/cfgmgr/b10-cfgmgr.xml b/src/bin/cfgmgr/b10-cfgmgr.xml
index 81cc644..08a6a97 100644
--- a/src/bin/cfgmgr/b10-cfgmgr.xml
+++ b/src/bin/cfgmgr/b10-cfgmgr.xml
@@ -114,7 +114,9 @@
<option>--data-path</option> <replaceable>data-path</replaceable>
</term>
<listitem>
- <para>The path where bind looks for configuration files.</para>
+ <para>The path where BIND 10 looks for files. The
+ configuration file is looked for here, if it is relative. If it is
+ absolute, the path is ignored.</para>
</listitem>
</varlistentry>
</variablelist>
diff --git a/src/bin/cfgmgr/tests/b10-cfgmgr_test.py.in b/src/bin/cfgmgr/tests/b10-cfgmgr_test.py.in
index 4cc4ddf..037a106 100644
--- a/src/bin/cfgmgr/tests/b10-cfgmgr_test.py.in
+++ b/src/bin/cfgmgr/tests/b10-cfgmgr_test.py.in
@@ -103,7 +103,7 @@ class TestParseArgs(unittest.TestCase):
b = __import__("b10-cfgmgr")
parsed = b.parse_options([], TestOptParser)
self.assertEqual(b.DATA_PATH, parsed.data_path)
- self.assertEqual(b.DEFAULT_CONFIG_FILE, parsed.file_name)
+ self.assertEqual(b.DEFAULT_CONFIG_FILE, parsed.config_file)
def test_wrong_args(self):
"""
@@ -129,10 +129,10 @@ class TestParseArgs(unittest.TestCase):
b = __import__("b10-cfgmgr")
parsed = b.parse_options(['--data-path=/path'], TestOptParser)
self.assertEqual('/path', parsed.data_path)
- self.assertEqual(b.DEFAULT_CONFIG_FILE, parsed.file_name)
+ self.assertEqual(b.DEFAULT_CONFIG_FILE, parsed.config_file)
parsed = b.parse_options(['-p', '/path'], TestOptParser)
self.assertEqual('/path', parsed.data_path)
- self.assertEqual(b.DEFAULT_CONFIG_FILE, parsed.file_name)
+ self.assertEqual(b.DEFAULT_CONFIG_FILE, parsed.config_file)
self.assertRaises(OptsError, b.parse_options, ['-p'], TestOptParser)
self.assertRaises(OptsError, b.parse_options, ['--data-path'],
TestOptParser)
@@ -145,10 +145,10 @@ class TestParseArgs(unittest.TestCase):
parsed = b.parse_options(['--config-filename=filename'],
TestOptParser)
self.assertEqual(b.DATA_PATH, parsed.data_path)
- self.assertEqual("filename", parsed.file_name)
+ self.assertEqual("filename", parsed.config_file)
parsed = b.parse_options(['-c', 'filename'], TestOptParser)
self.assertEqual(b.DATA_PATH, parsed.data_path)
- self.assertEqual("filename", parsed.file_name)
+ self.assertEqual("filename", parsed.config_file)
self.assertRaises(OptsError, b.parse_options, ['-c'], TestOptParser)
self.assertRaises(OptsError, b.parse_options, ['--config-filename'],
TestOptParser)
More information about the bind10-changes
mailing list