Skip to content
This repository was archived by the owner on May 6, 2022. It is now read-only.

Add marketplace command to svcat #2409

Merged
merged 1 commit into from
Oct 16, 2018

Conversation

jberkhahn
Copy link
Contributor

@jberkhahn jberkhahn commented Oct 11, 2018

This PR is a

  • [x ] Feature Implementation
  • Bug Fix
  • Documentation

What this PR does / why we need it:
This PR implements svcat marketplace, a command for users to browse the catalog of services available to them without having to manually page through the service-catalog abstractions.

Which issue(s) this PR fixes
Fixes #2033

Please leave this checklist in the PR comment so that maintainers can ensure a good PR.

Merge Checklist:

  • New feature
    • Tests
    • Documentation
  • SVCat CLI flag
  • Server Flag for config
    • Chart changes
    • removing a flag by marking deprecated and hiding to avoid
      breaking the chart release and existing clients who provide a
      flag that will get an error when they try to update

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 11, 2018
@jberkhahn jberkhahn force-pushed the marketplace branch 3 times, most recently from 3686695 to 7f9da1c Compare October 11, 2018 23:59
limitations under the License.
*/

package extra
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about putting this under cmd/svcat/plan which has other verbs related to displaying and interacting with plans?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so, I considered about where to put this - it's only sort of related to only classes or only plans. I figured we might as well have a place for commands that aren't strictly related to one of the types, and I didn't want to name it commands because we already have a command dir in there. I was planning on moving the other commands like completion and install here at some point. I'm open to suggestions for a better name.

}
plans := make([][]servicecatalog.Plan, len(classes))
for i, class := range classes {
classPlans, err := c.App.RetrievePlans(class.GetName(), opts)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will result in a lot of requests. Let's change this to do a single call to c.App.RetrievePlans passing in "" for the class. Then iterate over the results to populate your map of classes to plans.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true facts. will fix this.

@carolynvs
Copy link
Contributor

Everything looks good, but I'd really like to see the # of API calls reduced before we merge this.

@jberkhahn
Copy link
Contributor Author

@carolynvs fixed

Copy link
Contributor

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: carolynvs

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 16, 2018
Copy link
Contributor

@artmello artmello left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 16, 2018
@k8s-ci-robot k8s-ci-robot merged commit 3cc9cfa into kubernetes-retired:master Oct 16, 2018
jboyd01 pushed a commit to jboyd01/service-catalog that referenced this pull request Oct 31, 2018
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cf marketplace equivalent command for svcat
4 participants