X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fsbi%2Fnngpush.go;h=dbd5d5910f1c036eb7e59abb88cd11f2643d7ff3;hb=refs%2Fchanges%2F31%2F4531%2F1;hp=1f0e0e6fa7d1ce6db934f37ad2d9a15555c03782;hpb=8532ffe427f1853ff6318715b9b6727cbd825654;p=ric-plt%2Frtmgr.git diff --git a/pkg/sbi/nngpush.go b/pkg/sbi/nngpush.go index 1f0e0e6..dbd5d59 100644 --- a/pkg/sbi/nngpush.go +++ b/pkg/sbi/nngpush.go @@ -123,6 +123,10 @@ func (c *RmrPush) DistributeAll(policies *[]string) error { for _, ep := range rtmgr.Eps { go c.send_sync(ep, policies, channel, rmrcallid) } + for rEp, id := range rtmgr.RmrEp { + go c.send_rt_process(rEp,id,policies,rmrcallid) + } + rmrcallid++ count := 0 @@ -188,8 +192,8 @@ func (c *RmrPush) send_data(ep *rtmgr.Endpoint, policies *[]string, call_id int) return false } -func (c *RmrPush) CreateEndpoint(payload string) *rtmgr.Endpoint { - return c.createEndpoint(payload, c) +func (c *RmrPush) CreateEndpoint(payload string,rmrsrc string)*rtmgr.Endpoint { + return c.createEndpoint(payload,rmrsrc, c) } func (c *RmrPush) DistributeToEp(policies *[]string, ep *rtmgr.Endpoint) error { @@ -205,3 +209,39 @@ func (c *RmrPush) DistributeToEp(policies *[]string, ep *rtmgr.Endpoint) error { return nil } + +func (c *RmrPush) send_rt_process(ep string,whid int, policies *[]string, call_id int) bool { + xapp.Logger.Debug("Invoked send_rt_process to endpoint: " + ep + " call_id: " + strconv.Itoa(call_id) + "whid: " + strconv.Itoa(whid)) + var state int + var retstr string + + var policy = []byte{} + + for _, pe := range *policies { + b:= []byte(pe) + for j:=0; j