from plugins.apply import ApplyPlugin
from plugins.querytable import QueryTable
from plugins.googlemap import GoogleMap
-#from plugins.queryupdater import QueryUpdater
+# from plugins.queryupdater import QueryUpdaterPlugin
from plugins.filter_status import FilterStatusPlugin
from plugins.testbeds import TestbedsPlugin
from plugins.scheduler2 import Scheduler2
'lease.resource',
'lease.start_time',
'lease.end_time',
+ 'lease.lease_id', # Important for NITOS identify already existing leases
#'user.user_hrn',
#'application.measurement_point.counter'
)
#page.enqueue_query(query_resource_all)
# leases query
- lease_md = metadata.details_by_object('lease')
- lease_fields = [column['name'] for column in lease_md['column']]
+ #lease_md = metadata.details_by_object('lease')
+ #lease_fields = [column['name'] for column in lease_md['column']]
- query_lease_all = Query.get('lease').select(lease_fields)
- page.enqueue_query(query_lease_all)
+ #query_lease_all = Query.get('lease').select(lease_fields)
+ #page.enqueue_query(query_lease_all)
# --------------------------------------------------------------------------
# ALL RESOURCES LIST
# --------------------------------------------------------------------------
# QueryUpdater (Pending Operations)
-#DEPRECATED| pending_resources = QueryUpdater(
-#DEPRECATED| page = page,
-#DEPRECATED| title = 'Pending operations',
-#DEPRECATED| query = main_query,
-#DEPRECATED| togglable = False,
-#DEPRECATED| # start turned off, it will open up itself when stuff comes in
-#DEPRECATED| toggled = False,
-#DEPRECATED| domid = 'pending',
-#DEPRECATED| outline_complete = True,
-#DEPRECATED| username = request.user,
-#DEPRECATED| )
+# pending_resources = QueryUpdaterPlugin(
+# page = page,
+# title = 'Pending operations',
+# query = main_query,
+# togglable = False,
+# # start turned off, it will open up itself when stuff comes in
+# toggled = False,
+# domid = 'pending',
+# outline_complete = True,
+# username = request.user,
+# )
# --------------------------------------------------------------------------
# NETWORKS
apply = ApplyPlugin(
page = page,
domid = "apply",
- query = main_query #sq_resource,
+ query = main_query,
+ username = request.user,
)
account_query = Query().get('local:account').select('user_id','platform_id','auth_type','config')
platform_details = execute_query(self.request, platform_query)
account_details = execute_query(self.request, account_query)
+
+ # XXX When session has expired, this is None and thus not iterable
for platform_detail in platform_details:
for account_detail in account_details:
if platform_detail['platform_id'] == account_detail['platform_id']: