def explode(self, hostgroups, contactgroups):
        """Explode hosts with hostgroups, contactgroups::

        * Add contact from contactgroups to host contacts
        * Add host into their hostgroups as hostgroup members

        :param hostgroups: Hostgroups to explode
        :type hostgroups: alignak.objects.hostgroup.Hostgroups
        :param contactgroups: Contactgorups to explode
        :type contactgroups: alignak.objects.contactgroup.Contactgroups
        :return: None
        """
        for template in list(self.templates.values()):
            # items::explode_contact_groups_into_contacts
            # take all contacts from our contact_groups into our contact property
            self.explode_contact_groups_into_contacts(template, contactgroups)

        # Register host in the hostgroups
        for host in self:
            # items::explode_contact_groups_into_contacts
            # take all contacts from our contact_groups into our contact property
            self.explode_contact_groups_into_contacts(host, contactgroups)

            if hasattr(host, 'host_name') and hasattr(host, 'hostgroups'):
                hname = host.host_name
                for hostgroup in host.hostgroups:
                    hostgroups.add_member(hname, hostgroup.strip())
Explode hosts with hostgroups, contactgroups::

        * Add contact from contactgroups to host contacts
        * Add host into their hostgroups as hostgroup members

        :param hostgroups: Hostgroups to explode
        :type hostgroups: alignak.objects.hostgroup.Hostgroups
        :param contactgroups: Contactgorups to explode
        :type contactgroups: alignak.objects.contactgroup.Contactgroups
        :return: None