Module: check_mk
Branch: master
Commit: c49561381dcb1051d5dba0108ae84b4301698a49
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c49561381dcb10…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Wed Apr 10 08:12:45 2019 +0200
agent_vsphere: refactor for testing with tracefile (I)
Change-Id: I6626568b618875e20535e83e20622d56ce5c6b64
---
agents/special/agent_vsphere | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere
index 81a5c8c..84d5097 100755
--- a/agents/special/agent_vsphere
+++ b/agents/special/agent_vsphere
@@ -986,7 +986,7 @@ class ESXConnection(object):
return system_info
- def query_server(self, payload, payload_params=None):
+ def prepare_soapdata(self, payload, payload_params):
if payload_params is None:
payload_params = {}
@@ -994,7 +994,10 @@ class ESXConnection(object):
if self.system_info:
payload_params.update(self.system_info)
soapdata = put_in_envelope(payload)
- soapdata = soapdata % payload_params
+ return soapdata % payload_params
+
+ def query_server(self, payload, payload_params=None):
+ soapdata = self.prepare_soapdata(payload, payload_params)
self._init_headers(soapdata)