X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fhandlers%2Frmrmsghandlers%2Fe2_setup_request_notification_handler.go;fp=E2Manager%2Fhandlers%2Frmrmsghandlers%2Fe2_setup_request_notification_handler.go;h=9dde134477a44229bddf7015e75f901ee4a8c5d0;hb=5734b9170a6ea903130cf1bc2a2d81c27356e310;hp=90f8fc665c3d26faf5ade3cdb5d6908fc23f2f83;hpb=9d035d0669de41cd4cb9e3e1f04b814486f72e3a;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler.go b/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler.go index 90f8fc6..9dde134 100644 --- a/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler.go +++ b/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler.go @@ -2,6 +2,7 @@ // 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. @@ -385,6 +386,18 @@ func (h *E2SetupRequestNotificationHandler) buildNodebInfo(ranName string, e2tAd } 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 { @@ -394,6 +407,24 @@ func (h *E2SetupRequestNotificationHandler) buildNodebInfo(ranName string, e2tAd 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) {