X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=syncplcdb.py;h=6d28e34e9c7994eca0f53b64c7668498d0a06a27;hb=refs%2Fheads%2F1.0;hp=de6a474f954bfbb585a1fc66d3a6369db186a828;hpb=c3f2afdc81c6711c3825c82e2cd4970671575438;p=monitor.git diff --git a/syncplcdb.py b/syncplcdb.py index de6a474..6d28e34 100755 --- a/syncplcdb.py +++ b/syncplcdb.py @@ -51,10 +51,10 @@ def dsn_from_dsln(d_sites, id2lb, l_nodes): def create_netid2ip(l_nodes, l_nodenetworks): netid2ip = {} for node in l_nodes: - for netid in node['nodenetwork_ids']: + for netid in node['interface_ids']: found = False for nn in l_nodenetworks: - if nn['nodenetwork_id'] == netid: + if nn['interface_id'] == netid: found = True netid2ip[netid] = nn['ip'] if not found: @@ -73,7 +73,7 @@ def create_plcdb(): # get nodes at each site, and l_nodes = plc.getNodes({'peer_id':None}, ['hostname', 'node_id', 'ports', 'site_id', 'version', - 'last_updated', 'date_created', 'last_contact', 'pcu_ids', 'nodenetwork_ids']) + 'last_updated', 'date_created', 'last_contact', 'pcu_ids', 'interface_ids']) l_nodenetworks = plc.getNodeNetworks() (plcdb, hn2lb, lb2hn) = dsn_from_dsln(d_sites, id2lb, l_nodes)