The snippet below is generating "weird" output:
for s in servers:
vo = ss.getServerVO(s)
values = []
for f in voFields:
attribValue = getattr(vo, f)
values.append(attribValue)
customValues = ss.getCustomFields(s)
for f in customFields:
values.append(customValues[f])
# Convert all values to string before writing
values = map(str, values)
csvFile.writerow( values )
For some - not all - items in the customFields
dictionary, I get the following output:
<bound method ServerVO.getCreatedDate of <pytwist.com.opsware.server.ServerVO instance at 0x3da8680>>
What do I need to do to get the bound method to execute / put its results into my values
dictionary?
(Specific context is in writing a PyTwist script against the HP Server Automation API)