Skip to content

Commit

Permalink
Ignore space_guids param when listing service plans
Browse files Browse the repository at this point in the history
This is needed by the `cf service-access` command. We simply ignore the
param as space scoped brokers are not supported yet.

Co-authored-by: Yusmen Zabanov <[email protected]>
  • Loading branch information
georgethebeatle and zabanov-lab committed Aug 15, 2024
1 parent 456ff3d commit 7eac2fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/payloads/service_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ func (l *ServicePlanList) ToMessage() repositories.ListServicePlanMessage {
}

func (l *ServicePlanList) SupportedKeys() []string {
return []string{"service_offering_guids", "names", "available", "fields[service_offering.service_broker]", "service_broker_names", "page", "per_page", "include"}
return []string{"service_offering_guids", "names", "available", "fields[service_offering.service_broker]", "service_broker_names", "include"}
}

func (l *ServicePlanList) IgnoredKeys() []*regexp.Regexp {
return []*regexp.Regexp{regexp.MustCompile("space_guids")}
return []*regexp.Regexp{
regexp.MustCompile("space_guids"),
regexp.MustCompile("page"),
regexp.MustCompile("per_page"),
}
}

func (l *ServicePlanList) DecodeFromURLValues(values url.Values) error {
Expand Down

0 comments on commit 7eac2fd

Please sign in to comment.