lb2hn = {}
dsn = {}
hn2lb = {}
+ for id in id2lb:
+ if id2lb[id] not in lb2hn:
+ lb2hn[id2lb[id]] = []
+
for node in l_nodes:
# this won't reach sites without nodes, which I guess isn't a problem.
if node['site_id'] in id2lb.keys():
api = plc.getCachedAuthAPI()
l_sites = api.GetSites({'peer_id':None},
['login_base', 'site_id', 'abbreviated_name', 'latitude',
- 'longitude', 'max_slices', 'slice_ids', 'node_ids' ])
+ 'longitude', 'max_slices', 'slice_ids', 'node_ids', 'enabled' ])
l_nodes = api.GetNodes({'peer_id':None},
['hostname', 'node_id', 'ports', 'site_id', 'version', 'last_updated',
'date_created', 'last_contact', 'pcu_ids', 'nodenetwork_ids'])
return l_nodes
+
def create_plcdb():
# get sites, and stats
database.dbDump("l_plcsites", l_sites)
return l_nodes
-
if __name__ == '__main__':
create_plcdb()
+else:
+ print "calling plccache init()"
+ init()