Thank you all. will try it out!

On Mon, Jan 11, 2021 at 12:40 PM Benny Zlotnik <[email protected]> wrote:

> you probably need to wrap the parameter with []:
> `affinity_labels=[types.AffinityLabel(id=label_id)]`, because
> affinity_labels expects a list
>
> On Mon, Jan 11, 2021 at 12:34 PM Steven Rosenberg <[email protected]>
> wrote:
> >
> > Dear Lavi,
> >
> > I am ccing others who may have a better idea than me. In the meantime if
> you could provide the engine and vdsm logs, we may be able to ascertain
> what is actually failing.
> >
> > Thank you for your enquiry.
> >
> > With Best Regards.
> >
> > Steven.
> >
> > On Sun, Jan 10, 2021 at 6:19 PM Lavi Bochnik <[email protected]>
> wrote:
> >>
> >> Hi,
> >>
> >> I came across your page in github:
> https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples
> >>
> >> 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
> >>
> >>
> >>
> > _______________________________________________
> > Devel mailing list -- [email protected]
> > To unsubscribe send an email to [email protected]
> > Privacy Statement: https://www.ovirt.org/privacy-policy.html
> > oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> > List Archives:
> https://lists.ovirt.org/archives/list/[email protected]/message/P3DZFJ6KBPUYQ5JF2XSWPVZES7QQJFRQ/
>
>
_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/[email protected]/message/3HCTF4JIRBKYSKMB6SI2OQL5FXTU4L7O/

Reply via email to