I did some slave offline/online operations last week too.
I found it easiest to use ssh client to control the slaves (the new
trick in late Jenkins versions,
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+SSH)
Unfortunately I found no way in the client to wait until a slave is
idle. I had to poll
$JENKINS_URL/computer/$NODE_NAME/api/xml?xpath=*/idle/text()
-- Sami
2012/2/27 Mark Waite <
[hidden email]>:
> You can query the state of a slave through the remote API. You can learn
> about the API through the URL:
>
>
http://localhost:8080//computer/api>
> Assuming you have a Jenkins server on localhost port 8080. I think the
> level of detail you need is in "depth=1".
>
> You can use the command line interface to perform an offline-node to take
> the node offline, and can perform an online-node command as well.
>
> Command line interface is described
> at
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI>
> Mark Waite
>
> ________________________________
> From: Lars Nordin <
[hidden email]>
> To: "
[hidden email]" <
[hidden email]>
> Sent: Monday, February 27, 2012 1:38 PM
> Subject: possible to control build slave using remote API?
>
> I’m wondering if it possible to control a build slave using remote API?
> I’m wanting to check if a node is busy, mark it temporarily off line,
> upgrade the system and then mark it back online.
>
>