Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
[myslice.git] / portal / actions.py
index b06ccdf..400f3a7 100644 (file)
@@ -14,6 +14,8 @@ from myslice.theme              import ThemeView
 
 theme = ThemeView()
 
+import activity.slice
+
 # Thierry: moving this right into the code so 
 # most people can use myslice without having to install sfa
 # XXX tmp sfa dependency, should be moved to SFA gateway
@@ -616,7 +618,8 @@ def create_slice(wsgi_request, request):
         raise Exception, "Could not create %s. Already exists ?" % slice_params['hrn']
     else:
         clear_user_creds(wsgi_request,user_email)
-
+        # log user activity
+        activity.slice.validate(self.request, "Slice validation", { "slice" : hrn })
         try:
             theme.template_name = 'slice_request_validated.txt'
             text_content = render_to_string(theme.template, request)
@@ -807,7 +810,7 @@ def iotlab_create_user (wsgi_request, request, namespace = None, as_admin=False)
         "structure"     : request['authority_hrn'],
         "city"          : "N/A",
         "country"       : "N/A",
-        "sshPublicKey"  : [request['public_key']],
+        "sshPublicKey"  : request['public_key'],
         "motivations"   : "SFA federation",
     }