X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=a1-go%2Fpkg%2Fresthooks%2Fresthooks.go;h=508bc49736968eacbad1240b55aa390f36eb18f3;hb=6d6fe01775c2dcf4049287abc1525b746bb8ec29;hp=8fb07dfc1cbab40c8fb5a28153d61e1fb8314160;hpb=a5d992815f470a349dea86d616509222eb051f97;p=ric-plt%2Fa1.git diff --git a/a1-go/pkg/resthooks/resthooks.go b/a1-go/pkg/resthooks/resthooks.go index 8fb07df..508bc49 100644 --- a/a1-go/pkg/resthooks/resthooks.go +++ b/a1-go/pkg/resthooks/resthooks.go @@ -30,6 +30,8 @@ import ( "gerrit.o-ran-sc.org/r/ric-plt/a1/pkg/a1" "gerrit.o-ran-sc.org/r/ric-plt/a1/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/a1/pkg/policy" + "gerrit.o-ran-sc.org/r/ric-plt/a1/pkg/restapi/operations/a1_mediator" "gerrit.o-ran-sc.org/r/ric-plt/a1/pkg/rmr" "gerrit.o-ran-sc.org/r/ric-plt/sdlgo" "github.com/santhosh-tekuri/jsonschema/v5" @@ -85,14 +87,18 @@ func (rh *Resthook) IsValidJson(err error) bool { return err == invalidJsonSchema } func NewResthook() *Resthook { - return createResthook(sdlgo.NewSyncStorage(), rmr.NewRMRSender()) + sdl := sdlgo.NewSyncStorage() + policyManager := policy.NewPolicyManager(sdl) + return createResthook(sdl, rmr.NewRMRSender(policyManager)) } func createResthook(sdlInst iSdl, rmrSenderInst rmr.IRmrSender) *Resthook { - return &Resthook{ + rh := &Resthook{ db: sdlInst, iRmrSenderInst: rmrSenderInst, } + + return rh } func (rh *Resthook) GetA1Health() bool {