THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

Network Automation and Compliance (NetMRI)

Reply

Variable use in Block Check definition

Authority
Posts: 3
1112     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