X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fslicerequestview.py;h=0c4a5bede8e4db3fb8c2b60d5a92a1d3c783e664;hb=c3272ce22d726e69598349413eb7a7e982b027d8;hp=da8e667c02fc5a0f91b6bc96df8c3771830c5370;hpb=a1334d41a53aec4a8bf2ebd7f3c67244eb8ac1a8;p=myslice.git diff --git a/portal/slicerequestview.py b/portal/slicerequestview.py index da8e667c..0c4a5bed 100644 --- a/portal/slicerequestview.py +++ b/portal/slicerequestview.py @@ -14,16 +14,18 @@ from ui.topmenu import topmenu_items, the_user class SliceRequestView (LoginRequiredAutoLogoutView): def authority_hrn_initial (self, request): + # Using cache manifold-tables to get the list of authorities authorities_query = Query.get('authority').\ select('name', 'authority_hrn') - onelab_enabled_query = Query.get('local:platform').filter_by('platform', '==', 'ple-onelab').filter_by('disabled', '==', 'False') - onelab_enabled = not not execute_admin_query(request, onelab_enabled_query) - if onelab_enabled: - authorities_query = authorities_query.filter_by('authority_hrn', 'included', ['ple.inria', 'ple.upmc', 'ple.ibbtple']) + #onelab_enabled_query = Query.get('local:platform').filter_by('platform', '==', 'ple-onelab').filter_by('disabled', '==', 'False') + #onelab_enabled = not not execute_admin_query(request, onelab_enabled_query) + #if onelab_enabled: + #authorities_query = Query.get('ple:authority').select('name', 'authority_hrn').filter_by('authority_hrn', 'included', ['ple.inria', 'ple.upmc', 'ple.ibbtple','ple.nitos']) + # Now using Cache authorities = execute_admin_query(request, authorities_query) - #authorities = sorted(authorities) + authorities = sorted(authorities) authority_hrn_tuples = [ (authority['authority_hrn'], authority['name'] if authority['name'] else authority['authority_hrn'],) for authority in authorities ] print "authority_hrn_tuples=", authority_hrn_tuples