bloxHub

www.infoblox.com/community
Remote Send of a Command
Posted on May 03, 2012 | Last edited by chuq on May 03, 2012
Filed in Perl Scripts
+1
0
-1
File name: remote_send_command.zip
File size: 3.65 KB
This script sends a command to the remote device and saves the results into the log using the write_payload method.  This can later be retrieved using the NetMRI::API::Remote::Job read_payload method.
Description:

This pair of scripts, one to be installed on the NetMRI to be run in its sand box (API Example - send command.pl) and one to be run remotely on customer hardware (remote_send_command.pl) allows a user to send commands to devices managed by the NetMRI using the NetMRI Job Engine as a proxy.

Directions:

1.       Log into the GUI of the NetMRI using your web browser

2.       Navigate to Configuration Management -> Job Management -> Scripts

3.       Click on the “Import” button in the lower right hand corner

4.       Specify the attached file “API Example -send_command.txt”

5.       Click on “Import”

6.       From your external Perl environment run “perl remote_send_command.pl devicename command

7.       For example if you want to send the “show command” to device “foo.example.com” you would use “perl remote_send_command.pl foo.example.com show device”

The example provided creates a session for each command that you send from the remote script, although the example could be extended to execute multiple commands per run of the NetMRI Perl Script, or more complicated logic could be included in the NetMRI Perl script which runs on the NetMRI.

 

Add comment

Log in or register to post comments

Welcome to bloxHub

Welcome to bloxHub, our community for users of Infoblox products. Most of our content can be viewed as a guest, but if you wish to contribute or join a conversation, you will need to log in. If you don't have a bloxHub account, we invite you to register an account and join us.

Follow us on Twitter

Follow us on Twitter at @bloxHub and we'll keep you notified of new content on the community as well as webinars and other items of interest to Infoblox users.