title Update eNB & Update gNB Cells REST APIs participant Client participant NodebController as NC participant RequestHandlerProvider as RHP participant UpdateNodebRequestHandler as UNH participant UpdateNodebManager as UNM participant RnibDataService as RDS participant RnibReader as RNR participant RnibWriter as RNW opt Client->NC: PUT /nodeb/enb/ \n{"enb" : { "enbType" : "", "servedCells" : [{}], "guGroupIds" : [""] }} end opt Client->NC: PUT /nodeb/gnb/ \n{"servedNrCells":[{"servedNrCellInformation":{},"nrNeighbourInfos":[]}]} end NC -> RHP: requestHandlerProvider.GetHandler(requestName) RHP -> NC: *UpdateNodebRequestHandler handler NC -> UNH: handler.Handle(request) UNH -> UNM: Validate(request) alt Missing mandatory fields UNM -> UNH: err UNH -> NC: resp, err NC -> Client: 400 Bad Request {402, "Validation error"} else Valid request body UNM -> UNH: err = nil UNH ->+ RDS: GetNodeb() RDS ->+ RNR: GetNodeb() alt RNIB error RNR -> RDS: InternalError RDS -> UNH: InternalError UNH -> NC: resp, err NC -> Client: 500 Internal Server Error {500, "RNIB error"} else RAN does not exist RNR -> RDS: ResourceNotFoundError RDS -> UNH: ResourceNotFoundError UNH -> NC: resp, err NC -> Client: 404 Not Found {404, "Resource not found"} else RAN exits (success) RNR ->- RDS: *nodebInfo RDS ->- UNH: *nodebInfo UNH ->+ UNM: RemoveNodebCells(*nodebInfo) opt updateEnbManager UNM ->+ RDS: RemoveServedCells(inventoryName, servedCells) RDS ->+ RNW: RemoveServedCells(inventoryName, servedCells) end opt updateGnbManager UNM ->+ RDS: RemoveServedNrCells(inventoryName, servedNrCells) RDS ->+ RNW: RemoveServedNrCells(inventoryName, servedNrCells) end alt RNIB error RNW -> RDS: InternalError RDS -> UNM: InternalError UNM -> UNH: InternalError UNH -> NC: resp, err NC -> Client: 500 Internal Server Error {500, "RNIB error"} else Deletion succeeds RNW ->- RDS: err = nil RDS ->- UNM: err = nil UNM ->- UNH: err = nil UNH ->+ UNM: SetNodeb(*nodebInfo, request) note over UNM: Set eNB / gNB with request's data UNM ->- UNH: err = nil UNH ->+ UNM: UpdateNodeb(*nodebInfo) opt updateEnbManager UNM ->+ RDS: UpdateEnb(*nodebInfo, servedCells) RDS ->+ RNW: UpdateEnb(*nodebInfo, servedCells) end opt updateEnbManager UNM ->+ RDS: UpdateGnbCells(*nodebInfo, servedNrCells) RDS ->+ RNW: UpdateGnbCells(*nodebInfo, servedNrCells) end note over RNW: - Set cells in both Cell ID key & PCI key - Set nodeb in both RAN ID key & RAN NAME key - Execute sdl.SetAndPublish(data,"RAN_MANIPULATION", "_UPDATED") end note alt RNIB error RNW -> RDS: InternalError RDS -> UNM: InternalError UNM -> UNH: InternalError UNH -> NC: resp, err NC -> Client: 500 Internal Server Error {500, "RNIB error"} else Nodeb updated succesfully RNW ->- RDS: err = nil RDS ->- UNM: err = nil UNM ->- UNH: err = nil UNH -> NC: resp, nil NC -> Client: 200 OK, NodebInfo {}