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

Logic In operator

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

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

In case variable is group member returns True otherwise False.

Block XML representation

XML representation of 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 if given IP address is present in Bogon prefix list.