Bug 1581185
| Summary: | [svcat]`-v, --v Level ` option value type and scope are not clear | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | sunzhaohua <zhsun> |
| Component: | Service Catalog | Assignee: | Marko Luksa <mluksa> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | Dongbo Yan <dyan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.10.0 | CC: | chezhang, jaboyd, jiazha, zhsun, zitang |
| Target Milestone: | --- | ||
| Target Release: | 3.11.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-08-30 06:33:48 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
sunzhaohua
2018-05-22 09:56:56 UTC
The current help information for -v is consistent with kubectl and oc. I'm hesitant to try to get upstream agreement on changing this for Service Catalog. Jian can I ask for your thoughts here? I propose closing this, because the plugin system in Kubernetes 1.11 was redesigned so that invoking a plugin through kubectl/oc just runs the plugin binary. This means there will never be any inconsistencies between running the plugin directly and through kubectl/oc. Previously, there were inconsistencies because kubectl/oc added its own flags. Jay, IMO, we just need to indicate the type of the `-v` option, such as "-v, --v 0", the 0 indicate the Int type so that the general users can understand. Similar as the `oc options` command: " -v, --v=0: log level for V logs". Jian, I see what you mean and I agree with you, but sadly, it can't be done. Svcat uses a different library for parsing flags than kubectl/oc. This library prints out the default value for int flags only when it isn't 0. There's no way to change this apart from modifying the actual library. See: https://github.com/kubernetes-incubator/service-catalog/blob/2fd20f3705099e444c084710e05a0f70b96cafde/vendor/github.com/spf13/pflag/flag.go#L712 Marko, Thanks for your information! I got it. |