zabbix.py
def _hostgroup_to_id(zapi, hostgroup):
    """Retrieves the hostgroup id for a given group.

    :param zapi: reference to the zabbix api
    :type zapi: zabbix api
    :param hostgroup: specifies the host group
    :type hostgroup: str
    :return: list of hosts
    """
    groups = zapi.hostgroup.get(monitored_hosts=True)
    for group in groups:
        if group['name'] == hostgroup:
            groupid = group['groupid']
            break

    else:
        groupid = None

    return groupid
Retrieves the hostgroup id for a given group.

    :param zapi: reference to the zabbix api
    :type zapi: zabbix api
    :param hostgroup: specifies the host group
    :type hostgroup: str
    :return: list of hosts
    
Retrieves the hostgroup id for a given group.
Retrieves the hostgroup id for a given group .
def _hostgroup_to_id(zapi, hostgroup):
    groups = zapi.hostgroup.get(monitored_hosts=True)
    for group in groups:
        if group['name'] == hostgroup:
            groupid = group['groupid']
            break
    else:
        groupid = None
    return groupid
def _hostgroup_to_id ( zapi , hostgroup ) : groups = zapi . hostgroup . get ( monitored_hosts = True ) for group in groups : if group [ 'name' ] == hostgroup : groupid = group [ 'groupid' ] break else : groupid = None return groupid
Retrieves the hostgroup id for a given group.
Retrieves the hostgroup id for a given group .
"""Retrieves the hostgroup id for a given group.

    :param zapi: reference to the zabbix api
    :type zapi: zabbix api
    :param hostgroup: specifies the host group
    :type hostgroup: str
    :return: list of hosts
    """
list of hosts
list of hosts
zapi
reference to the zabbix api
reference to the zabbix api
hostgroup
specifies the host group
specifies the host group