Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
1ab87fb5
Commit
1ab87fb5
authored
May 22, 2013
by
JINMEI Tatuya
Browse files
[2911] refactoring: use create_zone() instead of the old datasrc API.
parent
f714c4ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/xfrin/tests/xfrin_test.py
View file @
1ab87fb5
...
...
@@ -242,6 +242,10 @@ class MockDataSourceClient():
self
.
committed_diffs
.
append
(
self
.
diffs
)
self
.
diffs
=
[]
def
create_zone
(
self
,
zone_name
):
# pretend it just succeeds
pass
class
MockXfrin
(
Xfrin
):
# This is a class attribute of a callable object that specifies a non
# default behavior triggered in _cc_check_command(). Specific test methods
...
...
src/bin/xfrin/xfrin.py.in
View file @
1ab87fb5
...
...
@@ -656,9 +656,9 @@ class XfrinConnection(asyncore.dispatcher):
if result != DataSourceClient.SUCCESS:
# The data source doesn't know the zone. For now, we provide
# backward compatibility and creates a new one ourselves.
isc.datasrc.sqlite3_ds.load(self._db_file,
self._zone_name.to_text(),
lambda : []
)
# For longer term, we should probably separate this level of zone
# management outside of xfrin.
self._datasrc_client.create_zone(self._zone_name
)
logger.warn(XFRIN_ZONE_CREATED, self.zone_str())
# try again
result, finder = self._datasrc_client.find_zone(self._zone_name)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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