FORGE: Added including script
[myslice.git] / forge / script / PlcApi / getLXCSites.py
1 #!/usr/bin/python
2 from Auth import *
3
4 nodesLxc = plc_api.GetNodeTags(auth, {'value': 'lxc', 'tagname':'pldistro'}, ['node_id', 'hostname'])
5
6 site_ids = []
7 for node in nodesLxc:
8         site_ids.append(plc_api.GetNodes(auth, node['node_id'], ['site_id'])[0]['site_id'])
9
10 sites = plc_api.GetSites(auth, site_ids, ['site_id', 'name', 'abbreviated_name'])
11 for site in sites:
12         print site