Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
4ca40253
Commit
4ca40253
authored
Jun 03, 2013
by
JINMEI Tatuya
Browse files
[2964] cleanup: remove any reference to auth/database_file config.
parent
525021e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/xfrin/xfrin.py.in
View file @
4ca40253
...
@@ -57,13 +57,9 @@ isc.util.process.rename()
...
@@ -57,13 +57,9 @@ isc.util.process.rename()
SPECFILE_PATH = "@datadir@/@PACKAGE@"\
SPECFILE_PATH = "@datadir@/@PACKAGE@"\
.replace("${datarootdir}", "@datarootdir@")\
.replace("${datarootdir}", "@datarootdir@")\
.replace("${prefix}", "@prefix@")
.replace("${prefix}", "@prefix@")
AUTH_SPECFILE_PATH = SPECFILE_PATH
if "B10_FROM_SOURCE" in os.environ:
if "B10_FROM_SOURCE" in os.environ:
SPECFILE_PATH = os.environ["B10_FROM_SOURCE"] + "/src/bin/xfrin"
SPECFILE_PATH = os.environ["B10_FROM_SOURCE"] + "/src/bin/xfrin"
if "B10_FROM_BUILD" in os.environ:
AUTH_SPECFILE_PATH = os.environ["B10_FROM_BUILD"] + "/src/bin/auth"
SPECFILE_LOCATION = SPECFILE_PATH + "/xfrin.spec"
SPECFILE_LOCATION = SPECFILE_PATH + "/xfrin.spec"
AUTH_SPECFILE_LOCATION = AUTH_SPECFILE_PATH + "/auth.spec"
AUTH_MODULE_NAME = 'Auth'
AUTH_MODULE_NAME = 'Auth'
XFROUT_MODULE_NAME = 'Xfrout'
XFROUT_MODULE_NAME = 'Xfrout'
...
@@ -1410,10 +1406,6 @@ class Xfrin:
...
@@ -1410,10 +1406,6 @@ class Xfrin:
self.config_handler,
self.config_handler,
self.command_handler)
self.command_handler)
self._module_cc.start()
self._module_cc.start()
# TBD: this will be removed in this branch
self._module_cc.add_remote_config(AUTH_SPECFILE_LOCATION,
self._auth_config_handler)
# END_OF_TBD
def _cc_check_command(self):
def _cc_check_command(self):
'''This is a straightforward wrapper for cc.check_command,
'''This is a straightforward wrapper for cc.check_command,
...
@@ -1461,10 +1453,6 @@ class Xfrin:
...
@@ -1461,10 +1453,6 @@ class Xfrin:
return create_answer(0)
return create_answer(0)
def _auth_config_handler(self, new_config, config_data):
# Config handler for changes in Auth configuration
self._set_db_file()
def _datasrc_config_handler(self, new_config, config_data):
def _datasrc_config_handler(self, new_config, config_data):
"""Configuration handler of the 'data_sources' module.
"""Configuration handler of the 'data_sources' module.
...
@@ -1484,7 +1472,6 @@ class Xfrin:
...
@@ -1484,7 +1472,6 @@ class Xfrin:
''' shutdown the xfrin process. the thread which is doing xfrin should be
''' shutdown the xfrin process. the thread which is doing xfrin should be
terminated.
terminated.
'''
'''
self._module_cc.remove_remote_config(AUTH_SPECFILE_LOCATION)
self._module_cc.send_stopping()
self._module_cc.send_stopping()
self._shutdown_event.set()
self._shutdown_event.set()
main_thread = threading.currentThread()
main_thread = threading.currentThread()
...
@@ -1666,18 +1653,6 @@ class Xfrin:
...
@@ -1666,18 +1653,6 @@ class Xfrin:
def _get_db_file(self):
def _get_db_file(self):
return self._db_file
return self._db_file
def _set_db_file(self):
db_file, is_default =\
self._module_cc.get_remote_config_value(AUTH_MODULE_NAME, "database_file")
if is_default and "B10_FROM_BUILD" in os.environ:
# override the local database setting if it is default and we
# are running from the source tree
# This should be hidden inside the data source library and/or
# done as a configuration, and this special case should be gone).
db_file = os.environ["B10_FROM_BUILD"] + os.sep +\
"bind10_zones.sqlite3"
self._db_file = db_file
def publish_xfrin_news(self, zone_name, zone_class, xfr_result):
def publish_xfrin_news(self, zone_name, zone_class, xfr_result):
'''Send command to xfrout/zone manager module.
'''Send command to xfrout/zone manager module.
If xfrin has finished successfully for one zone, tell the good
If xfrin has finished successfully for one zone, tell the good
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment