When an instance's parameters are empty, but not nil, svcat is currently printing it out with {}. It would be better if we could detect that it's empty and not display the parameters.
Current Output
$ svcat describe inst redis1
Name: redis1
Namespace: default
Status: Ready - The instance was provisioned successfully @ 2018-05-18 01:22:15 +0000 UTC
Class: redis
Plan: 4-0-9
Parameters:
{}
Bindings:
No bindings defined
Desired Output
$ svcat describe inst redis1
Name: redis1
Namespace: default
Status: Ready - The instance was provisioned successfully @ 2018-05-18 01:22:15 +0000 UTC
Class: redis
Plan: 4-0-9
Bindings:
No bindings defined
The code responsible for writing the parameters is found here:
There isn't an existing test for that function, so as part of a pull request, adding a new test file, yaml_test.go, and 2-3 test cases around that function would be required.
hello, if no one is already working on it I would like to give it a try
@artmello It's all yours! 馃憤
Let me know if you have any questions.
I would rather see this in the output:
$ svcat describe inst redis1
Name: redis1
Namespace: default
Status: Ready - The instance was provisioned successfully @ 2018-05-18 01:22:15 +0000 UTC
Class: redis
Plan: 4-0-9
Parameters:
No parameters defined
Bindings:
No bindings defined
In the JSON output, I would expect the parameters to continue to be {}, what is the plan there?
@n3wscott as I implemented on the PR, in the JSON output, empty is not displaying anything for Parameters. Also, when no data is available for Parameters, it is not displaying anything, instead of the "No parameters defined" as suggested. I can update the PR with any new decision.
@artmello I think you implemented the issue as written, I am not questioning your work, I am questioning the original issue. looks at @carolynvs 馃憖
@n3wscott Yep, I understood that :). Just wanted to say that I am fine to updating the PR with any desired approach
I like @n3wscott 's suggestion, let's go with that! 馃憤