pl: set new person HRN after adding it to the site
authorMohamed Larabi <mohamed.larabi@inria.fr>
Thu, 5 Dec 2013 10:54:22 +0000 (11:54 +0100)
committerMohamed Larabi <mohamed.larabi@inria.fr>
Thu, 5 Dec 2013 10:54:22 +0000 (11:54 +0100)
sfa/planetlab/plslices.py

index 9455a20..5e106cd 100644 (file)
@@ -458,10 +458,10 @@ class PlSlices:
                  self.driver.shell.AddRoleToPerson('user', int(person_id))
                  # enable the account 
                  self.driver.shell.UpdatePerson(int(person_id), {'enabled': True})
-                 self.driver.shell.SetPersonHrn(int(person_id), person_hrn)
                  self.driver.shell.SetPersonSfaCreated(int(person_id), 'True')
                  self.driver.shell.AddPersonToSite(int(person_id), site['site_id'])
                  self.driver.shell.AddPersonToSlice(int(person_id), slice['slice_id'])
+                 self.driver.shell.SetPersonHrn(int(person_id), person_hrn)
 
                  # Add keys
                  for key in users_by_hrn[person_hrn].get('keys', []):