X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fhandlers%2Frmrmsghandlers%2Fe2_setup_request_notification_handler_test.go;fp=E2Manager%2Fhandlers%2Frmrmsghandlers%2Fe2_setup_request_notification_handler_test.go;h=1f790a6728b017741bfd1ab7ee663408979639f9;hb=5734b9170a6ea903130cf1bc2a2d81c27356e310;hp=f03a1c4bd59cc69d9e0c3ff65936d2cdbce624c0;hpb=9d035d0669de41cd4cb9e3e1f04b814486f72e3a;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler_test.go b/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler_test.go index f03a1c4..1f790a6 100644 --- a/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler_test.go +++ b/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler_test.go @@ -2,6 +2,7 @@ // 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. @@ -459,12 +460,21 @@ func getExpectedGnbNodebForNewRan(payload []byte) *entities.NodebInfo { 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, @@ -476,6 +486,8 @@ func getExpectedGnbNodebForNewRan(payload []byte) *entities.NodebInfo { PlmnId: setupRequest.GetPlmnId(), NbId: setupRequest.GetNbId(), }, + CuUpId: setupRequest.GetCuupId(), + DuId: setupRequest.GetDuId(), } return nodeb