def servicegroup_add(sg_name, sg_type='HTTP', **connection_args):
    ret = True
    if servicegroup_exists(sg_name):
        return False
    nitro = _connect(**connection_args)
    if nitro is None:
        return False
    sg = NSServiceGroup()
    sg.set_servicegroupname(sg_name)
    sg.set_servicetype(sg_type.upper())
    try:
        NSServiceGroup.add(nitro, sg)
    except NSNitroError as error:
        log.debug('netscaler module error - NSServiceGroup.add() failed: {0}'.format(error))
        ret = False
    _disconnect(nitro)
    return ret
Add a new service group
dataset/ETHPy150Open saltstack/salt/salt/modules/netscaler.py/servicegroup_add