code: def linkify_with_timeperiods(self, timeperiods, prop):
          
          for i in self:
              if not hasattr(i, prop):
                  continue
  
              tpname = getattr(i, prop).strip()
              # some default values are '', so set None
              if not tpname:
                  setattr(i, prop, '')
                  continue
  
              # Ok, get a real name, search for it
              timeperiod = timeperiods.find_by_name(tpname)
              if timeperiod is None:
                  i.add_error("The %s of the %s '%s' named '%s' is unknown!"
                              % (prop, i.__class__.my_type, i.get_name(), tpname))
                  continue
  
              setattr(i, prop, timeperiod.uuid)
docs: Link items with timeperiods items
  
          :param timeperiods: all timeperiods object
          :type timeperiods: alignak.objects.timeperiod.Timeperiods
          :param prop: property name
          :type prop: str
          :return: None