Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

invoke HPNA Script from external


what is the easiest way to call a script defined in HPNA from an external application?

is the SOAP API the only interface, or is there may be alternative way?

if SOAP API is the only way, would you please be able to advise where to start?

many thanks


Tags (3)
3 Replies
Fleet Admiral Fleet Admiral
Fleet Admiral


As far as I know, SOAP is the only way.  Now, you can use SOAP however you want - for example, Python, .Net, HP Operations Orchestration, Perl, etc...

You didn't mention your version, but I've attached a 10.20 API User Guide.  Check that out for some ideas / syntax...  

But, it's generally not too difficult - I added a basic Perl scriupt below:

use strict;
use warnings;
use Getopt::Long;
use Opsware::NAS::Connect;

my($host, $port, $user, $pass) = ('localhost','8023','user','passwd');
my @output;

my $con = Opsware::NAS::Connect->new(-user => $user, -pass => $pass, -host => $host, -port => $port);


print "run checkdb -resolver nnmforce\n";
@output = $con->cmd("run checkdb -resolver nnmforce");
print join("\n", @output);

In your case, you want to run a command script, so you'd have run command script and whatever variables you need (script name for example, etc).  For details there, find your current version "HP Network Automation Software (NA) CLI/API Command Reference".  

Hope this helps,



Also, you can create a SOAP script and run it via "Run external application" task, so you can have a history about the script that you are runnig.

Fleet Admiral Fleet Admiral
Fleet Admiral

Hi, yes you "can" do that, but it's more dependent on your external script as to what details you may see in the Result and / or the Task Status.  

So, for example, you'll be able to see when it was run, who kicked it off, and typical things like that.  The results would just show what you see when you run it and that (again, depending on your script) may be limited.  

So, it may look like this:

Aug-31-1217 06:30:00              Run External Application - sync NNMi hostnames              Succeeded     3       me5                          Executed application: /home/me5/na_scripts/JythonForHPNA/JythonForHPNA/ Scripts/

Application returned: 0

Starting Jython...
Opening session to
Executing the command: run checkdb -resolver nnmforce
Status: 200
Succeeded: true
StackTrace: null
Text: Successfully updated 83 device hostnames.
ResultSetMetaData: null
ResultSetData: null

Script has finished!

Sorry data doesn't paste that well, but you'll get the idea of the columns the data belongs to.  

Hope this helps,


The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.