Add Go wrapper support for different disk formats and drivers.#147
Merged
rn merged 1 commit intomoby:masterfrom Jul 12, 2017
Merged
Add Go wrapper support for different disk formats and drivers.#147rn merged 1 commit intomoby:masterfrom
rn merged 1 commit intomoby:masterfrom
Conversation
ijc
reviewed
Jul 12, 2017
| a = append(a, "-s", fmt.Sprintf("%d:0,virtio-blk,%s", nextSlot, p.Path)) | ||
| // Default the driver to virtio-blk | ||
| driver := "virtio-blk" | ||
| if p.Driver == "" { |
Contributor
Author
There was a problem hiding this comment.
D'oh. That's what I get for manually copying the changes back out of my vendor directory...
ijc
reviewed
Jul 12, 2017
|
|
||
| // Add on a format instruction if specified. | ||
| if p.Format != "" { | ||
| arg += fmt.Sprintf(",format=%s", p.Format) |
Collaborator
There was a problem hiding this comment.
I think this can be just arg += ",format=" + p.Format and therefore avoid the fmt.Sprintf.
Contributor
Author
|
Thanks for the review! Any idea if the cirlcleci failure is related to my change? |
Collaborator
Looks like one for @djs55. @dlorenc if you could squash while he takes a look that'd be great. Your changes LGTM by themselves. |
Collaborator
Signed-off-by: dlorenc <lorenc.d@gmail.com>
Contributor
Author
Contributor
Author
|
Looks like the master rebase did fix CI. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds simple support for pre-configured disks of different types. Specifically, I'd like to be able to use the go wrapper to create VMs with attached qcow2 and sparsebundle disk types.
Apologies in advance for sending this PR without discussion on an issue first. I'm more than happy to refactor this or approach it in some other way.
Signed-off-by: dlorenc lorenc.d@gmail.com