'Associate host to hostgroup.
If hostgroup doesn\'t exist, create one.'

def add_host_to_hostgroup(self, host_id):

    hostgroup_name = (constants.HOSTGROUP_PREFIX + host_id)
    hostgroup_id = self.create_hostgroup_with_check(hostgroup_name)
    is_associated = self._is_host_associate_to_hostgroup(hostgroup_id, host_id)
    if (not is_associated):
        self._associate_host_to_hostgroup(hostgroup_id, host_id)
    return hostgroup_id
