- # given that the SFA db does not handle this sort of relationsships
- # it will rely on side-effects in the testbed to keep this persistent
+
+ # subject_record describes the subject of the relationships
+ # ref_record contains the target values for the various relationships we need to manage
+ # (to begin with, this is just the slice x person (researcher) and authority x person (pi) relationships)
+ def update_driver_relations (self, subject_obj, ref_obj):
+ type=subject_obj.type
+ #for (k,v) in subject_obj.__dict__.items(): print k,'=',v
+ if type=='slice' and hasattr(ref_obj,'researcher'):
+ self.update_driver_relation(subject_obj, ref_obj.researcher, 'user', 'researcher')
+ elif type=='authority' and hasattr(ref_obj,'pi'):
+ self.update_driver_relation(subject_obj,ref_obj.pi, 'user', 'pi')
+