jesse.gonzalez

NAS script issue handling embedded ppds records

Discussion created by jesse.gonzalez on Aug 13, 2009
Latest reply on Aug 18, 2009 by jesse.gonzalez
I am trying to extract the robot list from a hub with a 'detail' of 1 to get the robots including probes. Here is my script thus far:

hub_addr = "/DOMAIN/HUB/ROBOT/hub"

robot_pds = pds.create()
pds.putInt(robot_pds, "detail", 1)

robots = nimbus.request(hub_addr, "getrobots", robot_pds)

if (robots ~= nil) then
  robotlist = robots.robotlist
end

for i,robot in pairs(robotlist) do
  robotpds = pds.create()
  print ("\n", robot.name)

  pds.putString(robotpds, "name", robot.name)
  pds.putString(robotpds, "ip", robot.ip)
  pds.putString(robotpds, "addr", robot.addr)
  pds.putString(robotpds, "status", robot.status)
  pds.putString(robotpds, "os_user1", robot.os_user1)
  pds.putString(robotpds, "version", robot.version)
  pds.putString(robotpds, "created", robot.created)
  pds.putString(robotpds, "lastupdate", robot.lastupdate)
  pds.putString(robotpds, "os_major", robot.os_major)
  pds.putString(robotpds, "os_minor", robot.os_minor)
  pds.putString(robotpds, "os_description", robot.os_description)

  probelist = robot.probelist

  if (probelist ~= nil) then
    print (type(probelist))
  end

  nimbus.post("config", robotpds)

  pds.delete(robotpds)
end

I expect 'type(probelist)' above to return userdata and not string. Am I overlooking something?



Outcomes