-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat: added microvm spec & repository #34
Conversation
Added API definition for a MicroVM and a MicroVMList. Created a repository that do get/save/delete instances of the api. A implementation that uses the containerd content store has been added. Signed-off-by: Richard Case <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, nothing major.
"github.com/weaveworks/reignite/pkg/defaults" | ||
) | ||
|
||
var ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are exported, should probably have a doc comment?
pkg/repository/microvm.go
Outdated
) | ||
|
||
// MicroVM is the repoitory definition for a microvm repository. | ||
type MicroVM interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be better named Store
or Repository
or something similar to avoid MicroVM
being both a place to store things, and a thing to be stored there?
pkg/repository/microvm_test.go
Outdated
ctx := context.Background() | ||
|
||
store, contentDir := getLocalContentStore(t) | ||
defer os.RemoveAll(contentDir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use t.Cleanup()
here?
(bonus points for adding it in the getLocalContentStore
function, because it would be triggered when the test was being cleaned up).
Various changes as a result of code review, inclduing: * Changing the name of the repository interface * Cleaning up temporary dis during testing. Signed-off-by: Richard Case <[email protected]>
What this PR does / why we need it:
Added API definition for a MicroVM and a MicroVMList. Created a repository that do get/save/delete instances of the api. A
implementation that uses the containerd content store has been added.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #24
Fixes #25
Special notes for your reviewer:
Checklist:
Release note: