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

implemented verbose and scope as possible #10603

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

cdoern
Copy link
Contributor

@cdoern cdoern commented Jun 8, 2021

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.

@cdoern cdoern linked an issue Jun 8, 2021 that may be closed by this pull request
Copy link
Member

@jwhonce jwhonce left a 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.

// 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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
//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

scope string
verbose bool
}{
// override any golang type defaults
Copy link
Member

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"?

Copy link
Contributor Author

@cdoern cdoern Jun 8, 2021

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.

@cdoern cdoern force-pushed the networksQuery branch 2 times, most recently from 7e291bf to 920e7ec Compare June 8, 2021 17:59
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 8, 2021

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 8, 2021
@jwhonce
Copy link
Member

jwhonce commented Jun 8, 2021

LGTM, now you need to make the tests happy.

Signed-off-by: cdoern <[email protected]>
@cdoern cdoern merged commit da1bade into containers:master Jun 8, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API /networks/{id} missing query parameters
2 participants