from opsbro.evaluater import export_evaluater_function
from opsbro.gossip import gossiper

FUNCTION_GROUP = 'gossip'


@export_evaluater_function(function_group=FUNCTION_GROUP)
def is_in_group(group):
    """**is_in_group(group)** -> return True if the node have the group, False otherwise.

 * group: (string) group to check.


<code>
    Example:
        is_in_group('linux')
    Returns:
        True
</code>
    """
    return gossiper.is_in_group(group)

from opsbro.evaluater import export_evaluater_function
from opsbro.gossip import gossiper

FUNCTION_GROUP = 'gossip'


@export_evaluater_function(function_group=FUNCTION_GROUP)
def is_in_group(group):
    """**is_in_group(group)** -> return True if the node have the group, False otherwise.

 * group: (string) group to check.


<code>
    Example:
        is_in_group('linux')
    Returns:
        True
</code>
    """
    return gossiper.is_in_group(group)


@export_evaluater_function(function_group=FUNCTION_GROUP)
def is_in_defined_group(group):
    """**is_in_defined_group(group)** -> return True if the node have the group but was set in the configuration, not from discovery False otherwise.

 * group: (string) group to check.


<code>
    Example:
        is_in_defined_group('linux')
    Returns:
        True
</code>
    """
    return gossiper.is_in_group(group)

Declare the is_in_defined_group function, even if it is an alias of the is_in_group
Enh: Declare the is_in_defined_group function, even if it is an alias of the is_in_group

  from opsbro.evaluater import export_evaluater_function
  from opsbro.gossip import gossiper
  
  FUNCTION_GROUP = 'gossip'
  
  
  @export_evaluater_function(function_group=FUNCTION_GROUP)
  def is_in_group(group):
      """**is_in_group(group)** -> return True if the node have the group, False otherwise.
  
   * group: (string) group to check.
  
  
  <code>
      Example:
          is_in_group('linux')
      Returns:
          True
  </code>
      """
      return gossiper.is_in_group(group)
  
+ 
+ @export_evaluater_function(function_group=FUNCTION_GROUP)
+ def is_in_defined_group(group):
+     """**is_in_defined_group(group)** -> return True if the node have the group but was set in the configuration, not from discovery False otherwise.
+ 
+  * group: (string) group to check.
+ 
+ 
+ <code>
+     Example:
+         is_in_defined_group('linux')
+     Returns:
+         True
+ </code>
+     """
+     return gossiper.is_in_group(group)
+ 
Declare the is_in_defined_group function, even if it is an alias of the is_in_group
## Code Before:
from opsbro.evaluater import export_evaluater_function
from opsbro.gossip import gossiper

FUNCTION_GROUP = 'gossip'


@export_evaluater_function(function_group=FUNCTION_GROUP)
def is_in_group(group):
    """**is_in_group(group)** -> return True if the node have the group, False otherwise.

 * group: (string) group to check.


<code>
    Example:
        is_in_group('linux')
    Returns:
        True
</code>
    """
    return gossiper.is_in_group(group)

## Instruction:
Declare the is_in_defined_group function, even if it is an alias of the is_in_group
## Code After:
from opsbro.evaluater import export_evaluater_function
from opsbro.gossip import gossiper

FUNCTION_GROUP = 'gossip'


@export_evaluater_function(function_group=FUNCTION_GROUP)
def is_in_group(group):
    """**is_in_group(group)** -> return True if the node have the group, False otherwise.

 * group: (string) group to check.


<code>
    Example:
        is_in_group('linux')
    Returns:
        True
</code>
    """
    return gossiper.is_in_group(group)


@export_evaluater_function(function_group=FUNCTION_GROUP)
def is_in_defined_group(group):
    """**is_in_defined_group(group)** -> return True if the node have the group but was set in the configuration, not from discovery False otherwise.

 * group: (string) group to check.


<code>
    Example:
        is_in_defined_group('linux')
    Returns:
        True
</code>
    """
    return gossiper.is_in_group(group)
