Author Topic: How to update host information via Python API  (Read 4187 times)

greyshrike

  • Jr. Member
  • **
  • Posts: 2
How to update host information via Python API
« on: October 27, 2014, 02:23:22 AM »
I would like to be able to set the description field (as seen on the Workers tab of the Qube GUI) on a host via a Python script.  This would be a dynamic thing - the script would allow artists to make notes on the machine "Nuke seems to be failing... etc."  I can read descriptions for all the hosts on the farm via qb.hostinfo().  I can even update this data structure, but that does not seem to "push" to the supervisor.  (At least, it does not appear in the qube GUI.)   

Is there a way to do this?  I know I can update host *properties* - but that is not what I want.

For various reasons, I would prefer not to do direct MySQL calls.

Thanks in advance!

jburk

  • Administrator
  • *****
  • Posts: 493
Re: How to update host information via Python API
« Reply #1 on: October 27, 2014, 04:23:30 AM »
Host descriptions cannot be set via an API call, they can only be set in a worker's configuration file.

The relevant parameter is worker_description, and it can be set either in the worker's local copy of the qb.conf file, or on the supervisor in the central worker config file, qbwrk.conf.  It should be a double-quoted string.

greyshrike

  • Jr. Member
  • **
  • Posts: 2
Re: How to update host information via Python API
« Reply #2 on: October 29, 2014, 02:48:43 AM »
Ok, thanks!