<s> import libvirt <EOL> from xen . XendManager import XendManager <EOL> from utils . Logger import Logger <EOL> con = libvirt . openReadOnly ( None ) <EOL> class DomainMonitor : <EOL> logger = Logger . getLogger ( ) <EOL> @ staticmethod <EOL> def retriveActiveDomainsByUUID ( con ) : <EOL> domainIds = con . listDomainsID ( ) <EOL> doms = list ( ) <EOL> for dId in domainIds : <EOL> if dId == <NUM_LIT:0> : <EOL> continue <EOL> domain = con . lookupByID ( dId ) <EOL> doms . append ( domain . UUIDString ( ) ) <EOL> return doms </s>
