Hi,
I wonder if its possible to define Affinity label to a new VM while adding the VM.
I tried this:
vm = vms_service.add(
types.Vm(
........
affinity_labels=types.AffinityLabel(id=label_id)
)
But I'm getting this error:
TypeError: 'AffinityLabel' object is not iterable
** I'm taking the label_id from the list of Affinity labels beforehands.
I saw your example of assigning the label to VM. but this is good for when the VM is already up and running.
Can you please advise how to assign an affinity label at the time of adding/creating a new VM?
Thanks in advance,
Lavi