X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frtmgr%2Frtmgr.go;h=06d0f15ca626d4e62b09ca3566c6e771c087a356;hb=380fef30236d9f081dec4cea70dd0b5da5e2b5c4;hp=f82276bcd3d6ebb3f2a4a20f6e7d0af52dc85cbe;hpb=749099bc00ec6cad5da19846e65bd5b4bd9b8de4;p=ric-plt%2Frtmgr.git diff --git a/pkg/rtmgr/rtmgr.go b/pkg/rtmgr/rtmgr.go index f82276b..06d0f15 100644 --- a/pkg/rtmgr/rtmgr.go +++ b/pkg/rtmgr/rtmgr.go @@ -121,11 +121,13 @@ var ( Eps Endpoints Subs SubscriptionList + PrsCfg *PlatformRoutes ) func GetPlatformComponents(configfile string) (*PlatformComponents, error) { xapp.Logger.Debug("Invoked rtmgr.GetPlatformComponents(" + configfile + ")") var rcfg ConfigRtmgr + var rtroutes RtmgrRoutes yamlFile, err := os.Open(configfile) if err != nil { return nil, errors.New("cannot open the file due to: " + err.Error()) @@ -139,6 +141,12 @@ func GetPlatformComponents(configfile string) (*PlatformComponents, error) { if err != nil { return nil, errors.New("cannot read the file due to: " + err.Error()) } + err = json.Unmarshal(jsonByteValue,&rtroutes) + if err != nil { + return nil, errors.New("cannot parse data due to: " + err.Error()) + } + PrsCfg = &(rtroutes.Prs) + err = json.Unmarshal(jsonByteValue, &rcfg) if err != nil { return nil, errors.New("cannot parse data due to: " + err.Error())