puts"ERROR: Number of routers different from 1: #{routers.length}"
ok=false
pprouters
end
# initialize found attribute to 0
netnodes.eachdo|nn|
nn['found']=0
end
dupes=netnodes.select{|e|netnodes.count(e)>1}
ifdupes.length>0
puts"ERROR: duplicate 'nickname' values in network hosts"
ok=false
end
links=[]
# scan equipments ports, search for each node
neteqs.eachdo|eq|
puts"looking at #{eq['uid']} ..."
eq['linecards'].eachdo|lc|
(lc['ports']||[]).eachdo|port|
# skip if empty port
nextifport=={}
#### FIXME toute cette partie pourrait être enlevée si les données étaient complètes dans l'API ...
ifport['kind'].nil?
# aucun type de port (node, switch, etc.) n'est spécifié. Cherchons si on trouve un netnode (noeud ou switch) avec cet uid, et prenons sa seule interface 'mounted' pas Infiniband...