[ovirt-users] Re: ovirtsdk4 python - global maintenance

2023-01-20 Thread yevhen . kyrylchenko
Hi,

> To enable global maintenance using Python SDK you need to fetch hosted
> engine VM and then call maintenance method on it:

Thanks, but, as I wrote - I know how to enable it.

My question was - how can I discover if global maintenance enabled.

So far I got around this problem - I just call
hosted-engine --vm-status --json
on one of my hosts and check output.

I didn't find how to solve it with Ovirt Python SDK.

Regard!
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@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/PB4GM75ECP7CSK6UYVGVX2WZI3ZW5H63/


[ovirt-users] Re: ovirtsdk4 python - global maintenance

2023-01-20 Thread Martin Perina
Hi,

To enable global maintenance using Python SDK you need to fetch hosted
engine VM and then call maintenance method on it:

https://ovirt.github.io/python-ovirt-engine-sdk4/4.5/services.m.html#ovirtsdk4.services.VmService.maintenance

Regards,
Martin


On Fri, Jan 20, 2023 at 6:27 AM  wrote:

> Hi!
>
> I know how to set global maintenance mode using python SDK, something like
>
> vms_service.vm_service(vm.id).maintenance(maintenance_enabled=True)
>
> on HostedEngine.
>
> But now I try to find if global maintenance is enabled.
> And I'm going to give up - I can't find how to do it in documentation...
>
> Is there a way to get this info?
>
> Regards!
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@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/U4RVWMBDCWECKPTKFJY2XLJZ6AW2DY6P/
>


-- 
Martin Perina
Manager, Software Engineering
Red Hat Czech s.r.o.
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@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/CNEBNRTMAA3T2REMGVWDEFCA2N6QYSHB/