# TODO: if it is, then we need to break up the discovery rule.
ip_list = ""
for node in node_list:
- if len(node['nodenetwork_ids']) > 0:
- ip = netid2ip[node['nodenetwork_ids'][0]]
+ if len(node['interface_ids']) > 0:
+ ip = netid2ip[node['interface_ids'][0]]
if len(ip_list) > 0: ip_list += ","
ip_list += ip
from monitor import parser as parsermodule
parser = parsermodule.getParser(['cacheset'])
- parser.set_defaults( setupglobal=False, syncsite=True, site=None, setupids=False)
+ parser.set_defaults( setupglobal=False, syncsite=True, site=None, sitelist=None, setupids=False)
parser.add_option("", "--setupids", action="store_true", dest="setupids",
help="Setup global IDs.")
parser.add_option("", "--setupglobal", action="store_true", dest="setupglobal",
help="Do not sync sites.")
parser.add_option("", "--site", dest="site",
help="Sync only given site name.")
+ parser.add_option("", "--sitelist", dest="sitelist",
+ help="Sync only given site names in the list.")
opts = parsermodule.parse_args(parser)
os.system("""echo '' > /usr/share/monitor/nodelist.txt""")