4 sys.path.append('/usr/lib/xen-default/lib/python/')
7 import xen.xend.XendClient
12 server = xen.xm.XenAPI.Session(xen.xend.XendClient.uri)
16 state = server.xend.domain(prefix + name, True)
17 for (key,value) in state[1:]:
18 if key == 'device' and value[0] == 'vfb':
19 location=dict(value[1:]).get('location')
21 except xmlrpclib.Fault:
24 if __name__ == '__main__':
25 print findPort(sys.argv[1])