Skip to content

Commit 489208f

Browse files
authored
Merge branch 'medianetlab:main' into main
2 parents bcbce43 + 565b02d commit 489208f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3438
-2519
lines changed

CHANGELOG.md

+70
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,68 @@
11
# Changelog
22

3+
## v1.5.0
4+
5+
***Summary:***
6+
7+
> - *changes and optimizations for making NEF_emulator capable of running bigger scenarios*
8+
> - *UE movement approach change:*
9+
> - *old: iterate over all path-points and simulate speed by using sleep() (LOW=1sec HIGH=0.1sec)*
10+
> - *new: constantly use sleep(1sec) and simulate speed by skipping (or not) path-points*
11+
> - *more on the pros/cons of this approach can be found at the relative source code section, the old one is commented out*
12+
> - *update of `leaflet.js` to version `1.8.0` (we've indetified a bug when closing mark tooltips, it's supposed to be fixed by the maintainers of the project at the upcoming release)*
13+
14+
15+
### UI changes
16+
17+
- `dashboard-cells.js` minor fix to display error details correctly in the toast message
18+
- 🪛 fix `/map` js console errors caused by the UEs layer-checkbox (access to `null` marker)
19+
- 🪛 fix `/map` UEs buttons: handle case of UEs with no paths assigned
20+
- `/dashboard` page change: instead of 2 consecutive API requests on UE `Save` 👇:
21+
- 1 API request to assign path everytime the user selects something different
22+
- 1 API request on `Save` button
23+
- `/map` page: add type-of-service column to datatable (cells now display `Monitoring Event API` or `AsSession With QoS API`)
24+
- `/login`: add "hit enter --> submit form" functionality
25+
- `/register`: add "hit enter --> submit form" functionality
26+
- add `NEF` logo
27+
- move part of `login.js` code to `app.js` (more clean approach + added `app.default_redirect` variable)
28+
- `maps.js`: increase timeouts to 60 sec (edge case with >200 UEs, start/stop takes time)
29+
- `maps.js`: add `api_get_moving_UEs()` to only retrieve moving UEs ➡ move part of `ui_map_paint_UEs()` to `ui_map_paint_moving_UEs()`
30+
- `app.js`: move `api_test_token()` outside document.ready() for quicker user auth checks
31+
- `401` page redirect: when the token can't be validated the user is redirected to a 401 Unauthorized page and after a few seconds is redirected to `/login`. Previously, the user was redirected to login without being notified.
32+
- `map.js`: optimize `helper_check_path_is_already_painted( path_id )` by replacing the simple array of painted paths with a key-value object
33+
34+
35+
### Backend
36+
37+
- ⛔ for optimization purposes, the UEs movement is handled in memory (no more intensive read/writes to Postgres) 👇
38+
-`api/v1/ue_movement/state-ues` now returns moving UEs information only. It helps with the edge cases of having many UEs and only a few of them actually moving around
39+
- create new module/file for threads `utils.py``ue_movement.py`
40+
-`/utils/state-loop/{{supi}}``/ue_movement/state-loop/{{supi}}`
41+
-`/utils/start-loop``/ue_movement/start-loop`
42+
-`/utils/stop-loop``/ue_movement/stop-loop`
43+
- `utils.py`: add a 2nd approach for making the UEs move within their path and control their speed (see #2eb19f8)
44+
- `SQLAlchemy`: add `pool_size=150, max_overflow=20` to `create_engine( ... )`
45+
- fix `NoneType` exception on MonitoringEvent one time request when cell is None
46+
- Add middleware to return custom response header `X-Process-Time` that counts request-response proccesing time
47+
- Split callbacks in two files 👉 From `send_callback.py``monitoring_callbacks.py` + `qos_callback.py`
48+
- fix callback notification for QoS after the transition from db to memory
49+
50+
51+
### Database
52+
53+
- postgreSQL add `command: -c shared_buffers=256MB -c max_connections=200` to `docker-compose`
54+
- MonitoringEvent: migration from postgreSQL to MongoDB 👇
55+
- fix `check_numberOfReports` function accordingly
56+
57+
58+
### Libraries
59+
60+
- upgrade `leaflet.js` (`1.7.1` to `1.8.0`)
61+
62+
63+
64+
<br><br>
65+
366
## v1.4.1
467

568
### Migration to Python 3.9
@@ -90,6 +153,8 @@
90153

91154

92155

156+
157+
93158
## v1.3.2
94159

95160
- Fix UE-association-path selection with `path_id` 0 (no path selected) - both dashboard and backend
@@ -99,6 +164,11 @@
99164

100165
<br><br>
101166

167+
168+
169+
170+
171+
102172
## v1.3.1
103173

104174
- Fix endpoints on MonitoringEvent API <kbd>{apiroot}/nef/api/v1/3gpp-monitoring-event/**v1**/{scsAsId}/subscriptions</kbd>

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# NEF_emulator
22

3+
4+
<p align="center">
5+
<img src="./backend/app/app/static/NEF_logo_400x400_light.svg" />
6+
</p>
7+
8+
39
## ⚙ Setup locally
410

511
**Host prerequisites**: `docker`, `docker-compose 1.29.2`, `build-essential`\*, `jq`\*\*

backend/app/app/api/api_v1/api.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
from fastapi import APIRouter
22

3-
from app.api.api_v1.endpoints import paths, login, users, utils, gNB, Cell, UE, monitoringevent, qosMonitoring, qosInformation
3+
from app.api.api_v1 import endpoints
44

55
api_router = APIRouter()
6-
api_router.include_router(login.router, tags=["login"])
7-
api_router.include_router(users.router, prefix="/users", tags=["users"])
8-
api_router.include_router(utils.router, prefix="/utils", tags=["UI"])
9-
api_router.include_router(paths.router, prefix="/paths", tags=["Paths"])
10-
api_router.include_router(gNB.router, prefix="/gNBs", tags=["gNBs"])
11-
api_router.include_router(Cell.router, prefix="/Cells", tags=["Cells"])
12-
api_router.include_router(UE.router, prefix="/UEs", tags=["UEs"])
13-
api_router.include_router(qosInformation.router, prefix="/qosInfo", tags=["QoS Information"])
6+
api_router.include_router(endpoints.login.router, tags=["login"])
7+
api_router.include_router(endpoints.users.router, prefix="/users", tags=["users"])
8+
api_router.include_router(endpoints.utils.router, prefix="/utils", tags=["UI"])
9+
api_router.include_router(endpoints.ue_movement.router, prefix="/ue_movement", tags=["Movement"])
10+
api_router.include_router(endpoints.paths.router, prefix="/paths", tags=["Paths"])
11+
api_router.include_router(endpoints.gNB.router, prefix="/gNBs", tags=["gNBs"])
12+
api_router.include_router(endpoints.Cell.router, prefix="/Cells", tags=["Cells"])
13+
api_router.include_router(endpoints.UE.router, prefix="/UEs", tags=["UEs"])
14+
api_router.include_router(endpoints.qosInformation.router, prefix="/qosInfo", tags=["QoS Information"])
1415
# api_router.include_router(monitoringevent.router, prefix="/3gpp-monitoring-event/v1", tags=["Monitoring Event API"])
1516
# api_router.include_router(qosMonitoring.router, prefix="/3gpp-as-session-with-qos/v1", tags=["Session With QoS API"])
1617
#api_router.include_router(monitoringevent.monitoring_callback_router, prefix="/3gpp-monitoring-event/v1", tags=["Monitoring Event API"])
1718

1819

1920
# ---Create a subapp---
2021
nef_router = APIRouter()
21-
nef_router.include_router(monitoringevent.router, prefix="/3gpp-monitoring-event/v1", tags=["Monitoring Event API"])
22-
nef_router.include_router(qosMonitoring.router, prefix="/3gpp-as-session-with-qos/v1", tags=["Session With QoS API"])
22+
nef_router.include_router(endpoints.monitoringevent.router, prefix="/3gpp-monitoring-event/v1", tags=["Monitoring Event API"])
23+
nef_router.include_router(endpoints.qosMonitoring.router, prefix="/3gpp-as-session-with-qos/v1", tags=["Session With QoS API"])
2324

2425

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from .login import router
2+
from .users import router
3+
from .utils import router
4+
from .ue_movement import router
5+
from .paths import router
6+
from .gNB import router
7+
from .Cell import router
8+
from .UE import router
9+
from .qosInformation import router
10+
from .qosMonitoring import router
11+
from .monitoringevent import router

0 commit comments

Comments
 (0)