RIC-11566: Add support for Multiple E2 Nodes: CU/DU for the case having same GNBId 66/11566/7 common/v1.2.9 entities/v1.2.9 reader/v1.2.9
authorGunja Rastogi <gunja.rastogi@capgemini.com>
Mon, 7 Aug 2023 12:09:59 +0000 (12:09 +0000)
committerczichy <thoralf.czichy@nokia.com>
Tue, 22 Aug 2023 11:22:45 +0000 (14:22 +0300)
Change-Id: Ia40106cf5d7513cb1fb8ead9ac2cf73a5c3b0d2a
Signed-off-by: Gunja Rastogi <gunja.rastogi@capgemini.com>
common/utils.go
entities/nodeb_info.pb.go
entities/nodeb_info.proto
reader/rNibReader.go

index 1cae140..0067038 100644 (file)
@@ -1,6 +1,7 @@
 //
 // 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.
@@ -59,7 +60,7 @@ func ValidateAndBuildNodeBNameKey(inventoryName string) (string, error) {
 /*
 ValidateAndBuildNodeBIdKey builds key according to the specified format returns the resulting string
 */
-func ValidateAndBuildNodeBIdKey(nodeType string, plmnId string, nbId string) (string, error) {
+func ValidateAndBuildNodeBIdKey(nodeType string, plmnId string, nbId string, cuupId string, duId string) (string, error) {
        if nodeType == "" {
                return "", NewValidationError("#utils.ValidateAndBuildNodeBIdKey - an empty node type received")
        }
@@ -69,8 +70,22 @@ func ValidateAndBuildNodeBIdKey(nodeType string, plmnId string, nbId string) (st
        if nbId == "" {
                return "", NewValidationError("#utils.ValidateAndBuildNodeBIdKey - an empty nbId received")
        }
+        /*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 cuupId != "" && duId != ""{
+               return fmt.Sprintf("%s:%s:%s", nodeType, plmnId, nbId), nil
+       }else if cuupId != "" {
+               return fmt.Sprintf("%s:%s:%s:%s", nodeType, plmnId, nbId, cuupId), nil
+       }else if duId != "" {
+               return fmt.Sprintf("%s:%s:%s:%s", nodeType, plmnId, nbId, duId ), nil
+       }else {
        return fmt.Sprintf("%s:%s:%s", nodeType, plmnId, nbId), nil
 }
+}
 
 /*
 ValidateAndBuildCellNamePciKey builds key according to the specified format returns the resulting string
index 3f1b580..8ac6332 100644 (file)
@@ -1,6 +1,7 @@
 //
 // 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.
@@ -208,6 +209,9 @@ type NodebInfo struct {
        AssociatedE2TInstanceAddress string                    `protobuf:"bytes,12,opt,name=associated_e2t_instance_address,json=associatedE2tInstanceAddress,proto3" json:"associated_e2t_instance_address,omitempty"`
        SetupFromNetwork             bool                      `protobuf:"varint,13,opt,name=setup_from_network,json=setupFromNetwork,proto3" json:"setup_from_network,omitempty"`
        StatusUpdateTimeStamp        uint64                    `protobuf:"varint,14,opt,name=status_update_time_stamp,json=statusUpdateTimeStamp,proto3" json:"status_update_time_stamp,omitempty"`
+       GnbNodeType                  string                    `protobuf:"bytes,15,opt,name=gnb_node_type,json=gnbNodeType,proto3" json:"gnb_node_type,omitempty"`
+       CuUpId                       string                    `protobuf:"bytes,16,opt,name=cu_up_id,json=cuUpId,proto3" json:"cu_up_id,omitempty"`
+       DuId                         string                    `protobuf:"bytes,17,opt,name=du_id,json=duId,proto3" json:"du_id,omitempty"`
 }
 
 func (x *NodebInfo) Reset() {
@@ -347,6 +351,27 @@ func (x *NodebInfo) GetStatusUpdateTimeStamp() uint64 {
        return 0
 }
 
+func (x *NodebInfo) GetGnbNodeType() string {
+       if x != nil {
+               return x.GnbNodeType
+       }
+       return ""
+}
+
+func (x *NodebInfo) GetCuUpId() string {
+       if x != nil {
+               return x.CuUpId
+       }
+       return ""
+}
+
+func (x *NodebInfo) GetDuId() string {
+       if x != nil {
+               return x.DuId
+       }
+       return ""
+}
+
 type isNodebInfo_Configuration interface {
        isNodebInfo_Configuration()
 }
@@ -448,7 +473,7 @@ var file_nodeb_info_proto_rawDesc = []byte{
        0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x32, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x66, 0x61, 0x69,
        0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72,
        0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x6e, 0x62, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
-       0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3, 0x05, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x62,
+       0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x06, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x62,
        0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
        0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x61, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12,
        0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12,
@@ -492,27 +517,32 @@ var file_nodeb_info_proto_rawDesc = []byte{
        0x72, 0x6b, 0x12, 0x37, 0x0a, 0x18, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x75, 0x70, 0x64,
        0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0e,
        0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61,
-       0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0f, 0x0a, 0x0d, 0x63,
-       0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2d, 0x0a, 0x04,
-       0x4e, 0x6f, 0x64, 0x65, 0x22, 0x25, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07,
-       0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x4e, 0x42,
-       0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x4e, 0x42, 0x10, 0x02, 0x22, 0x54, 0x0a, 0x07, 0x46,
-       0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x22, 0x49, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10,
-       0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00,
-       0x12, 0x14, 0x0a, 0x10, 0x58, 0x32, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x46, 0x41, 0x49,
-       0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x4e, 0x44, 0x43, 0x5f, 0x58,
-       0x32, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10,
-       0x02, 0x2a, 0x6d, 0x0a, 0x15, 0x45, 0x32, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
-       0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e,
-       0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x45, 0x32, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x49, 0x43, 0x41,
-       0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x00, 0x12,
-       0x14, 0x0a, 0x10, 0x58, 0x32, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x51, 0x55,
-       0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x4e, 0x44, 0x43, 0x5f, 0x58, 0x32,
-       0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x02,
-       0x42, 0x33, 0x5a, 0x31, 0x67, 0x65, 0x72, 0x72, 0x69, 0x74, 0x2e, 0x6f, 0x2d, 0x72, 0x61, 0x6e,
-       0x2d, 0x73, 0x63, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x72, 0x2f, 0x72, 0x69, 0x63, 0x2d, 0x70, 0x6c,
-       0x74, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x62, 0x2d, 0x72, 0x6e, 0x69, 0x62, 0x2f, 0x65, 0x6e, 0x74,
-       0x69, 0x74, 0x69, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+       0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x0d, 0x67,
+       0x6e, 0x62, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0f, 0x20, 0x01,
+       0x28, 0x09, 0x52, 0x0b, 0x67, 0x6e, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
+       0x18, 0x0a, 0x08, 0x63, 0x75, 0x5f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28,
+       0x09, 0x52, 0x06, 0x63, 0x75, 0x55, 0x70, 0x49, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x64, 0x75, 0x5f,
+       0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x75, 0x49, 0x64, 0x42, 0x0f,
+       0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22,
+       0x2d, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0x25, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12,
+       0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03,
+       0x45, 0x4e, 0x42, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x4e, 0x42, 0x10, 0x02, 0x22, 0x54,
+       0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x22, 0x49, 0x0a, 0x04, 0x54, 0x79, 0x70,
+       0x65, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x59, 0x50,
+       0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x58, 0x32, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f,
+       0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x4e, 0x44,
+       0x43, 0x5f, 0x58, 0x32, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55,
+       0x52, 0x45, 0x10, 0x02, 0x2a, 0x6d, 0x0a, 0x15, 0x45, 0x32, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63,
+       0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a,
+       0x1f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x45, 0x32, 0x5f, 0x41, 0x50, 0x50, 0x4c,
+       0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c,
+       0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x58, 0x32, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x52,
+       0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x4e, 0x44, 0x43,
+       0x5f, 0x58, 0x32, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53,
+       0x54, 0x10, 0x02, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x65, 0x72, 0x72, 0x69, 0x74, 0x2e, 0x6f, 0x2d,
+       0x72, 0x61, 0x6e, 0x2d, 0x73, 0x63, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x72, 0x2f, 0x72, 0x69, 0x63,
+       0x2d, 0x70, 0x6c, 0x74, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x62, 0x2d, 0x72, 0x6e, 0x69, 0x62, 0x2f,
+       0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
index e42702d..9ca502d 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * 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.
@@ -46,6 +47,9 @@ message NodebInfo {
   string associated_e2t_instance_address = 12;
   bool setup_from_network = 13;
   uint64 status_update_time_stamp = 14;
+  string gnb_node_type = 15;
+  string cu_up_id = 16;
+  string du_id = 17;
 }
 
 enum E2ApplicationProtocol {
index c12a2c8..6f33273 100644 (file)
@@ -1,6 +1,7 @@
 //
 // 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.
@@ -42,7 +43,7 @@ type RNibReader interface {
        // GetNodeb retrieves responding nodeb entity from redis DB by nodeb inventory name
        GetNodeb(inventoryName string) (*entities.NodebInfo, error)
        // GetNodebByGlobalNbId retrieves responding nodeb entity from redis DB by nodeb global Id
-       GetNodebByGlobalNbId(nodeType entities.Node_Type, globalNbId *entities.GlobalNbId) (*entities.NodebInfo, error)
+       GetNodebByGlobalNbId(nodeType entities.Node_Type, globalNbId *entities.GlobalNbId, cuupId string,duid string) (*entities.NodebInfo, error)
        // GetCellList retrieves the list of cell entities belonging to responding nodeb entity from redis DB by nodeb inventory name
        GetCellList(inventoryName string) (*entities.Cells, error)
        // GetListGnbIds retrieves the list of gNodeb identity entities
@@ -119,8 +120,8 @@ func (w *rNibReaderInstance) GetNodeb(inventoryName string) (*entities.NodebInfo
        return nbInfo, nil
 }
 
-func (w *rNibReaderInstance) GetNodebByGlobalNbId(nodeType entities.Node_Type, globalNbId *entities.GlobalNbId) (*entities.NodebInfo, error) {
-       key, rNibErr := common.ValidateAndBuildNodeBIdKey(nodeType.String(), globalNbId.GetPlmnId(), globalNbId.GetNbId())
+func (w *rNibReaderInstance) GetNodebByGlobalNbId(nodeType entities.Node_Type, globalNbId *entities.GlobalNbId, cuupid string, duid string) (*entities.NodebInfo, error) {
+       key, rNibErr := common.ValidateAndBuildNodeBIdKey(nodeType.String(), globalNbId.GetPlmnId(), globalNbId.GetNbId(), cuupid, duid)
        if rNibErr != nil {
                return nil, rNibErr
        }