MCPcopy
hub / github.com/cloudfoundry/cli / GetRoutesByOrg

Method GetRoutesByOrg

actor/v7action/route.go:192–209  ·  view source on GitHub ↗
(orgGUID string, labelSelector string)

Source from the content-addressed store, hash-verified

190}
191
192func (actor Actor) GetRoutesByOrg(orgGUID string, labelSelector string) ([]resources.Route, Warnings, error) {
193 allWarnings := Warnings{}
194 queries := []ccv3.Query{
195 {Key: ccv3.OrganizationGUIDFilter, Values: []string{orgGUID}},
196 {Key: ccv3.PerPage, Values: []string{ccv3.MaxPerPage}},
197 }
198 if len(labelSelector) > 0 {
199 queries = append(queries, ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}})
200 }
201
202 routes, warnings, err := actor.CloudControllerClient.GetRoutes(queries...)
203 allWarnings = append(allWarnings, warnings...)
204 if err != nil {
205 return nil, allWarnings, err
206 }
207
208 return routes, allWarnings, nil
209}
210
211func (actor Actor) GetApplicationMapForRoute(route resources.Route) (map[string]resources.Application, Warnings, error) {
212 var v7Warning Warnings

Callers

nothing calls this directly

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 1

GetRoutesMethod · 0.65

Tested by

no test coverage detected