Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: propagate inventory edition to NS DB and NFs #297

Merged
merged 10 commits into from
Jan 30, 2025

Conversation

patriciareinoso
Copy link
Contributor

@patriciareinoso patriciareinoso commented Jan 27, 2025

Description

This PR implements the edition of gNBs.

  • Create an index over name for gNBs to guarantee unique names in DB
  • Modify POST operation to remove the target from path: now name and tac are specified in the body of the request.
  • We cannot create 2 gNBs with the same name.
  • Add PUT operation:
    • If the gNB name does not exist it is created.
    • If the gNB name exists, it is modified.
  • Add validation over TAC range

Given that we can create a NS containing a gNB before or after the creation of a gNB object, the PUT and the POST gNB operations are propagated to the NS containing it.

Edition of gNB is propagated to Network slices containing a gNB with the given name. For this, we send a message in the configChannel. Like this, the operation update will be executed in webconsole/proto/server/clientEvtHandler.go and the corresponding pebble notice will be sent. After that, it will be sent to the clients in the grpc server.

We use transactions to ensure that both DB updates are successfully executed or reverted.

This PR also modifies #278 to ensure that the modification is propagated correctly instead of just updating the DB

Signed-off-by: Patricia Reinoso <[email protected]>
@patriciareinoso patriciareinoso marked this pull request as ready for review January 29, 2025 12:13
@patriciareinoso patriciareinoso marked this pull request as draft January 30, 2025 07:40
@patriciareinoso
Copy link
Contributor Author

I found 2 issues with this PR. I put it back to draft

@patriciareinoso patriciareinoso changed the title feat: implement edit gNB feat: propagate inventory edition to NS DB and NFs Jan 30, 2025
@patriciareinoso patriciareinoso marked this pull request as ready for review January 30, 2025 12:13
@patriciareinoso
Copy link
Contributor Author

I found 2 issues with this PR. I put it back to draft

all fixed, ready for review again.
the issues: pebble notices were not sent after NS update, update was not sent to NFs

@ghislainbourgeois ghislainbourgeois merged commit 6b02a76 into omec-project:main Jan 30, 2025
10 checks passed
@patriciareinoso
Copy link
Contributor Author

Testing with NMS integrations I see the propagation to NFs message is sent

025-01-30T16:59:05.384Z [nms] 2025-01-30T16:59:05.383Z    INFO    server/clientEvtHandler.go:494    Received new configuration for slice test1 {"component": "WebUI", "category": "GRPC", "NF": "udm-0"}
2025-01-30T16:59:05.384Z [nms] 2025-01-30T16:59:05.383Z    INFO    server/clientEvtHandler.go:511    resStream available    {"component": "WebUI", "category": "GRPC", "NF": "udm-0"}
2025-01-30T16:59:05.384Z [nms] 2025-01-30T16:59:05.383Z    INFO    server/clientEvtHandler.go:523    sent data to client from push config     {"component": "WebUI", "category": "GRPC", "NF": "udm-0"}
2025-01-30T16:59:05.384Z [nms] 2025-01-30T16:59:05.383Z    INFO    server/clientEvtHandler.go:564    Config changed true and NewClient false
2025-01-30T16:59:05.384Z [nms]     {"component": "WebUI", "category": "GRPC", "NF": "udm-0"}
2025-01-30T16:59:05.384Z [nms] 2025-01-30T16:59:05.383Z    INFO    server/clientEvtHandler.go:591    Send complete snapshoot to client. Number of Network Slices 1     {"component": "WebUI", "category": "GRPC", "NF": "udm-0"}
2025-01-30T16:59:05.384Z [nms] 2025-01-30T16:59:05.383Z    INFO    server/clientEvtHandler.go:712    sliceDetails: RestartCounter:1956964156  NetworkSlice:{Name:"test1"  Nssai:{Sst:"1"  Sd:"102030"}  DeviceGroup:{Name:"test1-default"  IpDomainDetails:{Name:"pool1"  DnnName:"internet"  UePool:"172.250.1.0/16"  DnsPrimary:"8.8.8.8"  Mtu:1456  UeDnnQos:{DnnMbrUplink:20000000  DnnMbrDownlink:200000000  TrafficClass:{Name:"platinum"  Qci:8  Arp:6  Pdb:300  Pelr:6}}}}  Site:{SiteName:"demo"  Gnb:{Name:"gnb1"  Tac:2}  Plmn:{mcc:"123"  mnc:"11"}  Upf:{UpfName:"upf-external.testpcf.svc.cluster.local"}}  AppFilters:{PccRuleBase:{FlowInfos:{FlowDesc:"permit out ip from any to assigned"  TosTrafficClass:"IPV4"  FlowDir:BIDIRECTIONAL}  RuleId:"DefaultRule"  Qos:{Var5qi:9  Arp:{PL:1  PC:MAY_PREEMPT  PV:PREEMPTABLE}}  Priority:255}}}  ConfigUpdated:1    {"component": "WebUI", "category": "GRPC", "NF": "udm-0"}
2025-01-30T16:59:05.384Z [nms] 2025-01-30T16:59:05.383Z    INFO    server/clientEvtHandler.go:724    send slice success    {"component": "WebUI", "category": "GRPC", "NF": "udm-0"}

and the pebble notice

server/configEvtHandler.go:696    custom Pebble notification sent    {"component": "WebUI", "category": "CONFIG"}
unit-nms2-0: 16:59:09 INFO juju.worker.uniter.operation ran "nms-pebble-custom-notice" hook (via hook dispatching script: dispatch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants