cli icon indicating copy to clipboard operation
cli copied to clipboard

Add "total_service_keys" to quota json unmarshalling

Open sleungcy-sap opened this issue 1 year ago • 3 comments

Description of the Change

Consumers of this library can access the total_service_keys field from the api with this change.

Why Is This PR Valuable?

The value of this parameters is not included into unmarshalled data and is missing at the moment. The value should be available from the API as documented in https://v3-apidocs.cloudfoundry.org/version/3.163.0/#organization-quotas-in-v3

sleungcy-sap avatar May 06 '24 18:05 sleungcy-sap

LGTM, two quick questions I had is that while this change adds the definition to the go-lang structs, this does not add them to any CLI output https://github.com/cloudfoundry/cli/blob/main/command/v7/shared/quota_displayer.go#L57-L66

Firstly, @sleungcy-sap I want to double check that was the intention - this is just a change in the CLI library for consumers of the go module right?

Secondly (non-blocking on this MR), @a-b / @gururajsh if we have this in the struct - should we be adding this to the CLI output? The column output is treated like an API contract right, is there a process for adding new columns (e.g. can we just add a new column on the end or is this considered a breaking change)?

Samze avatar May 17 '24 16:05 Samze

@Samze Yes, this change is for consumers of this repo as a go module

sleungcy-sap avatar May 17 '24 18:05 sleungcy-sap

@sleungcy-sap we discussed this on the WG call this week. While the cli is listed as an experimental client, ideally we would not add functionality to the cli library without exposing the feature in the UX of the CLI itself.

As an alternative have you considered using https://github.com/cloudfoundry/go-cfclient which is now listed as the Go tools area in https://github.com/cloudfoundry/community/blob/main/toc/working-groups/app-runtime-interfaces.md.

If you are interested in expanding the PR to include contributions for UX changes, then we can discuss the next steps for that.

Samze avatar May 28 '24 16:05 Samze

Closing this PR for now, feel free to create an issue that includes a proposal for the UX changes.

gururajsh avatar Jul 08 '24 15:07 gururajsh