git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
04e316c
)
PL importer: do not import external sites, persons and slices into the registry
author
Mohamed Larabi
<mohamed.larabi@inria.fr>
Fri, 4 Oct 2013 14:19:23 +0000
(16:19 +0200)
committer
Mohamed Larabi
<mohamed.larabi@inria.fr>
Fri, 4 Oct 2013 14:19:23 +0000
(16:19 +0200)
sfa/importer/plimporter.py
patch
|
blob
|
history
diff --git
a/sfa/importer/plimporter.py
b/sfa/importer/plimporter.py
index
7994c8c
..
26d1ccd
100644
(file)
--- a/
sfa/importer/plimporter.py
+++ b/
sfa/importer/plimporter.py
@@
-145,7
+145,7
@@
class PlImporter:
# Get all plc sites
# retrieve only required stuf
sites = shell.GetSites({'peer_id': None, 'enabled' : True},
# Get all plc sites
# retrieve only required stuf
sites = shell.GetSites({'peer_id': None, 'enabled' : True},
- ['site_id','login_base','node_ids','slice_ids','person_ids',])
+ ['site_id','login_base','node_ids','slice_ids','person_ids',
'name'
])
# create a hash of sites by login_base
# sites_by_login_base = dict ( [ ( site['login_base'], site ) for site in sites ] )
# Get all plc users
# create a hash of sites by login_base
# sites_by_login_base = dict ( [ ( site['login_base'], site ) for site in sites ] )
# Get all plc users
@@
-192,6
+192,9
@@
class PlImporter:
# start importing
for site in sites:
# start importing
for site in sites:
+ if site['name'].startswith('sfa.'):
+ continue
+
site_hrn = _get_site_hrn(interface_hrn, site)
# import if hrn is not in list of existing hrns or if the hrn exists
# but its not a site record
site_hrn = _get_site_hrn(interface_hrn, site)
# import if hrn is not in list of existing hrns or if the hrn exists
# but its not a site record