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'])
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 ] )