Logmanager documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Logic In operator

The in operator is used to detect if a provided value (left) is contained in an enumerable data type (right). This is actually a detection whether a variable is a member of a defined group.

Enumerable data types are list, dict, string, IP prefix lists.

In case a variable is a group member, it returns True, otherwise False.

Block XML representation

XML representation of the logic_is_in block

<xml xmlns="http://www.w3.org/1999/xhtml">
  <block type="logic_is_in">
    <value name="A">
      <block type="ip">
        <field name="IP">192.168.0.0</field>
      </block>
    </value>
    <value name="B">
      <block type="ip_prefix_list">
        <field name="IP_PREFIX_LIST">cac2ac66-84b0-4d50-918e-22a70d55ac56</field>
      </block>
    </value>
  </block>
</xml>

Example of visual representation

"In" - contains

“In” - contains

Example of block usage

"In" - example

“In” - example

In operator is used in If statement to detect whether the given IP address is present in Bogon prefix list.