]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2856] Rename memmgr module mes file to libmemmgr to avoid conflict
authorMukund Sivaraman <muks@isc.org>
Wed, 24 Jul 2013 09:29:59 +0000 (14:59 +0530)
committerMukund Sivaraman <muks@isc.org>
Wed, 24 Jul 2013 09:29:59 +0000 (14:59 +0530)
src/lib/python/isc/log_messages/Makefile.am
src/lib/python/isc/log_messages/libmemmgr_messages.py [new file with mode: 0644]
src/lib/python/isc/memmgr/Makefile.am
src/lib/python/isc/memmgr/builder.py
src/lib/python/isc/memmgr/libmemmgr_messages.mes [moved from src/lib/python/isc/memmgr/memmgr_messages.mes with 79% similarity]
src/lib/python/isc/memmgr/logger.py

index caf1e3b772bbcffb9b92f5bf584854bab36e281d..3e265d7a2fdf74e4b6d1fd1ae7fb7bb6a0dfb2f3 100644 (file)
@@ -4,6 +4,7 @@ EXTRA_DIST = __init__.py
 EXTRA_DIST += init_messages.py
 EXTRA_DIST += cmdctl_messages.py
 EXTRA_DIST += ddns_messages.py
+EXTRA_DIST += libmemmgr_messages.py
 EXTRA_DIST += memmgr_messages.py
 EXTRA_DIST += stats_messages.py
 EXTRA_DIST += stats_httpd_messages.py
@@ -25,6 +26,7 @@ CLEANFILES = __init__.pyc
 CLEANFILES += init_messages.pyc
 CLEANFILES += cmdctl_messages.pyc
 CLEANFILES += ddns_messages.pyc
+CLEANFILES += libmemmgr_messages.pyc
 CLEANFILES += memmgr_messages.pyc
 CLEANFILES += stats_messages.pyc
 CLEANFILES += stats_httpd_messages.pyc
diff --git a/src/lib/python/isc/log_messages/libmemmgr_messages.py b/src/lib/python/isc/log_messages/libmemmgr_messages.py
new file mode 100644 (file)
index 0000000..3aedc3f
--- /dev/null
@@ -0,0 +1 @@
+from work.libmemmgr_messages import *
index a2919e53fecfa925e2cbb81d83ad46d45d6ad5a8..55295709dd7032e72bec878c1bda9d7c69fc8967 100644 (file)
@@ -4,20 +4,20 @@ python_PYTHON = __init__.py builder.py datasrc_info.py logger.py
 
 pythondir = $(pyexecdir)/isc/memmgr
 
-BUILT_SOURCES = $(PYTHON_LOGMSGPKG_DIR)/work/memmgr_messages.py
+BUILT_SOURCES = $(PYTHON_LOGMSGPKG_DIR)/work/libmemmgr_messages.py
 
-nodist_pylogmessage_PYTHON = $(PYTHON_LOGMSGPKG_DIR)/work/memmgr_messages.py
+nodist_pylogmessage_PYTHON = $(PYTHON_LOGMSGPKG_DIR)/work/libmemmgr_messages.py
 
 pylogmessagedir = $(pyexecdir)/isc/log_messages/
 
-CLEANFILES = $(PYTHON_LOGMSGPKG_DIR)/work/memmgr_messages.py
-CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/memmgr_messages.pyc
+CLEANFILES = $(PYTHON_LOGMSGPKG_DIR)/work/libmemmgr_messages.py
+CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/libmemmgr_messages.pyc
 
-EXTRA_DIST = memmgr_messages.mes
+EXTRA_DIST = libmemmgr_messages.mes
 
-$(PYTHON_LOGMSGPKG_DIR)/work/memmgr_messages.py : memmgr_messages.mes
+$(PYTHON_LOGMSGPKG_DIR)/work/libmemmgr_messages.py : libmemmgr_messages.mes
        $(top_builddir)/src/lib/log/compiler/message \
-       -d $(PYTHON_LOGMSGPKG_DIR)/work -p $(srcdir)/memmgr_messages.mes
+       -d $(PYTHON_LOGMSGPKG_DIR)/work -p $(srcdir)/libmemmgr_messages.mes
 
 CLEANDIRS = __pycache__
 
index 0b2700637eb78815bb2f0c09fc3610dfa0adb21a..9c3738ea15282777b9b95f971852daaee88adae4 100644 (file)
@@ -17,7 +17,7 @@ import json
 from isc.datasrc import ConfigurableClientList
 from isc.memmgr.datasrc_info import SegmentInfo
 
