invoke HPNA Script from external
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:
my($host, $port, $user, $pass) = ('localhost','8023','user','passwd');
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,
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/runAPI.sh Scripts/XX_######.py.
Application returned: 0
Opening session to 127.0.0.1:1099...
Executing the command: run checkdb -resolver nnmforce
Text: Successfully updated 83 device hostnames.
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,