Deadline monitor 8 add slaves to pool through script

I’m trying to have slaves automatically added to a pool via a custom script, however I cant find any docs on how to do this and I’m completely stuck.
I found in the api in Slaves.py there is a method AddPoolToSlave, however I’m not sure how use this in a script.

Does anyone know of a way to add slaves to a pool via a script?

Here’s pretty good example to get started with.

github.com/ThinkboxSoftware/Dea … utoconf.py