Closed plribeiro3000 closed 4 years ago
Hi,
I am no longer needing this, should this issue be closed?
Hey @eolamey. Thank you for the feedback but i believe those issues could live here a little longer. Now that we have a small repository it should be easier to add those features. =)
Thanks!
Hey, @plribeiro3000 Is the issue planned for the near future? I use KVM on CentOS 7 and 8 and the missing auto start option will greatly enhance my setup.
@apatelKmd would you be able to open a PR ?
@plribeiro3000 Thanks for getting back. I am new to the project and willing to learn and contribute. I have consulted the CONTRIBUTION.md and the source code.
I see that the :autostart
as an attribute of the server.rb
file but not used anywhere else.
Further investigation of ruby-libvirt-0.7.1/ext/libvirt/domain.c
reveals methods exposed by the library.
I am having trouble with the starting point and need help. Review of the file CONTRIUBTION.md
did not help me with a starting point. Do I need to work with the model or request? If the model, is it the server object or the node object?
This is what I am thinking I need to implement.
Query if the domain is set to autostart. Enable/Disable the domain to autostart based on the boolean value provided.
Querying the domain for an autostart value sounds like a request. And then checking the boolean and making the appropriate call sounds like something for the model. I'm not at all familiar with libvirt though. Does that help point you in the general direction?
@apatelKmd Its just like @geemus said.
The calls to libvirt-ruby
should be encalsulated in a request together with parsing the response and generating the parameters.
Any other logic should fall in a model.
Awesome, I think your inputs are helpful.
FYI, @geemus and @plribeiro3000 I have opened a pull request to receive early feedback. https://github.com/fog/fog-libvirt/pull/73
Hi,
There is an
autostart
attribute in the server model for libvirt. However, I don't see where this attribute could be enabled when creating a VM. I don't know libvirt's API, but it seems there's a separate method to call when enablingautostart
.Is it currently possible to enable
autostart
when creating a VM with fog? If so, how? If not, would it be possible to add it?Thank you.
Original issue opened by @eolamey at fog/fog#3343
cc/ @eolamey @geemus