-from isc.log_messages.memmgr_messages import *
+from isc.log_messages.libmemmgr_messages import *
 from isc.memmgr.logger import logger
 
 class MemorySegmentBuilder:
@@ -69,7 +69,7 @@ class MemorySegmentBuilder:
         # in this case as we are likely running in a different thread
         # from the main thread which would need to be notified. Instead
         # return this in the response queue.
-        logger.error(MEMMGR_BUILDER_BAD_COMMAND_ERROR, bad_command)
+        logger.error(LIBMEMMGR_BUILDER_BAD_COMMAND_ERROR, bad_command)
         self._response_queue.append(('bad_command',))
         self._shutdown = True
 
@@ -110,16 +110,16 @@ class MemorySegmentBuilder:
             result, writer = clist.get_cached_zone_writer(zone_name, catch_load_error,
                                                           dsrc_name)
             if result != ConfigurableClientList.CACHE_STATUS_ZONE_SUCCESS:
-                logger.error(MEMMGR_BUILDER_GET_ZONE_WRITER_ERROR, zone_name, dsrc_name)
+                logger.error(LIBMEMMGR_BUILDER_GET_ZONE_WRITER_ERROR, zone_name, dsrc_name)
                 continue
 
             try:
                 error = writer.load()
                 if error is not None:
-                    logger.error(MEMMGR_BUILDER_ZONE_WRITER_LOAD_1_ERROR, zone_name, dsrc_name, error)
+                    logger.error(LIBMEMMGR_BUILDER_ZONE_WRITER_LOAD_1_ERROR, zone_name, dsrc_name, error)
                     continue
             except Exception as e:
-                logger.error(MEMMGR_BUILDER_ZONE_WRITER_LOAD_2_ERROR, zone_name, dsrc_name, str(e))
+                logger.error(LIBMEMMGR_BUILDER_ZONE_WRITER_LOAD_2_ERROR, zone_name, dsrc_name, str(e))
                 continue
             writer.install()
             writer.cleanup()
similarity index 79%
rename from src/lib/python/isc/memmgr/memmgr_messages.mes
rename to src/lib/python/isc/memmgr/libmemmgr_messages.mes
index 3625b019fe261536cefbe6eea9a090c8d8000a7f..c8fcf05117598113789ca8f8ce92f1ff6378ebca 100644 (file)
 # No namespace declaration - these constants go in the global namespace
 # of the config_messages python module.
 
-% MEMMGR_BUILDER_BAD_COMMAND_ERROR MemorySegmentBuilder received bad command '%1'
+% LIBMEMMGR_BUILDER_BAD_COMMAND_ERROR MemorySegmentBuilder received bad command '%1'
 The MemorySegmentBuilder has received a bad command in its input command
 queue. This is likely a programming error. If the builder runs in a
 separate thread, this would cause it to exit the thread.
 
-% MEMMGR_BUILDER_GET_ZONE_WRITER_ERROR Unable to get zone writer for zone '%1', data source '%2'. Skipping.
+% LIBMEMMGR_BUILDER_GET_ZONE_WRITER_ERROR Unable to get zone writer for zone '%1', data source '%2'. Skipping.
 The MemorySegmentBuilder was unable to get a ZoneWriter for the
 specified zone when handling the load command. This zone will be
 skipped.
 
-% MEMMGR_BUILDER_ZONE_WRITER_LOAD_1_ERROR Error loading zone '%1', data source '%2': '%3'
+% LIBMEMMGR_BUILDER_ZONE_WRITER_LOAD_1_ERROR Error loading zone '%1', data source '%2': '%3'
 The MemorySegmentBuilder failed to load the specified zone when handling
 the load command. This zone will be skipped.
 
-% MEMMGR_BUILDER_ZONE_WRITER_LOAD_2_ERROR Error loading zone '%1', data source '%2': '%3'
+% LIBMEMMGR_BUILDER_ZONE_WRITER_LOAD_2_ERROR Error loading zone '%1', data source '%2': '%3'
 An exception occured when the MemorySegmentBuilder tried to load the
 specified zone when handling the load command. This zone will be
 skipped.
index 804d58f6619fb61a040c53cd496ddafc5d21eba8..b04b190813547d7ee0a67be1614f8296c4d34e16 100644 (file)
@@ -17,4 +17,4 @@
 
 import isc.log
 
-logger = isc.log.Logger("memmgr")
+logger = isc.log.Logger("libmemmgr")