I have another scripting query I could do with a hand with.
I’m trying to create a post job script that fetches the slave IP address and possibly other info. From the SlaveUtils section of the scripting reference I’ve found the relevant GetMachineIPAddresses ( SlaveInfo[ ] slaveInfos ) function, however I can’t work out how to get/create the required SlaveInfo[] parameter. Can I use the slave name to create this parameter? Or is there another way?
Here’s my basic test script:
[code]import re
from System.IO import *
from Deadline.Scripting import *
import socket
def main(*args):
deadlinePlugin = args[0]
# Attempt to fetch slave IP using deadline
slaveIpAddress = SlaveUtils.GetMachineIPAddresses ( SlaveInfo[ ] slaveInfos )
# Backup method of fetching slave IP
localIP = socket.gethostbyname(socket.gethostname())[/code]
Any pointers really appreciated, I’ve done my best to look through all the scripting resources but can’t find any solutions.