Network Change & Configuration Management

Reply
Highlighted

Policy Design Center - Rules XML - PolicyRuleCall

ksabo
Techie
Posts: 1
484     0

Hello all,

 

I am new to using NetMRI, but I have an extensive network automation background leveraging PERL, Python, and Expect. I am a big fan of the Policy Compliance aspect of NetMRI as it allows us to monitor thousands of devices with little to no effort.

 

We have began changing our current manual drift detection process into a more automated process. In doing so, we are expecting the project to have great longevity, and we want to design it with that in mind. One thing that I believe we can utilize to do so is the XMLScript based rules. Most specifically, I really like the PolicyRuleCall element as it allows us to design the NetMRI Policies like an external application - meaning compartmentalized components.

 

However, I cannot figure out how to access the attributes of the return object from the PolicyRuleCall. Take following code:

 

<PolicyRuleLogic editor="raw-xml" xmlns='http://www.infoblox.com/NetworkAutomation/1.0/ScriptXml'>
  <PolicyRuleCall output='test' short-name='AD-ATM-ACL'/>
  <PolicyRulePass>
    <Expr field=':status' object='test'/>
  </PolicyRulePass>
</PolicyRuleLogic>

It produces this debug info:

<PolicyRuleLogic editor='raw-xml' xmlns='http://www.infoblox.com/NetworkAutomation/1.0/ScriptXml'>
  <PolicyRuleCall output='test' short-name='AD-ATM-ACL'>
  </PolicyRuleCall> set $test to result value <{:status=>"error", :message=>"object-group network ATM contains an element that is not in the baseline standard", :lineno=>nil, :context=>nil}>
  <PolicyRulePass>
    <Expr field=':status' object='test'>
    </Expr> result value <>
  </PolicyRulePass> result value <{:status=>"pass", :message=>nil}>
</PolicyRuleLogic> result value <{:status=>"pass", :message=>nil}>

I've tried all sorts of various notations and variations of the attribute names to try to access them, but everything comes back as a value of <>.

 

Any help in accessing these attributes would be appreciated!

 

Thanks!

Showing results for 
Search instead for 
Do you mean 

Recommended for You