Hi Don,

Python SDK is backward compatible, so if you upgrade it to 4.4, you can use it for older oVirt engines from 4.0.

Martin


On Wed, 5 May 2021, 17:06 Don Dupuis, <dondster@gmail.com> wrote:
Martin

That was my problem. While the engine and my host had the correct version of sdk4, the server that I run my automation scripts from had a too old version.

Thanks
Don

On Wed, May 5, 2021 at 4:20 AM Martin Perina <mperina@redhat.com> wrote:
Hi,

unfortunately we have an issue around generating Python SDK documentation, so reboot parameter is not mentioned there yet:


Below code snippet looks good, but please make sure that you are using python-ovirt-engine-sdk4 >= 4.4.10, which added support for reboot parameter.

Regards,
Martin


On Wed, May 5, 2021 at 4:17 AM Don Dupuis <dondster@gmail.com> wrote:
Below is my Add_host routine with reboot=False and my host will still reboot on install. What am I doing wrong? It is not giving me errors.

def Add_host():
    hosts_service = connection.system_service().hosts_service()

    # Add the host:
    host = hosts_service.add(
        types.Host(
            name='%s' % HOSTNAME,
            description='%s A Hypervisor' % HOSTNAME,
            address='%s.%s' % (HOSTNAME, DOMAINNAME),
            root_password='password',
            cluster=types.Cluster(
                name='%s-Locall' % HOSTNAME,
            ),
        ),
    reboot=False,
    )


    host_service = hosts_service.host_service(host.id)
    while True:
        time.sleep(5)
        host = host_service.get()
        if host.status == types.HostStatus.UP:
            break



On Tue, May 4, 2021 at 12:15 AM Yedidyah Bar David <didi@redhat.com> wrote:
On Mon, May 3, 2021 at 6:52 PM Don Dupuis <dondster@gmail.com> wrote:
>
> Can you tell me where the default of reboot on install is set as this wasn't this way in 4.3? I don't see an option in engine-config for this and I have looked through the ansible files on my engine vm.

Not sure it's possible to change the default. Adding Dana.

See also:

https://bugzilla.redhat.com/show_bug.cgi?id=1853906

Best regards,
--
Didi

_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
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/users@ovirt.org/message/QUBDPSF2UNVCLMY5E6DKJYFCI5VBI6KY/


--
Martin Perina
Manager, Software Engineering
Red Hat Czech s.r.o.