You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
joinmatches() doesn't work when the lines it matched appear after some other lines that are matched by an embedded group. This is similar to the following issue: #65
Example that is working:
<input load="text">
snmp-server chassis-id test
snmp-server enable traps bgp
snmp-server enable traps entity
snmp-server host 2.2.2.2 version 2c public
snmp-server host 1.1.1.1 version 2c public
</input>
<group name="snmp.config" expand="" >
snmp-server chassis-id {{ chassis_id }}
<group name="servers*" expand="" >
snmp-server host {{ server }} version {{ version }} {{ community }}
</group>
snmp-server enable traps {{ traps | joinmatches(',') | to_list }}
</group>
<output returner="terminal" format="json" />
It generates the following output, which is expected:
so that the embedded group "servers*" will match lines first, then the later joinmatches() does not work any more.
Here is the example code that show this:
<input load="text">
snmp-server chassis-id test
snmp-server host 2.2.2.2 version 2c public
snmp-server host 1.1.1.1 version 2c public
snmp-server enable traps bgp
snmp-server enable traps entity
</input>
<group name="snmp.config" expand="" >
snmp-server chassis-id {{ chassis_id }}
<group name="servers*" expand="" >
snmp-server host {{ server }} version {{ version }} {{ community }}
</group>
snmp-server enable traps {{ traps | joinmatches(',') | to_list }}
</group>
<output returner="terminal" format="json" />
And it generates following result, which doesn't include the joinmatches:
joinmatches() doesn't work when the lines it matched appear after some other lines that are matched by an embedded group. This is similar to the following issue: #65
Example that is working:
It generates the following output, which is expected:
However, if we move
above
so that the embedded group "servers*" will match lines first, then the later joinmatches() does not work any more.
Here is the example code that show this:
And it generates following result, which doesn't include the joinmatches:
The text was updated successfully, but these errors were encountered: