check-hrns: slice_ids needs to be in GetSites return values
[myplc.git] / bin / check-hrns.py
index 7c8bdef..8febdee 100755 (executable)
@@ -5,11 +5,7 @@ from optparse import OptionParser
 from PLC.Namespace import hostname_to_hrn, email_to_hrn, slicename_to_hrn
 # (auth_hrn, email):
 
-try:
-    from sfa.util.config import Config
-    toplevel=Config().SFA_INTERFACE_HRN
-except:
-    toplevel=api.config.PLC_HRN_ROOT
+toplevel=api.config.PLC_HRN_ROOT
 
 def handle_nodes (sites,sites_by_id, dry_run, verbose):
     nodes=GetNodes ({'peer_id':None},['node_id','hostname','hrn'])
@@ -112,7 +108,7 @@ Example:
     dry_run=options.show
     verbose=options.verbose
     # optimizing : we compute the set of sites only once
-    sites = GetSites({'peer_id':None},['site_id','login_base','node_ids','person_ids','name','hrn'])
+    sites = GetSites({'peer_id':None},['site_id','login_base','node_ids','person_ids','name','hrn','slice_ids'])
     # remove external sites created through SFA
     sites = [site for site in sites if not site['name'].startswith('sfa:')]
     sites_by_id = dict ( [ (site['site_id'], site) for site in sites ] )