+ if name is None: # xenstore may not be fully populated if it hung early
+ try:
+ if xenserver is None:
+ from xen.xm.main import SERVER_LEGACY_XMLRPC, parseServer
+ from xen.util.xmlrpcclient import ServerProxy
+ serverType, serverURI = parseServer()
+ if serverType != SERVER_LEGACY_XMLRPC:
+ continue # we can't handle a XenAPI server yet
+ xenserver = ServerProxy(serverURI)
+ name = filter(lambda x: isinstance(x, list) and x[0]=='name',
+ xenserver.xend.domain(int(domid)))[0][1]
+ except:
+ continue # we have nothing we can show about this domain
+ if name.startswith('d_'):