Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Provider capabilities #2652

Closed
3 tasks
johnbellone opened this issue Dec 13, 2013 · 15 comments
Closed
3 tasks

Add Provider capabilities #2652

johnbellone opened this issue Dec 13, 2013 · 15 comments
Milestone

Comments

@johnbellone
Copy link
Contributor

Since I am working on #2638 I ran into the need for checking provider capabilities. The relevant example is that VirtualBox and VMWare both are providers that have snapshotting capabilities. Other providers may not have snapshots, or they may not be implemented yet in the driver, and it is necessary for the command actions to be able to not execute this.

I see that this is implemented already for guests and I also see a branch for host capabilities. Does anyone see a need for a generic capability plugin that is executable? Rather than merely plowing through and wiring up provider_capabilities I was wondering if the time is worth spending going down this avenue?

The checklist that I have for abstracted capabilities:

  • Add abstract configuration model for capability
  • Refactor existing guest capabilities into Registry
  • Re-implement VirtualBox guest capabilities using Capability model
@johnbellone
Copy link
Contributor Author

@tmatilai @mitchellh Any thoughts?

@johnbellone
Copy link
Contributor Author

An example that I was thinking of is that I would possibly want to use the vagrant snapshot command to perform on the either the provider (most common) or the guest level. If the guest supported snapshotting it could be possible to use a copy-on-write filesystem snapshot, etc.

@mitchellh
Copy link
Contributor

Well, I have to abstract out the capabilities system for hosts for 1.5. I think once I abstract that out then this would be possible. I'll think on it.

@johnbellone
Copy link
Contributor Author

Cool, taking a look at the branch it looks like the initial cut was done the same way I was heading for provider capabilities. I mocked up something for adding a capability plugin, etc, which is what I was thinking. :)

@mitchellh
Copy link
Contributor

Yeah, @fgrehm started the branch. I think it'll change quite a bit since I've been changing "guest.rb" quite a bit which is where the meat of the capabilities are.

@mitchellh
Copy link
Contributor

The "Guest" class should be abstractable to a plane Capabilities class or something... then we can use that for guests, hosts, and providers equally.

@johnbellone
Copy link
Contributor Author

Awesome, that sounds like the avenue I was going down as well. My one thought was whether or not to make the capabilities singular, e.g. "The whole system supports snapshotting" or "This provider supports snapshotting" ... "This guest supports snapshotting" etc.

@fgrehm
Copy link
Contributor

fgrehm commented Dec 13, 2013

Yeah, unfortunately what I had in mind for using host capabilities ended up becoming a low priority for me. But to whoever gets to that, please @ ping me as I'll be more than happy to test it :-)

@johnbellone in case you are interested, some background on it is available at GH-2005

@johnbellone
Copy link
Contributor Author

I may try and draft something in a separate branch. 


Sent from Mailbox for iPhone
JB

On Fri, Dec 13, 2013 at 6:13 PM, Fabio Rehm notifications@github.com
wrote:

Yeah, unfortunately what I had in mind for using host capabilities ended up becoming a low priority for me. But to whoever gets to that, please @ ping me as I'll be more than happy to test it :-)

@johnbellone in case you are interested, some background on it is available at GH-2005

Reply to this email directly or view it on GitHub:
#2652 (comment)

@johnbellone
Copy link
Contributor Author

I'll work on this tonight or tomorrow.

@mitchellh
Copy link
Contributor

No rush :)

@johnbellone
Copy link
Contributor Author

Here's the work I was able to get done on the train.

@fgrehm
Copy link
Contributor

fgrehm commented Dec 17, 2013

@johnbellone cool :) I know it's on a really early stage but do you mind if I start asking questions around that PR? I'm willing to help out over there but I know how annoying it can be for someone to keep asking stuff while things are on their early days before taking shape :P

@johnbellone
Copy link
Contributor Author

@fgrehm Go for it, that's the reason why I posted it up here :).

@mitchellh
Copy link
Contributor

Fixed by #2896

@ghost ghost locked and limited conversation to collaborators Apr 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants