def servicegroup_exists(sg_name, sg_type=None, **connection_args):
    sg = _servicegroup_get(sg_name, **connection_args)
    if sg is None:
        return False
    if sg_type is not None and sg_type.upper() != sg.get_servicetype():
        return False
    return True
Checks if a service group exists
dataset/ETHPy150Open saltstack/salt/salt/modules/netscaler.py/servicegroup_exists