git://git.onelab.eu
/
myplc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
85c7ba4
)
check-hrns: Use SFA_INTERFACE_HRN as toplevel if possible
author
Mohamed Larabi
<mohamed.larabi@inria.fr>
Tue, 12 Nov 2013 14:35:02 +0000
(15:35 +0100)
committer
Mohamed Larabi
<mohamed.larabi@inria.fr>
Tue, 12 Nov 2013 14:35:02 +0000
(15:35 +0100)
bin/check-hrns.py
patch
|
blob
|
history
diff --git
a/bin/check-hrns.py
b/bin/check-hrns.py
index
49d73e8
..
7c8bdef
100755
(executable)
--- a/
bin/check-hrns.py
+++ b/
bin/check-hrns.py
@@
-5,7
+5,11
@@
from optparse import OptionParser
from PLC.Namespace import hostname_to_hrn, email_to_hrn, slicename_to_hrn
# (auth_hrn, email):
from PLC.Namespace import hostname_to_hrn, email_to_hrn, slicename_to_hrn
# (auth_hrn, email):
-toplevel=api.config.PLC_HRN_ROOT
+try:
+ from sfa.util.config import Config
+ toplevel=Config().SFA_INTERFACE_HRN
+except:
+ 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'])
def handle_nodes (sites,sites_by_id, dry_run, verbose):
nodes=GetNodes ({'peer_id':None},['node_id','hostname','hrn'])