<?xml version="1.0"?>
<interfaceDefinition>
  <node name="reset">
    <children>
      <node name="conntrack-sync">
        <properties>
          <help>Reset connection syncing parameters</help>
        </properties>
        <children>
          <leafNode name="external-cache">
            <properties>
              <help>Reset external cache and request resync with other systems</help>
            </properties>
            <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py reset_external_cache</command>
          </leafNode>
          <leafNode name="internal-cache">
            <properties>
              <help>Reset internal cache and request resync with other systems</help>
            </properties>
            <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py reset_internal_cache</command>
          </leafNode>
        </children>
      </node>
    </children>
  </node>
  <node name="restart">
    <children>
      <leafNode name="conntrack-sync">
        <properties>
          <help>Restart the connection tracking synchronization service</help>
        </properties>
        <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py restart</command>
      </leafNode>
    </children>
  </node>
  <node name="show">
    <children>
      <node name="conntrack-sync">
        <properties>
          <help>Show connection tracking synchronization information</help>
        </properties>
        <children>
          <node name="cache">
            <properties>
              <help>Show connection tracking cache entries</help>
            </properties>
            <children>
              <node name="external">
                <properties>
                  <help>Show external connection tracking cache entries</help>
                </properties>
                <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_external_cache</command>
                <children>
                  <leafNode name="main">
                    <properties>
                      <help>Show external main connection tracking cache entries</help>
                    </properties>
                    <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_external_cache</command>
                  </leafNode>
                  <leafNode name="expect">
                    <properties>
                      <help>Show external expect connection tracking cache entries</help>
                    </properties>
                    <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_external_expect</command>
                  </leafNode>
                </children>
              </node>
              <node name="internal">
                <properties>
                  <help>Show internal connection tracking cache entries</help>
                </properties>
                <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_internal_cache</command>
                <children>
                  <leafNode name="main">
                    <properties>
                      <help>Show internal main connection tracking cache entries</help>
                    </properties>
                    <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_internal_cache</command>
                  </leafNode>
                  <leafNode name="expect">
                    <properties>
                      <help>Show internal expect connection tracking cache entries</help>
                    </properties>
                    <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_internal_expect</command>
                  </leafNode>
                </children>
              </node>
            </children>
          </node>
          <leafNode name="statistics">
            <properties>
              <help>Show connection syncing statistics</help>
            </properties>
            <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_statistics</command>
          </leafNode>
          <leafNode name="status">
            <properties>
              <help>Show conntrack-sync status</help>
            </properties>
            <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_status</command>
          </leafNode>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>