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():
plcdb_hn2lb = None
plcdb_lb2hn = None
plcdb_netid2ip = None
+plcdb_id2lb = None
def init():
global l_sites
global plcdb_hn2lb
global plcdb_lb2hn
global plcdb_netid2ip
+ global plcdb_id2lb
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'])
plcdb_hn2lb = hn2lb
plcdb_lb2hn = lb2hn
plcdb_netid2ip = netid2ip
+ plcdb_id2lb = id2lb
return l_nodes