FORGE: Added including script
[myslice.git] / forge / script / PlcApi / getNodes.py
1 #!/usr/bin/python
2 import xmlrpclib
3 import getpass
4 import Auth
5
6 plc_host='www.planet-lab.eu'
7
8 api_url="https://%s:443/PLCAPI/"%plc_host
9 plc_api= xmlrpclib.ServerProxy(api_url, allow_none=True)
10
11 nodeId = int(raw_input("Give me the node id: "))
12
13 nodes = plc_api.GetNodes(Auth.auth, [nodeId], ['boot_state', 'site_id', 'hostname'])
14
15 for node in nodes:
16         print node