4 sys.path.append('/usr/lib/xen-default/lib/python/')
7 import xen.xend.XendClient
9 server = xen.xm.XenAPI.Session(xen.xend.XendClient.uri)
12 states = server.xend.domains_with_state(True, 'all', 1)
14 if dict(state[1:])['name'] == name:
15 for (key,value) in state[1:]:
16 if key == 'device' and value[0] == 'vfb':
17 location=dict(value[1:]).get('location')
20 if __name__ == '__main__':
21 print findPort("moo3")