Commit 178eef38 authored by abmargb's avatar abmargb
Browse files

added initial bits for diagnostics

parent b3f3a2c9
[xmpp]
jid=abc@domain.com
password=passpass
host=127.0.0.1
port=5222
[doctor]
components=manager1.domain.com,manager2.domain.com,rendezvous1.domain.com
import sleekxmpp
import logging
import traceback
import ConfigParser
config = ConfigParser.ConfigParser()
config.read('config')
logging.basicConfig(level=logging.DEBUG,
format='%(levelname)-8s %(message)s')
xmpp = sleekxmpp.ClientXMPP(config.get('xmpp', 'jid'), config.get('xmpp', 'password'))
xmpp.connect((config.get('xmpp', 'host'), (config.getint('xmpp', 'port'))))
xmpp.process(block=False)
components = config.get("doctor", "components")
for component in components.split(','):
try:
iq = xmpp.make_iq_get(queryxmlns='http://jabber.org/protocol/disco#info',
ito=component, ifrom=xmpp.boundjid)
response = iq.send(block=True, timeout=10)
except Exception, e:
xmpp.disconnect()
raise e
xmpp.disconnect()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment