Ntilton

Deploy Package With LUA (NSA)

Discussion created by Ntilton on Jul 30, 2013
Latest reply on Aug 2, 2013 by Ntilton

I have got a LUA script that finds all the 'Windows' robots that don't have X package on them.

Is there a way I can deploy a package from my archive to them through LUA?

 

I've tried calling the 'inst_pkg' method but I always get an error.

 

Anyone know how to do this?

 

Pertinent Code Below:

                         if foundProbe == false then                               file.write(logFile,"    no "..probeToSearchFor.." found: deploying "..probeToDeploy.."\n")                               toInstall = pds.create()                               pds.putString(toInstall,"package",probeToDeploy)                               --pds.putString(toInstall,"probe","controller")                               a,b = nimbus.request("/CHS/"..h_entry.name.."/"..r_entry.name.."/controller", "inst_pkg",toInstall)                               if b == NIME_OK then                                    file.write(logFile,"    deployment successful\n")                               else                                    file.write(logFile,"    deployment UNSUCCESSFUL!\n")                               end                          end

Outcomes