+ @staticmethod
+ def dom_details (dom):
+ output = ""
+ output += " id={} - OSType={}".format(dom.ID(), dom.OSType())
+ # calling state() seems to be working fine
+ (state, reason) = dom.state()
+ output += " state={}, reason={}".format(STATES.get(state, state),
+ REASONS.get(reason, reason))
+ try:
+ # try to use info() - this however does not work for some reason on f20
+ # info cannot get info operation failed: Cannot read cputime for domain
+ [state, maxmem, mem, ncpu, cputime] = dom.info()
+ output += " [info: state={}, maxmem = {}, mem = {}, ncpu = {}, cputime = {}]"\
+ .format(STATES.get(state, state), maxmem, mem, ncpu, cputime)
+ except:
+ # too bad but libvirt.py prints out stuff on stdout when this fails, don't know how to get rid of that..
+ output += " [info: not available]"
+ return output
+