I’d like to find a way to have the pool be changed when I run a python script that reads in from an email or a text file. So I’m curious if there is a way to access the pool this way? Also, where does Deadline keep the settings for the group and the pool?
Hi James,
Check out our GroupTimer example on GitHub:
github.com/ThinkboxSoftware/Dea … upTimer.py
The Pools can be retrieved an manipulated in much the same way. See the SetSlavePools() function:
docs.thinkboxsoftware.com/produc … tings.html
Awesome thanks James!
I finally got time to look through this. I’m still trying to wrap my head around the Deadline Python libraries. Is there a direct way to get a list of the current pool setup and to change it. Or do I have to do all of this through the slaves via the Slaves methods?
RepositoryUtils.GetPoolNames()
docs.thinkboxsoftware.com/produc … 7e9c2e346e
RepositoryUtils.GetGroupNames()
docs.thinkboxsoftware.com/produc … 599259a2a5
As a rule of thumb, whenever you can’t work out where a Deadline Scripting API command might reside in the API, chances are, it will be in the “RepositoryUtils” section:
docs.thinkboxsoftware.com/produc … utils.html
RepositoryUtils.SetGroupsForSlave( slaveName, groupNames )
docs.thinkboxsoftware.com/produc … 4c89d3c385
RepositoryUtils.SetPoolsForSlave( slaveName, poolNames )
Awesome thanks!
I’ve been trying to find a function that gets the pools already attached to a slave. I’m probably missing it, but could you key me into how to do this?
allSlaves = RepositoryUtils.GetSlaveSettingsList( "slave names separated by a comma", true )
docs.thinkboxsoftware.com/produc … 858f5a60c5
then query the assigned pools for each slave in the returned list of slave settings with:
for slave in allSlaves:
print "Slave Name: %s, Assigned Pools: %s" % ( slave.SlaveName, slave.SlavePools )
Thanks Mike, I was figuring it would me something like this. I just wasn’t sure o the syntax.