+ self.sons = sons if sons else []
+ self.active_domid = active_domid
+ # make sure this is valid, unset otherwise, so we always have exactly one active
+ self.check_active_domid()
+
+ def check_active_domid(self):
+ matches= [ son for son in self.sons if son.domid==self.active_domid ]
+ if len(matches)!=1:
+ logger.warning("WARNING: {} has {} valid son(s) for being active - expecting 1, resetting"\
+ .format(self,len(matches)))
+ self.active_domid = None