Revision 9368f21c53b7aa96b8743a0b8b79a0ab44d963c6 authored by Jarno Rajahalme on 20 June 2024, 21:26:05 UTC, committed by Nathan Sweet on 21 June 2024, 15:57:37 UTC
AllowsIdentity is only used for testing, move it there. Add the missing InvertedPortMask field on the wildcard port lookup. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
1 parent d97069c
api.go
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium
package redirectpolicy
import (
"github.com/go-openapi/runtime/middleware"
"github.com/cilium/cilium/api/v1/models"
"github.com/cilium/cilium/api/v1/server/restapi/service"
"github.com/cilium/cilium/pkg/logging/logfields"
)
type getLrpHandler struct {
lrpManager *Manager
}
func (h *getLrpHandler) Handle(params service.GetLrpParams) middleware.Responder {
log.WithField(logfields.Params, logfields.Repr(params)).Debug("GET /lrp request")
return service.NewGetLrpOK().WithPayload(getLRPs(h.lrpManager))
}
func getLRPs(rpm *Manager) []*models.LRPSpec {
lrps := rpm.GetLRPs()
list := make([]*models.LRPSpec, 0, len(lrps))
for _, v := range lrps {
list = append(list, v.GetModel())
}
return list
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...