-from __future__ import print_function
-
# this somehow is not used anymore - should it not be ?
from django.core.context_processors import csrf
from django.http import HttpResponseRedirect
from myslice.theme import ThemeView
from myslice.configengine import ConfigEngine
+from myslice.settings import logger
from sfa.planetlab.plxrn import hash_loginbase
try:
for resources in current_resources:
list_res = resources['resource']
- #print "list_b4"
- #print list_res
for res in list_res:
split_list = res.split('+') # split the resource urn
- #print "list_after"
- #print split_list
if [s for s in split_list if 'ple' in s]: # find ple resources
res_hrn = split_list[-1] # last element is resource hrn
ple_resource_list.append(res_hrn)
nitos_resource_list.append(res_hrn)
- except Exception,e:
- print("Exception in slicetabexperiment.py in OneLab resource search %s" % e)
+ except Exception as e:
+ logger.error("Exception in slicetabexperiment.py in OneLab resource search {}".format(e))
- #print "list of ple res hrns"
- #print ple_resource_list
- #print "list of nit_paris res hrns"
- #print nitos_paris_resource_list
- #print "list of iotLab res hrns"
- #print iotlab_resource_list
- #print "list of nitos res hrns"
- #print nitos_resource_list
+ #logger.debug("list of ple res hrns")
+ #logger.debug(ple_resource_list)
+ #logger.debug("list of nit_paris res hrns")
+ #logger.debug(nitos_paris_resource_list)
+ #logger.debug("list of iotLab res hrns")
+ #logger.debug(iotlab_resource_list)
+ #logger.debug("list of nitos res hrns")
+ #logger.debug(nitos_resource_list)
all_users = list()
#get all iotlab users
res = urllib2.urlopen(req)
all_users = json.load(res)
except urllib2.URLError as e:
- print("There is a problem in getting iotlab users %s" % e.reason)
+ logger.error("There is a problem in getting iotlab users {}".format(e.reason))
#getting the login from email