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 machine client api pkg #27

Merged
merged 2 commits into from
Oct 10, 2023
Merged

Conversation

hallyn
Copy link
Contributor

@hallyn hallyn commented Sep 26, 2023

Add a client API to get and put a machine. This is used by trust to edit a machine's boot source, iso and disks.

Add a client API to get and put a machine.  This is used by trust to
edit a machine's boot source, iso and disks.

Signed-off-by: Serge Hallyn <[email protected]>
Just have cmd/machine/cmd/ and cmd/machined/cmd be the
main packages for each executable respectively.  (Maybe
we should drop cmd/ there)

Give the full module name in go.mod

Signed-off-by: Serge Hallyn <[email protected]>
@raharper
Copy link
Collaborator

Looking at cmd/machine/cmd/root.go; the private methods are:

getMachines
getMachine
postMachine
putMachine

And this PR makes only Get and Put machine ... shouldn't the client API include all of these?

for example, machine init uses postMachine

console does a Post to the machines//console URL .

Do you see adding those after this? or should they all go in now?

@hallyn
Copy link
Contributor Author

hallyn commented Oct 10, 2023

I figured we'd add them as they're needed, but I don't mind either way. I can add them now if you like.

Copy link
Collaborator

@raharper raharper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raharper raharper merged commit 1b7bc6e into project-machine:main Oct 10, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants