Question: How can one best get at the number of CPUs on a host or other Worker host properties?
Solution: This can currently best be done by extracting the information from the properties string.
, you are correct Chris. Parsing the host properties is currently the way to do this in python. Here is a snippet that will take the hostinfo, extract the host properties, and print the number of cpus.
h = qb.hostinfo()[0]
props = h['properties'].split(',')
propDict = dict([i.split('=')[:2] for i in props])
print propDict['host.cpus']