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

Method GetRoutesBySpace

actor/v7action/route.go:86–103  ·  view source on GitHub ↗
(spaceGUID string, labelSelector string)

Source from the content-addressed store, hash-verified

84}
85
86func (actor Actor) GetRoutesBySpace(spaceGUID string, labelSelector string) ([]resources.Route, Warnings, error) {
87 allWarnings := Warnings{}
88 queries := []ccv3.Query{
89 {Key: ccv3.SpaceGUIDFilter, Values: []string{spaceGUID}},
90 {Key: ccv3.PerPage, Values: []string{ccv3.MaxPerPage}},
91 }
92 if len(labelSelector) > 0 {
93 queries = append(queries, ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}})
94 }
95
96 routes, warnings, err := actor.CloudControllerClient.GetRoutes(queries...)
97 allWarnings = append(allWarnings, warnings...)
98 if err != nil {
99 return nil, allWarnings, err
100 }
101
102 return routes, allWarnings, nil
103}
104
105func (actor Actor) parseRoutePath(routePath string) (string, string, string, resources.Domain, Warnings, error) {
106 var (

Callers

nothing calls this directly

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 1

GetRoutesMethod · 0.65

Tested by

no test coverage detected