Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

Automation Scripts

Reply

Export NetMRI compliance policies and associated rules with REST API

Techie
Posts: 4
153     0

The title says what I want to do. I've been browsing the NetMRI API documentation and I found a method for importing a compliance policy into a NetMRI system. It's part of the Policy model and is called 'import_file' surprisingly enough. However, I can't find any method that will export a policy such that I can use its output to feed to the 'import_file' method.

 

Does such a method really not exist in the API or have I just missed it? I hope I just missed it.

Re: Export NetMRI compliance policies and associated rules with REST API

Techie
Posts: 4
154     0

Well, I found an undocumented method called 'export_file' that is part of the Policy model. It spits out exactly the same text you get when you export a policy using the GUI. Now I'm trying to convince the 'import_file' method to use it's output to import the policy into a second NetMRI system.

Right now, using the 'import_file' method give me this error.

 

Policy file does not contain valid data: undefined method
'rewind' for #<String:0x0000000d03bb20>

 

Has anyone successfully used the 'import_file' method to import a policy into a NetMRI system?

Showing results for 
Search instead for 
Did you mean: 

Recommended for You