vhost-info: Add some code to help debugging in the future

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-06-08 19:51:50 +00:00
parent fac20163c8
commit fe1d44e412

View file

@ -26,11 +26,20 @@ class OutputCallback(CallbackBase):
self.mem_per_host = {}
self.mem_used_in_vm = {}
self.cpu_used_in_vm = {}
# To increate debugging info
# self._display.verbosity = 5
def v2_runner_on_unreachable(self, result):
self.unreachable.add(result._host.get_name())
# Comment this out if you need to debug further the script
# def v2_on_any(self, *args, **kwargs):
# print("OutputCallback - any")
# print(args)
# print(kwargs)
# result = args[0]
# print(result._result)
def v2_runner_on_ok(self, result, *args, **kwargs):
vhostname=result._host.get_name()
if result._result['invocation']['module_args']['command'] == 'nodeinfo':