https://pulumi.com logo
Title
g

gentle-soccer-81698

08/27/2020, 6:28 PM
hosts = ['<http://vlab-esx-80.vballin.com|vlab-esx-80.vballin.com>','<http://vlab-esx-90.vballin.com|vlab-esx-90.vballin.com>','<http://vlab-esx-100.vballin.com|vlab-esx-100.vballin.com>','<http://vlab-esx-110.vballin.com|vlab-esx-110.vballin.com>','<http://vlab-esx-120.vballin.com|vlab-esx-120.vballin.com>','<http://vlab-esx-130.vballin.com|vlab-esx-130.vballin.com>','<http://vlab-esx-140.vballin.com|vlab-esx-140.vballin.com>','<http://vlab-esx-150.vballin.com|vlab-esx-150.vballin.com>']

host_thumb_list = []
def get_host_thumbprint():
    for h in hosts:
        thumbprint = vsphere.get_host_thumbprint(address=h, insecure=True)
        host_thumb_list.append(thumbprint)
    return
get_host_thumbprint()
m

microscopic-pilot-97530

08/27/2020, 10:15 PM
How are you using the values in
host_thumb_list
?
These will be instances of
GetHostThumbprintResult
. If you want the list to be of the actual thumbprint values, I think you’ll need to do something like:
host_thumb_list.append(thumbprint.id)
g

gentle-soccer-81698

08/28/2020, 12:02 AM
Thank you @microscopic-pilot-97530 that was exactly it!
👍 1