<s> import sys <EOL> from xen . XendManager import XendManager <EOL> from monitoring . MonitoringDispatcher import MonitoringDispatcher <EOL> from communications . XmlRpcClient import XmlRpcClient <EOL> from utils . Logger import Logger <EOL> '''<STR_LIT>''' <EOL> class XenMonitoringDispatcher ( MonitoringDispatcher ) : <EOL> logger = Logger . getLogger ( ) <EOL> @ staticmethod <EOL> def listActiveVMs ( id , server ) : <EOL> try : <EOL> doms = XendManager . retrieveActiveDomainsByUUID ( ) <EOL> XmlRpcClient . sendAsyncMonitoringActiveVMsInfo ( id , "<STR_LIT>" , doms , server ) <EOL> except Exception as e : <EOL> XmlRpcClient . sendAsyncMonitoringActionStatus ( id , "<STR_LIT>" , str ( e ) ) <EOL> XenMonitoringDispatcher . logger . error ( str ( e ) ) <EOL> return </s>
