[ovirt-users] Re: AutoStart VMs (was Re: Re: oVirt 4.4.0 Release is now generally available)
On Thu, May 28, 2020 at 5:01 AM Derek Atkins wrote: > > Hi, > > On Wed, May 27, 2020 5:38 pm, Gianluca Cecchi wrote: > [snip] > > But you hated Python, didn't you? ;-) > > I do. Can't stand it. Doesn't mean I can't read it and/or write it, but > I have to hold my nose doing it. Syntactic white space? Eww. But Python > is already installed and used and, apparently, supported.. And when I > looked at the examples I found that 90% of what I needed to do was already > implemented, so it turned out to be much easier than expected. Actually there are SDKs for other languages: https://gerrit.ovirt.org/#/admin/projects/?filter=sdk https://github.com/oVirt?q=sdk== JS is empty, but the others are more-or-less alive. Python is indeed the most "invested", at least in terms of number of example scripts, but IIUC all of them are generated, so should be complete. Didn't try to use any of them myself, though, other than python. > > > I downloaded your files, even if I'm far from knowing python > > It's pretty much a direct translation of my bash script around > ovirt-shell. It does have one feature that the old code didn't, which is > the ability to wait for ovirt to declare that a vm is actually "up". > > > try the ansible playbook that gives you more flexibility in my opinion > > I've never even installed ansible, let alone tried to use it. I don't > need flexibility, I need the job to get done. But I'll take a look when I > get the chance. Thanks! > > > Gianluca > > -derek > > PS: you (meaning whomever is "in charge" is welcome to add my script(s) to > the examples repo if you feel other people would benefit from seeing it > there. You are most welcome to push it yourself: https://www.ovirt.org/develop/dev-process/working-with-gerrit.html Thanks! Best regards, -- Didi ___ 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/EBTH4LAX47IKJ3YCCASOU6P267STVYTU/
[ovirt-users] Re: AutoStart VMs (was Re: Re: oVirt 4.4.0 Release is now generally available)
Hi, Strahil Nikolov writes: > Hi Derek, > > I also don't like Python (and I prefer Salt instead of Ansible), but > Ansible is the wiser option /personal opinion/ . > My reasons - API change , so your code will eventually will die. > With Ansible - a lot of people use it and there is a high chance that > some updates the Ansible module that will do the job even after the > API changes. Thank you for your input. Turns out it's probably not an issue right now anyways because my understanding is that there is no "live" upgrade path from 4.3/7.x to 4.4/8.x. My understanding is that the only upgrade path is a re-install. If that's the case, then I suspect it will be a VERY long time until I upgrade, because I'm on a single-host production system so can't stage a reinstall the same way I can stage a "yum upgrade". > Also, Ansible is declarative , while python will need more effort. I guess only time will tell ;) There wasn't a significant learning curve to python (as I've already had experience with it, and most of what I needed to do was already in the SDK examples). Ansible is a tool I have never even looked at, let alone tried to use it, so I suspect it would take me more than a couple hours to get it working. > Best Regards, > Strahil Nikolov -derek -- Derek Atkins 617-623-3745 de...@ihtfp.com www.ihtfp.com Computer and Internet Security Consultant ___ 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/Y5ZOZHNN4ERKPAGZ3QN5D7RY3ZC4XQPG/
[ovirt-users] Re: AutoStart VMs (was Re: Re: oVirt 4.4.0 Release is now generally available)
Hi Derek, I also don't like Python (and I prefer Salt instead of Ansible), but Ansible is the wiser option /personal opinion/ . My reasons - API change , so your code will eventually will die. With Ansible - a lot of people use it and there is a high chance that some updates the Ansible module that will do the job even after the API changes. Also, Ansible is declarative , while python will need more effort. Best Regards, Strahil Nikolov На 28 май 2020 г. 4:59:16 GMT+03:00, Derek Atkins написа: >Hi, > >On Wed, May 27, 2020 5:38 pm, Gianluca Cecchi wrote: >[snip] >> But you hated Python, didn't you? ;-) > >I do. Can't stand it. Doesn't mean I can't read it and/or write it, >but >I have to hold my nose doing it. Syntactic white space? Eww. But >Python >is already installed and used and, apparently, supported.. And when I >looked at the examples I found that 90% of what I needed to do was >already >implemented, so it turned out to be much easier than expected. > >> I downloaded your files, even if I'm far from knowing python > >It's pretty much a direct translation of my bash script around >ovirt-shell. It does have one feature that the old code didn't, which >is >the ability to wait for ovirt to declare that a vm is actually "up". > >> try the ansible playbook that gives you more flexibility in my >opinion > >I've never even installed ansible, let alone tried to use it. I don't >need flexibility, I need the job to get done. But I'll take a look >when I >get the chance. Thanks! > >> Gianluca > >-derek > >PS: you (meaning whomever is "in charge" is welcome to add my script(s) >to >the examples repo if you feel other people would benefit from seeing it >there. ___ 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/FUFNIKLAPLPLBGHSSZNMYYBMSVENWXQL/
[ovirt-users] Re: AutoStart VMs (was Re: Re: oVirt 4.4.0 Release is now generally available)
Hi, On Wed, May 27, 2020 5:38 pm, Gianluca Cecchi wrote: [snip] > But you hated Python, didn't you? ;-) I do. Can't stand it. Doesn't mean I can't read it and/or write it, but I have to hold my nose doing it. Syntactic white space? Eww. But Python is already installed and used and, apparently, supported.. And when I looked at the examples I found that 90% of what I needed to do was already implemented, so it turned out to be much easier than expected. > I downloaded your files, even if I'm far from knowing python It's pretty much a direct translation of my bash script around ovirt-shell. It does have one feature that the old code didn't, which is the ability to wait for ovirt to declare that a vm is actually "up". > try the ansible playbook that gives you more flexibility in my opinion I've never even installed ansible, let alone tried to use it. I don't need flexibility, I need the job to get done. But I'll take a look when I get the chance. Thanks! > Gianluca -derek PS: you (meaning whomever is "in charge" is welcome to add my script(s) to the examples repo if you feel other people would benefit from seeing it there. -- Derek Atkins 617-623-3745 de...@ihtfp.com www.ihtfp.com Computer and Internet Security Consultant ___ 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/J6JJBY37J4N2KGVFL5V3EHCXUONQWBLR/
[ovirt-users] Re: AutoStart VMs (was Re: Re: oVirt 4.4.0 Release is now generally available)
On Wed, May 27, 2020 at 4:50 PM Derek Atkins wrote: > Hi, > > (Sorry if you get this twice -- looks like it didn't like the python > script in there so I'm resending without the code) > > Gianluca Cecchi writes: > > > Hi Derek, > > today I played around with Ansible to accomplish, I think, what you > currently > > do in oVirt shell. > > It was the occasion to learn, as always, something new: as "blocks" in > Ansible > > dont' support looping, a workaround to get that. > > Furthermore I have a single host environment where it can turn usefull > too... > [snip] > > I found the time to work on this using the Python SDK. Took me longer > than I wanted but I think I've got something working now. I just > haven't done a FULL test, yet, but a runtime time on the online system > works (I commented out the start call). > But you hated Python, didn't you? ;-) I downloaded your files, even if I'm far from knowing python try the ansible playbook that gives you more flexibility in my opinion Gianluca ___ 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/MP5Z7R2K4YHQHP7DP5QI56HEQMEMTONV/
[ovirt-users] Re: AutoStart VMs (was Re: Re: oVirt 4.4.0 Release is now generally available)
Eh, no point in creating a repo for that, so I just put them on the web: https://www.ihtfp.org/ovirt/ -derek On Wed, May 27, 2020 11:05 am, Staniforth, Paul wrote: > > Thanks Derek, > GitHub or GitLab probably. > > Regards, > Paul S. > > From: Derek Atkins > Sent: 27 May 2020 15:50 > To: Gianluca Cecchi > Cc: tho...@hoberg.net ; users > Subject: [ovirt-users] AutoStart VMs (was Re: Re: oVirt 4.4.0 Release is > now generally available) > > Caution External Mail: Do not click any links or open any attachments > unless you trust the sender and know that the content is safe. > > Hi, > > (Sorry if you get this twice -- looks like it didn't like the python > script in there so I'm resending without the code) > > Gianluca Cecchi writes: > >> Hi Derek, >> today I played around with Ansible to accomplish, I think, what you >> currently >> do in oVirt shell. >> It was the occasion to learn, as always, something new: as "blocks" in >> Ansible >> dont' support looping, a workaround to get that. >> Furthermore I have a single host environment where it can turn usefull >> too... > [snip] > > I found the time to work on this using the Python SDK. Took me longer > than I wanted but I think I've got something working now. I just > haven't done a FULL test, yet, but a runtime time on the online system > works (I commented out the start call). > > I still have two files, a vm_list.py which is a config file that > contains the list of VMs, in order, and then the main program itself > (start_vms.py) which is based on several of the examples available in > github. > > Unfortunately I can't seem to send the script in email because it's > getting blocked by the redhat server -- so I have no idea the best way > to share it. > > -derek > > -- >Derek Atkins 617-623-3745 >de...@ihtfp.com > https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ihtfp.com%2Fdata=02%7C01%7Cp.staniforth%40leedsbeckett.ac.uk%7C481a5446434f4870d2af08d8024ebc14%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637261884477418381sdata=91YXNjtMwqPp%2BYzfXDfWRaas2hwrWl55AHoW89yq4E8%3Dreserved=0 >Computer and Internet Security Consultant > ___ > Users mailing list -- users@ovirt.org > To unsubscribe send an email to users-le...@ovirt.org > Privacy Statement: > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ovirt.org%2Fprivacy-policy.htmldata=02%7C01%7Cp.staniforth%40leedsbeckett.ac.uk%7C481a5446434f4870d2af08d8024ebc14%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637261884477418381sdata=zWJOVIR%2BpaBxBoYYXxc6eNw%2B5lc2%2BdYrBF8VUCxCUAI%3Dreserved=0 > oVirt Code of Conduct: > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ovirt.org%2Fcommunity%2Fabout%2Fcommunity-guidelines%2Fdata=02%7C01%7Cp.staniforth%40leedsbeckett.ac.uk%7C481a5446434f4870d2af08d8024ebc14%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637261884477418381sdata=HgU9l5h4kCDZ7%2BiZ3DrXgYeRFzmB8fUiRs8BRrXs%2BTY%3Dreserved=0 > List Archives: > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.ovirt.org%2Farchives%2Flist%2Fusers%40ovirt.org%2Fmessage%2FX7KLBANUBJCMASFONU2SZQH5Z3HJU2SI%2Fdata=02%7C01%7Cp.staniforth%40leedsbeckett.ac.uk%7C481a5446434f4870d2af08d8024ebc14%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637261884477418381sdata=XtCL1PEnD3VeqtTSSClvIkovqJRklwisxK%2FZD9HnLRI%3Dreserved=0 > To view the terms under which this email is distributed, please go to:- > http://leedsbeckett.ac.uk/disclaimer/email/ > -- Derek Atkins 617-623-3745 de...@ihtfp.com www.ihtfp.com Computer and Internet Security Consultant ___ 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/2SWGNCELQXAQ6RB6KPQ3RR62G63OLKAS/
[ovirt-users] Re: AutoStart VMs (was Re: Re: oVirt 4.4.0 Release is now generally available)
Thanks Derek, GitHub or GitLab probably. Regards, Paul S. From: Derek Atkins Sent: 27 May 2020 15:50 To: Gianluca Cecchi Cc: tho...@hoberg.net ; users Subject: [ovirt-users] AutoStart VMs (was Re: Re: oVirt 4.4.0 Release is now generally available) Caution External Mail: Do not click any links or open any attachments unless you trust the sender and know that the content is safe. Hi, (Sorry if you get this twice -- looks like it didn't like the python script in there so I'm resending without the code) Gianluca Cecchi writes: > Hi Derek, > today I played around with Ansible to accomplish, I think, what you currently > do in oVirt shell. > It was the occasion to learn, as always, something new: as "blocks" in Ansible > dont' support looping, a workaround to get that. > Furthermore I have a single host environment where it can turn usefull too... [snip] I found the time to work on this using the Python SDK. Took me longer than I wanted but I think I've got something working now. I just haven't done a FULL test, yet, but a runtime time on the online system works (I commented out the start call). I still have two files, a vm_list.py which is a config file that contains the list of VMs, in order, and then the main program itself (start_vms.py) which is based on several of the examples available in github. Unfortunately I can't seem to send the script in email because it's getting blocked by the redhat server -- so I have no idea the best way to share it. -derek -- Derek Atkins 617-623-3745 de...@ihtfp.com https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ihtfp.com%2Fdata=02%7C01%7Cp.staniforth%40leedsbeckett.ac.uk%7C481a5446434f4870d2af08d8024ebc14%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637261884477418381sdata=91YXNjtMwqPp%2BYzfXDfWRaas2hwrWl55AHoW89yq4E8%3Dreserved=0 Computer and Internet Security Consultant ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ovirt.org%2Fprivacy-policy.htmldata=02%7C01%7Cp.staniforth%40leedsbeckett.ac.uk%7C481a5446434f4870d2af08d8024ebc14%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637261884477418381sdata=zWJOVIR%2BpaBxBoYYXxc6eNw%2B5lc2%2BdYrBF8VUCxCUAI%3Dreserved=0 oVirt Code of Conduct: https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ovirt.org%2Fcommunity%2Fabout%2Fcommunity-guidelines%2Fdata=02%7C01%7Cp.staniforth%40leedsbeckett.ac.uk%7C481a5446434f4870d2af08d8024ebc14%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637261884477418381sdata=HgU9l5h4kCDZ7%2BiZ3DrXgYeRFzmB8fUiRs8BRrXs%2BTY%3Dreserved=0 List Archives: https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.ovirt.org%2Farchives%2Flist%2Fusers%40ovirt.org%2Fmessage%2FX7KLBANUBJCMASFONU2SZQH5Z3HJU2SI%2Fdata=02%7C01%7Cp.staniforth%40leedsbeckett.ac.uk%7C481a5446434f4870d2af08d8024ebc14%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637261884477418381sdata=XtCL1PEnD3VeqtTSSClvIkovqJRklwisxK%2FZD9HnLRI%3Dreserved=0 To view the terms under which this email is distributed, please go to:- http://leedsbeckett.ac.uk/disclaimer/email/ ___ 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/ZR5CW6WUVK2LFTKL62KW6JC7CLE4QXY6/