def servicegroup_delete(sg_name, **connection_args):
 ret = True
 sg = _servicegroup_get(sg_name, **connection_args)
 if (sg is None):
  return False
 nitro = _connect(**connection_args)
 if (nitro is None):
  return False
 try:
  NSServiceGroup.delete(nitro, sg)
 except NSNitroError as error:
  log.debug('netscaler module error - NSServiceGroup.delete() failed: {0}'.format(error))
  ret = False
 _disconnect(nitro)
 return ret

def servicegroup_delete ( sg_name , ** connection_args ) : ret = True sg = _servicegroup_get ( sg_name , ** connection_args ) if ( sg is None ) : return False nitro = _connect ( ** connection_args ) if ( nitro is None ) : return False try : NSServiceGroup . delete ( nitro , sg ) except NSNitroError as error : log . debug ( 'netscaler module error - NSServiceGroup.delete() failed: {0}' . format ( error ) ) ret = False _disconnect ( nitro ) return ret
delete a new service group cli example: .