+
+def handle_sites (sites,sites_by_id, dry_run,verbose):
+ for site in sites:
+ hrn='.'.join([toplevel, site['login_base']])
+ if site['hrn'] != hrn:
+ print "Site %s - current hrn %s, should be %s"%(site['name'], site['hrn'], hrn)
+ if dry_run: continue
+ SetSiteHrn (site['site_id'],hrn)
+ else:
+ if verbose: print "Site %s OK"%site['name']