-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
implemented verbose and scope as possible #10603
Conversation
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.
Nit on comments and one question on logic.
You also need to either tweak existing or add tests, using these query parameters.
pkg/api/handlers/compat/networks.go
Outdated
// utils.Error(w, "Something went wrong.", http.StatusBadRequest, errors.Wrapf(err, "failed to parse parameters for %s", r.URL.String())) | ||
// return | ||
// } | ||
//scope is only used to see if th euser passes any illegal value, verbose is not used but implemented |
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.
//scope is only used to see if th euser passes any illegal value, verbose is not used but implemented | |
// scope is only used to see if the user passes any illegal value, verbose is not used but implemented |
pkg/api/handlers/compat/networks.go
Outdated
scope string | ||
verbose bool | ||
}{ | ||
// override any golang type defaults |
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.
Given the code below should scope be defaulted to "local"?
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.
okay, if I do that should I then remove the http bad request check? or leave it even though it'll be redundant. edit: nevermind the decoder will overwrite it with the passed value.
7e291bf
to
920e7ec
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdoern, jwhonce The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM, now you need to make the tests happy. |
Signed-off-by: cdoern <[email protected]>
Signed-off-by: cdoern [email protected]
partial implementation of scope and verbose for /networks/{id} query. Not much else is possible for these two. Returns Bad Request is scope is anything other than local. The values docker uses for verbose output are not implemented in podman from what I can tell, and implementing would not save any space/time.