Module: check_mk
Branch: master
Commit: ed055ee33d6743af4650cae9695890cc50c41161
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed055ee33d6743…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jun 23 08:01:46 2017 +0200
Some internal cleanups
Change-Id: Id4878ac0697291dbc91d5af32142463ae53c0ea4
---
Makefile | 2 +-
livestatus/api/python/livestatus.py | 15 ++++++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 246ca39..e81ca3f 100644
--- a/Makefile
+++ b/Makefile
@@ -394,7 +394,7 @@ setversion:
echo 'check-mk_$(NEW_VERSION)-1_all.deb net optional' > debian/files
$(MAKE) -C agents NEW_VERSION=$(NEW_VERSION) setversion
ifeq ($(ENTERPRISE),yes)
- sed -i 's/^VERSION=".*/VERSION="$(NEW_VERSION)"/'
enterprise/bin/liveproxyd
+ sed -i 's/^__version__ = ".*/__version__ = "$(NEW_VERSION)"/'
enterprise/bin/liveproxyd
sed -i 's/^VERSION=".*/VERSION="$(NEW_VERSION)"/'
enterprise/bin/cmcdump
sed -i 's/^__version__ = ".*/__version__ = "$(NEW_VERSION)"/'
enterprise/agents/plugins/cmk-update-agent
endif
diff --git a/livestatus/api/python/livestatus.py b/livestatus/api/python/livestatus.py
index ddb1d09..9cdfacf 100644
--- a/livestatus/api/python/livestatus.py
+++ b/livestatus/api/python/livestatus.py
@@ -176,7 +176,17 @@ class Helpers:
return result
-
+# TODO: Add more functionality to the Query class:
+# - set_prepend_site
+# - set_only_sites
+# - set_limit
+# - set_auth_user
+# - set_auth_domain
+# - set_timeout
+# All these are mostly set for a single query and reset back to another
+# value after the query. But nearly all of these usages does not care
+# about resetting the option in case of an exception. This could be
+# handled better using the query class
class Query(object):
"""This object can be passed to all livestatus methods accepting a
livestatus
query. The object can be used to hand over the handling code some flags, for
@@ -508,6 +518,9 @@ class SingleSiteConnection(BaseConnection, Helpers):
# socket: socketurl (obligatory)
# timeout: timeout for tcp/unix in seconds
+# TODO: Move the connect/disconnect stuff to separate methods. Then make
+# it possible to connect/disconnect duing existance of a single object.
+
class MultiSiteConnection(Helpers):
def __init__(self, sites, disabled_sites = None):
if disabled_sites is None: