Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

Network Automation and Compliance (NetMRI)

Reply

Variable use in Block Check definition

Authority
Posts: 3
939     0

It it possible to do use a variable when defining a block check?

 

If I define a variable "blk-start", can I use in the follown block check?

<ConfigBlockCheck block-start=blk-start boundary-method="indent">

 

============================================================

 

<PolicyRuleLogic xmlns="http://www.infoblox.com/NetworkAutomation/1.0/ScriptXml" editor="raw-xml">
<Assign variable="test">
<Expr value="pass"/>
</Assign>
<ForEach>
<Expr method="interfaces"/>
<Do>
<If>
<ListSearch list-name="fw_interfaces" result-columns="fwName" search-columns="swName,swIntf">
<Expr field="DeviceName"/>
<Expr field="ifName" object="_loop_value"/>
</ListSearch>
<Then>
<Assign variable="blk-start">
<Expr op="concat">
<Expr value="^interface "/>
<Expr field="ifDescrRaw" object="_loop_value"/>
</Expr>
</Assign>
<If>
<ConfigBlockCheck block-start="^interface" boundary-method="indent">
<Expr op="matches">
<Expr variable="_block"/>
<Expr variable="blk-start"/>
</Expr>
</ConfigBlockCheck>
<Then>
<Assign variable="test">
<Expr value="fail"/>
</Assign>
</Then>
</If>
</Then>
</If>
</Do>
</ForEach>
<If>
<Expr op="!=">
<Expr variable="test"/>
<Expr value="pass"/>
</Expr>
<Then>
<PolicyRuleFail>
</PolicyRuleFail>
</Then>
<Else>
<PolicyRulePass>

 

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You