From: Michal 'vorner' Vaner Date: Fri, 17 Feb 2012 12:05:21 +0000 (+0100) Subject: [1643] Empty module for tsig keyring X-Git-Tag: trac2351_base~226^2~116^2~168^2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f8cecc0e0625c40be6a44f24b8bcd0420e19946b;p=thirdparty%2Fkea.git [1643] Empty module for tsig keyring --- diff --git a/configure.ac b/configure.ac index 8889ddc984..7168e5f60d 100644 --- a/configure.ac +++ b/configure.ac @@ -1001,6 +1001,8 @@ AC_CONFIG_FILES([Makefile src/lib/python/isc/bind10/tests/Makefile src/lib/python/isc/xfrin/Makefile src/lib/python/isc/xfrin/tests/Makefile + src/lib/python/isc/server_common/Makefile + src/lib/python/isc/server_common/tests/Makefile src/lib/config/Makefile src/lib/config/tests/Makefile src/lib/config/tests/testdata/Makefile diff --git a/src/lib/python/isc/Makefile.am b/src/lib/python/isc/Makefile.am index a3e74c5ff7..aef5dc3d93 100644 --- a/src/lib/python/isc/Makefile.am +++ b/src/lib/python/isc/Makefile.am @@ -1,5 +1,5 @@ SUBDIRS = datasrc cc config dns log net notify util testutils acl bind10 -SUBDIRS += xfrin log_messages +SUBDIRS += xfrin log_messages server_common python_PYTHON = __init__.py diff --git a/src/lib/python/isc/server_common/Makefile.am b/src/lib/python/isc/server_common/Makefile.am new file mode 100644 index 0000000000..dd2fe4816e --- /dev/null +++ b/src/lib/python/isc/server_common/Makefile.am @@ -0,0 +1,10 @@ +SUBDIRS = tests + +python_PYTHON = __init__.py tsig_keyring.py + +pythondir = $(pyexecdir)/isc/server_common + +CLEANDIRS = __pycache__ + +clean-local: + rm -rf $(CLEANDIRS) diff --git a/src/lib/python/isc/server_common/__init__.py b/src/lib/python/isc/server_common/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/lib/python/isc/server_common/tests/Makefile.am b/src/lib/python/isc/server_common/tests/Makefile.am new file mode 100644 index 0000000000..8ca4c14324 --- /dev/null +++ b/src/lib/python/isc/server_common/tests/Makefile.am @@ -0,0 +1,24 @@ +PYCOVERAGE_RUN = @PYCOVERAGE_RUN@ +PYTESTS = tsig_keyring_test.py +EXTRA_DIST = $(PYTESTS) + +# If necessary (rare cases), explicitly specify paths to dynamic libraries +# required by loadable python modules. +LIBRARY_PATH_PLACEHOLDER = +if SET_ENV_LIBRARY_PATH +LIBRARY_PATH_PLACEHOLDER += $(ENV_LIBRARY_PATH)=$(abs_top_builddir)/src/lib/cryptolink/.libs:$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/dns/python/.libs:$(abs_top_builddir)/src/lib/cc/.libs:$(abs_top_builddir)/src/lib/config/.libs:$(abs_top_builddir)/src/lib/log/.libs:$(abs_top_builddir)/src/lib/util/.libs:$(abs_top_builddir)/src/lib/exceptions/.libs:$(abs_top_builddir)/src/lib/datasrc/.libs:$$$(ENV_LIBRARY_PATH) +endif + +# test using command-line arguments, so use check-local target instead of TESTS +check-local: +if ENABLE_PYTHON_COVERAGE + touch $(abs_top_srcdir)/.coverage + rm -f .coverage + ${LN_S} $(abs_top_srcdir)/.coverage .coverage +endif + for pytest in $(PYTESTS) ; do \ + echo Running test: $$pytest ; \ + $(LIBRARY_PATH_PLACEHOLDER) \ + PYTHONPATH=$(COMMON_PYTHON_PATH):$(abs_top_builddir)/src/lib/dns/python/.libs \ + $(PYCOVERAGE_RUN) $(abs_srcdir)/$$pytest || exit ; \ + done diff --git a/src/lib/python/isc/server_common/tests/tsig_keyring_test.py b/src/lib/python/isc/server_common/tests/tsig_keyring_test.py new file mode 100644 index 0000000000..f61c176063 --- /dev/null +++ b/src/lib/python/isc/server_common/tests/tsig_keyring_test.py @@ -0,0 +1,24 @@ +# Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC") +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM +# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +""" +Tests for isc.server_common.tsig_keyring. +""" + +import unittest +import isc.server_common.tsig_keyring + +if __name__ == "__main__": + unittest.main() diff --git a/src/lib/python/isc/server_common/tsig_keyring.py b/src/lib/python/isc/server_common/tsig_keyring.py new file mode 100644 index 0000000000..93cea7388c --- /dev/null +++ b/src/lib/python/isc/server_common/tsig_keyring.py @@ -0,0 +1,15 @@ +# Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC") +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM +# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +