cleanup for config - again
[sfa.git] / sfa / plc / slices.py
index 20d88a4..98c41a3 100644 (file)
@@ -20,7 +20,7 @@ class Slices(SimpleStorage):
         self.api = api
         self.ttl = ttl
         self.threshold = None
-        path = self.api.config.config_path
+        path = self.api.config.SFA_BASE_DIR
         filename = ".".join([self.api.interface, self.api.hrn, "slices"])
         filepath = path + os.sep + filename
         self.slices_file = filepath
@@ -187,6 +187,11 @@ class Slices(SimpleStorage):
             # Create the person record 
             if not persons:
                 person_id=self.api.plshell.AddPerson(self.api.plauth, person_dict)
+
+               # The line below enables the user account on the remote aggregate soon after it is created.
+               # without this the user key is not transfered to the slice (as GetSlivers returns key of only enabled users),
+               # which prevents the user from login to the slice. We may do additional checks before enabling the user.
+
                self.api.plshell.UpdatePerson(self.api.plauth, person_id, {'enabled' : True})
                 key_ids = []
             else: