require (
gerrit.o-ran-sc.org/r/com/golog v0.0.2
- gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common v1.2.1
- gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.2.8
- gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.2.1
+ gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common v1.2.9
+ gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.2.9
+ gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.2.9
gerrit.o-ran-sc.org/r/ric-plt/sdlgo v0.8.0
github.com/fsnotify/fsnotify v1.4.9
github.com/golang/protobuf v1.4.2
)
require (
- github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/go-redis/redis v6.15.9+incompatible // indirect
- github.com/hashicorp/hcl v1.0.0 // indirect
github.com/kr/pretty v0.2.0 // indirect
github.com/mitchellh/mapstructure v1.3.2 // indirect
github.com/pelletier/go-toml v1.8.0 // indirect
- github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.2.0 // indirect
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 // indirect
- golang.org/x/text v0.3.2 // indirect
- google.golang.org/protobuf v1.23.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
)
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
gerrit.o-ran-sc.org/r/com/golog.git v0.0.2 h1:Ix6SgFuzd6yW6Ur6+qDlGhDO65UYs8PiIkeAL1VaQ2o=
gerrit.o-ran-sc.org/r/com/golog.git v0.0.2/go.mod h1:A7hUL52YQSO4dFIZNcj76XQ09C9PftAe3LyL7kqBnok=
-gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common v1.2.1 h1:3FFbXx55BODThXfyWAiz6cPXVELXFICDQUmJi13EoxM=
-gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common v1.2.1/go.mod h1:QJ1uPPZosGbhxUWpUpeM5fLqFHdnWTrVnvW2DgyOCes=
-gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.2.1/go.mod h1:YaQ+XEI4PcAoISxp9wUpUr2TP0J7JihpQTD0G1Lpd4A=
-gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.2.8 h1:9KLAcDI20l0lYsIbfzlVRMwWLU6iflJkgqG1FxmvcPM=
-gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.2.8/go.mod h1:8NTND7RCHfHPQtx1xk9oclqF/7usqDAX9aYBzt3Hynk=
-gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.2.1 h1:BG3kste8PLVTG0m8CRB/VP2tAV5JImKueBGuOsUNcR8=
-gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.2.1/go.mod h1:zX8rW6YEsagHrRGVW5YO50Ku/Csrpzsuvblhr4DbYi4=
+gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common v1.2.7/go.mod h1:JVNvaD61QI8E1HZNznKw8U8XjIg8W5N1FGTtyirW2iI=
+gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common v1.2.9 h1:NC0UEFpoj0IEafiuFZx4Kk3eDChhmwGjdAv2nkHTlMo=
+gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common v1.2.9/go.mod h1:JVNvaD61QI8E1HZNznKw8U8XjIg8W5N1FGTtyirW2iI=
+gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.2.7/go.mod h1:8NTND7RCHfHPQtx1xk9oclqF/7usqDAX9aYBzt3Hynk=
+gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.2.9 h1:ixfXB3f75PU4DRFF/JdLKnTqQ/ITjPgv2Ew7O4jqnJw=
+gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.2.9/go.mod h1:8NTND7RCHfHPQtx1xk9oclqF/7usqDAX9aYBzt3Hynk=
+gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.2.9 h1:Ex7J8QOjP9jvog7yV/PrWRupbA4X0w8Ili24MI0OwPA=
+gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.2.9/go.mod h1:B02VX2P9GIozb8YyN1e7yzE24Mn9CHWeJ42TZNzGdjw=
gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.8.0 h1:H7GtCRC+pGn6oOxYalUZr7LinQX5jQCVa+ConX7PB5Q=
gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.8.0/go.mod h1:KCHu4JkWnw2Ro6P747wU9S2t7zxFLmBNCiYvGZo3CHo=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk=
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
// Copyright 2019 AT&T Intellectual Property
// Copyright 2019 Nokia
// Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved.
+// Copyright 2023 Capgemini
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
}
nodebInfo.GetGnb().NodeConfigs = e2NodeConfig
+ if nodebInfo.NodeType == entities.Node_GNB {
+ h.logger.Debugf("#E2SetupRequestNotificationHandler buildNodebInfo - entities.Node_GNB %d", entities.Node_GNB)
+
+ gnbNodetype := h.setGnbNodeType(request)
+ h.logger.Debugf("#E2SetupRequestNotificationHandler buildNodebInfo -gnbNodetype %s", gnbNodetype)
+ nodebInfo.GnbNodeType = gnbNodetype
+ nodebInfo.CuUpId = request.GetCuupId()
+ nodebInfo.DuId = request.GetDuId()
+ h.logger.Debugf("#E2SetupRequestNotificationHandler buildNodebInfo -cuupid%s", request.GetCuupId())
+ h.logger.Debugf("#E2SetupRequestNotificationHandler buildNodebInfo -duid %s", request.GetDuId())
+ }
+
ranFuncs := request.ExtractRanFunctionsList()
if ranFuncs != nil {
return nodebInfo, nil
}
+
+func (h *E2SetupRequestNotificationHandler) setGnbNodeType(setupRequest *models.E2SetupRequestMessage) string {
+ gnbNodetype := "gNB"
+ /*Note: Deployment where CU-UP and DU are combined
+ (but do not include the CP-CP) and have a single E2 connection
+ is not supported. The combination of CU-CP, CU-UP, and DU will be
+ treated as a single gNB and expect it to have only the
+ global gNB ID in its E2 Setup ID*/
+ if setupRequest.GetCuupId() != "" && setupRequest.GetDuId() != "" {
+ gnbNodetype = "gNB"
+ } else if setupRequest.GetCuupId() != "" {
+ gnbNodetype = "gNB_CU_UP"
+ } else if setupRequest.GetDuId() != "" {
+ gnbNodetype = "gNB_DU"
+ }
+ return gnbNodetype
+}
+
func (h *E2SetupRequestNotificationHandler) setNodeTypeAndConfiguration(nodebInfo *entities.NodebInfo) error {
for k, v := range gnbTypesMap {
if strings.HasPrefix(nodebInfo.RanName, k) {
// Copyright 2019 AT&T Intellectual Property
// Copyright 2019 Nokia
// Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+// Copyright 2023 Capgemini
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
pipInd := bytes.IndexByte(payload, '|')
setupRequest := &models.E2SetupRequestMessage{}
_ = xml.Unmarshal(utils.NormalizeXml(payload[pipInd+1:]), &setupRequest.E2APPDU)
+ gnbNodetype := "gNB_CU_UP"
+ if setupRequest.GetCuupId() != "" && setupRequest.GetCuupId() != "0" && setupRequest.GetDuId() != "" && setupRequest.GetDuId() != "0" {
+ gnbNodetype = "gNB_CU_UP"
+ } else if setupRequest.GetCuupId() != "" && setupRequest.GetCuupId() != "0" {
+ gnbNodetype = "gNB_CU_UP"
+ } else if setupRequest.GetDuId() != "" && setupRequest.GetDuId() != "0" {
+ gnbNodetype = "gNB_DU"
+ }
nodeb := &entities.NodebInfo{
AssociatedE2TInstanceAddress: e2tInstanceFullAddress,
RanName: gnbNodebRanName,
SetupFromNetwork: true,
NodeType: entities.Node_GNB,
+ GnbNodeType: gnbNodetype,
Configuration: &entities.NodebInfo_Gnb{
Gnb: &entities.Gnb{
GnbType: entities.GnbType_GNB,
PlmnId: setupRequest.GetPlmnId(),
NbId: setupRequest.GetNbId(),
},
+ CuUpId: setupRequest.GetCuupId(),
+ DuId: setupRequest.GetDuId(),
}
return nodeb
// Copyright 2019 AT&T Intellectual Property
// Copyright 2019 Nokia
// Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+// Copyright 2023 Capgemini
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
GnbID string `xml:"gnb-ID"`
} `xml:"gnb-id"`
} `xml:"global-gNB-ID"`
+ GNBCUUPID string `xml:"gNB-CU-UP-ID"`
+ GNBDUID string `xml:"gNB-DU-ID"`
}
type EnGnb struct {
return ""
}
+func (m *E2SetupRequestMessage) GetCuupId() string {
+ globalE2NodeId := m.getGlobalE2NodeId()
+ if id := globalE2NodeId.GNB.GNBCUUPID; id != "" {
+ return m.trimSpaces(id)
+ }
+ return ""
+
+}
+
+func (m *E2SetupRequestMessage) GetDuId() string {
+ globalE2NodeId := m.getGlobalE2NodeId()
+ if id := globalE2NodeId.GNB.GNBDUID; id != "" {
+ return m.trimSpaces(id)
+ }
+ return ""
+}
+
func (m *E2SetupRequestMessage) getInnerEnbId(enbId EnbId) string {
if id := enbId.HomeEnbId; id != "" {
//
// Copyright 2019 AT&T Intellectual Property
// Copyright 2019 Nokia
+// Copyright 2023 Capgemini
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
if nodebInfo.GlobalNbId != nil {
- key, rNibErr = common.ValidateAndBuildNodeBIdKey(nodebInfo.GetNodeType().String(), nodebInfo.GlobalNbId.GetPlmnId(), nodebInfo.GlobalNbId.GetNbId())
+ key, rNibErr = common.ValidateAndBuildNodeBIdKey(nodebInfo.GetNodeType().String(), nodebInfo.GlobalNbId.GetPlmnId(), nodebInfo.GlobalNbId.GetNbId(),nodebInfo.GetCuUpId(),nodebInfo.GetDuId())
if rNibErr != nil {
return rNibErr
}
if nodebInfo.GlobalNbId != nil {
- key, rNibErr = common.ValidateAndBuildNodeBIdKey(nodebInfo.GetNodeType().String(), nodebInfo.GlobalNbId.GetPlmnId(), nodebInfo.GlobalNbId.GetNbId())
+ key, rNibErr = common.ValidateAndBuildNodeBIdKey(nodebInfo.GetNodeType().String(), nodebInfo.GlobalNbId.GetPlmnId(), nodebInfo.GlobalNbId.GetNbId(),nodebInfo.GetCuUpId(),nodebInfo.GetDuId())
if rNibErr != nil {
return rNibErr
}
return []interface{}{}, rNibErr
}
- nodebIdKey, buildNodebIdKeyError := common.ValidateAndBuildNodeBIdKey(nodebInfo.GetNodeType().String(), nodebInfo.GlobalNbId.GetPlmnId(), nodebInfo.GlobalNbId.GetNbId())
+ nodebIdKey, buildNodebIdKeyError := common.ValidateAndBuildNodeBIdKey(nodebInfo.GetNodeType().String(), nodebInfo.GlobalNbId.GetPlmnId(), nodebInfo.GlobalNbId.GetNbId(),nodebInfo.GetCuUpId(),nodebInfo.GetDuId())
data, err := proto.Marshal(nodebInfo)
keys = append(keys, nodebNameKey)
- nodebIdKey, buildNodebIdKeyError := common.ValidateAndBuildNodeBIdKey(nodebInfo.GetNodeType().String(), nodebInfo.GlobalNbId.GetPlmnId(), nodebInfo.GlobalNbId.GetNbId())
+ nodebIdKey, buildNodebIdKeyError := common.ValidateAndBuildNodeBIdKey(nodebInfo.GetNodeType().String(), nodebInfo.GlobalNbId.GetPlmnId(), nodebInfo.GlobalNbId.GetNbId(),nodebInfo.GetCuUpId(),nodebInfo.GetDuId())
if buildNodebIdKeyError == nil {
keys = append(keys, nodebIdKey)
//
// Copyright 2019 AT&T Intellectual Property
// Copyright 2019 Nokia
+// Copyright 2023 Capgemini
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
}
nodebNameKey, _ := common.ValidateAndBuildNodeBNameKey(nodebInfo.RanName)
- nodebIdKey, _ := common.ValidateAndBuildNodeBIdKey(nodebInfo.NodeType.String(), nodebInfo.GlobalNbId.PlmnId, nodebInfo.GlobalNbId.NbId)
+ nodebIdKey, _ := common.ValidateAndBuildNodeBIdKey(nodebInfo.NodeType.String(), nodebInfo.GlobalNbId.PlmnId, nodebInfo.GlobalNbId.NbId,nodebInfo.CuUpId,nodebInfo.DuId)
setExpected := []interface{}{nodebNameKey, nodebInfoData, nodebIdKey, nodebInfoData}
for _, cell := range servedCells {
}
nodebNameKey, _ := common.ValidateAndBuildNodeBNameKey(nodebInfo.RanName)
- nodebIdKey, _ := common.ValidateAndBuildNodeBIdKey(nodebInfo.NodeType.String(), nodebInfo.GlobalNbId.PlmnId, nodebInfo.GlobalNbId.NbId)
+ nodebIdKey, _ := common.ValidateAndBuildNodeBIdKey(nodebInfo.NodeType.String(), nodebInfo.GlobalNbId.PlmnId, nodebInfo.GlobalNbId.NbId,nodebInfo.CuUpId,nodebInfo.DuId)
setExpected := []interface{}{nodebNameKey, nodebInfoData, nodebIdKey, nodebInfoData}
for _, v := range servedNrCells {
}
nodebNameKey, _ := common.ValidateAndBuildNodeBNameKey(nodebInfo.RanName)
- nodebIdKey, _ := common.ValidateAndBuildNodeBIdKey(nodebInfo.NodeType.String(), nodebInfo.GlobalNbId.PlmnId, nodebInfo.GlobalNbId.NbId)
+ nodebIdKey, _ := common.ValidateAndBuildNodeBIdKey(nodebInfo.NodeType.String(), nodebInfo.GlobalNbId.PlmnId, nodebInfo.GlobalNbId.NbId,nodebInfo.CuUpId,nodebInfo.DuId)
setExpected := []interface{}{nodebNameKey, nodebInfoData, nodebIdKey, nodebInfoData}
for _, v := range servedCells {