Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
authorYasin <mohammed-yasin.rahman@lip6.fr>
Thu, 2 Oct 2014 13:08:24 +0000 (15:08 +0200)
committerYasin <mohammed-yasin.rahman@lip6.fr>
Thu, 2 Oct 2014 13:08:24 +0000 (15:08 +0200)
1  2 
portal/actions.py

diff --combined portal/actions.py
@@@ -14,6 -14,8 +14,8 @@@ from myslice.theme              import 
  
  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 +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 +810,7 @@@ def iotlab_create_user (wsgi_request, r
          "structure"     : request['authority_hrn'],
          "city"          : "N/A",
          "country"       : "N/A",
 -        "sshPublicKey"  : [request['public_key']],
 +        "sshPublicKey"  : request['public_key'],
          "motivations"   : "SFA federation",
      }