Commit Graph

167 Commits

Author SHA1 Message Date
ailchuk
bf79d87e7f create lib for common modules 2025-03-17 11:45:37 +02:00
Sviatoslav Boichuk
9dc4239795 Change sender_id type for ConsumerMetadata field to string 2025-03-11 17:43:01 +02:00
Sviatoslav Boichuk
a823f85cb0 Added new NB API to report NB once CGW failed to parse NB request 2025-03-11 17:42:36 +02:00
Sviatoslav Boichuk
944693e08b Send Reply as RealState event, no matter if result type is pending or done 2025-03-11 14:44:25 +02:00
Sviatoslav Boichuk
1302f3c165 Do not flush device ram cache on sync with redis 2025-03-07 18:51:41 +02:00
Sviatoslav Boichuk
1482977a74 Handle Generic Events 2025-03-07 17:28:19 +02:00
Sviatoslav Boichuk
f657856e4a Enhance Result Reply event parser 2025-03-07 17:28:19 +02:00
Sviatoslav Boichuk
1f0ffabc45 Save origin connect message inside connection processor. Use connect message on gid change event (CGW send [un]assigned infra join/leave) 2025-03-07 17:28:19 +02:00
Sviatoslav Boichuk
47a5052108 Envelop original infra response message into infra_request_result 2025-03-07 17:28:04 +02:00
Sviatoslav Boichuk
e093028199 Parse Generic events 2025-03-07 16:45:52 +02:00
Sviatoslav Boichuk
2b0ab34427 Search 'id' filed in result message root/result/result:state scope 2025-03-07 16:29:00 +02:00
Sviatoslav Boichuk
8e6151f554 Drop CONFIG infra request messages for those infrastructure devices that hasn't beed connected to CGW. 2025-03-06 19:19:42 +02:00
Olexandr, Mazur
8c0d34d449 Merge pull request #131 from Telecominfraproject/dev-ref-topomap
[TopoMap] Refactoring: use proper structs instead of multiple tuplse
2025-03-03 18:05:03 +02:00
Sviatoslav Boichuk
ec8d8d56be [TopoMap] Refactoring: use proper structs instead of multiple tuplse 2025-02-28 18:13:17 +02:00
ailchuk
ad56814d71 standardize variable names from mac to infra
Signed-off-by: ailchuk <an.ilchuk27@gmail.com>
2025-02-27 17:39:05 +02:00
ailchuk
7e70d0e89b refactor: unify response handling in infra handlers
Signed-off-by: ailchuk <an.ilchuk27@gmail.com>
2025-02-27 15:43:39 +02:00
Sviatoslav Boichuk
07ed817577 Added 16 digits timestamp to NB APIs 2025-02-26 15:12:41 +02:00
Olexandr, Mazur
04dc0773b6 Merge pull request #126 from Telecominfraproject/dev-consumer-metadata
Added consumer metadata to cnc/cnc_res messages
2025-02-25 18:27:40 +02:00
Olexandr, Mazur
a64aaaa432 Merge pull request #125 from Telecominfraproject/dev-enh-kafka-certs
Use system default certs if CGW_KAFKA_CERT is not specified
2025-02-25 18:27:28 +02:00
Sviatoslav Boichuk
f10e5622ee Added consumer metadata to cnc/cnc_res messages 2025-02-21 20:04:57 +02:00
Sviatoslav Boichuk
14950847b8 Use system default certs if CGW_KAFKA_CERT is not specified 2025-02-19 18:45:45 +02:00
Sviatoslav Boichuk
a4506fe5c1 Add cloud header to: InfraJoin, InfraLeave, ForeignInfra, CapabilitiesChange, AP Join/Leave/Migrate events 2025-02-19 15:41:58 +02:00
Sviatoslav Boichuk
5fb6dea276 Validate infra gid for infra request (config, reboot etc...) 2025-02-17 09:33:07 +02:00
Sviatoslav Boichuk
64868ecb73 Fix clippy issues 2025-02-17 09:17:55 +02:00
Sviatoslav Boichuk
910e513e7d Do not use capital letter in Kafka topocs name 2025-02-17 09:17:55 +02:00
Sviatoslav Boichuk
50c26a3139 Do not send unassigned infras state/realtime events to NB! 2025-02-17 09:17:55 +02:00
Oleksandr Mazur
a0d651ae1b CGW: Connection server: Refactoring: move NB message parsing to separate functions
Changes also require some fields to be <somewhat> globally accessible
(at least from the Server's perspective):
+    pub infras_capacity: i32,
Capacity needs to be set upon start / shared across interested modules
or components of the Server itself;

+    pub local_shard_partition_key: RwLock<Option<String>>,
Partition key is accessible from several places within
the server, hence has to be wrapped into a separate
mut wrap (rw lock)

+    pub last_update_timestamp: RwLock<i64>,
Redis last update timestamp is crucial in deciding
whether cache has to be synced back.
Accessed from several places, has to be wrapped into a lock
to provide access from functions within server.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2025-02-10 18:13:25 +02:00
Sviatoslav Boichuk
823baa1b13 Send infra join when device become assigned, and unassigned infra join when device become unassigned 2025-02-07 10:43:17 +02:00
Sviatoslav Boichuk
91ea00b4ba Update Kafka topics creation 2025-02-07 10:38:45 +02:00
Sviatoslav Boichuk
4e82e27079 Impl TryFrom instead From to avoid panic if PSQL table are corrupted or malformed! 2025-02-05 15:35:56 +02:00
Sviatoslav Boichuk
53498f0cf8 Handle cloud headers 2025-02-04 13:37:01 +02:00
Olexandr, Mazur
0edd6bdadd Merge pull request #118 from Telecominfraproject/dev-nb-apis-update
Change NB API infra_group_id type from string to integer
2025-02-01 21:00:04 +02:00
Olexandr, Mazur
5da83345eb Merge pull request #116 from Telecominfraproject/dev-multi-kafka-topics
Send foreign connection to device with shard owner host and port
2025-01-27 17:28:23 +02:00
Sviatoslav Boichuk
80ec425329 Change NB API infra_group_id type from string to integer 2025-01-27 17:11:33 +02:00
Sviatoslav Boichuk
ec2dd93187 Add Kafka TLS support 2025-01-24 16:07:42 +02:00
Sviatoslav Boichuk
b29c2488bc Send foreign connection to device with shard owner host and port 2025-01-21 15:26:04 +02:00
Sviatoslav Boichuk
429d19930a Create/update kafka topics on CGW init 2025-01-16 17:05:38 +02:00
Sviatoslav Boichuk
b1f840d3b7 Send unassigned_infra_join once infra becomes unassigned due to group delete or infra unassigned from group 2025-01-15 13:36:13 +02:00
Sviatoslav Boichuk
c8d55def75 Remove connect message UUID from device capabilities 2025-01-14 14:18:05 +02:00
Sviatoslav Boichuk
58dcec216e Fixed foreign infra check condtition 2025-01-14 14:18:05 +02:00
Sviatoslav Boichuk
2e026150c0 Envelop state|realtime events with wrapper 2025-01-14 14:17:56 +02:00
Sviatoslav Boichuk
3f351dfb6d Parse & send state|realtime events per Kafka topic 2025-01-10 17:32:11 +02:00
Sviatoslav Boichuk
ffa4b81d50 Removed unwrap from connection server 2025-01-10 10:09:57 +02:00
Sviatoslav Boichuk
74ace1f77c Fix clippy issues in topology map mod 2025-01-10 10:09:57 +02:00
Sviatoslav Boichuk
7fc6d77fbb Send different NB APIs to different topics 2025-01-07 15:26:34 +02:00
Sviatoslav Boichuk
299a74ad9a Fixed some clippy issues 2025-01-07 13:11:01 +02:00
Sviatoslav Boichuk
3cc72e9b2c Renamed CGWCNCCOnsumer to CGWKafkaConsumer 2025-01-07 13:11:01 +02:00
Sviatoslav Boichuk
eb012864c7 Update CGW infra to support multiple Kafka producers (Single topic per producer) 2025-01-07 13:11:01 +02:00
Sviatoslav Boichuk
278d48de9d Updated [un]assinged infra join to NB
* Added IP/Port to unassigned infra join message
    * Renamed unassigned infra connection message to infra join
    * Do not send infra join for unassigned infra connection
    * Added CONNECT message payload to [un]assigned infra connection
    * Added unassigned infra leave message
    * Updated tests
    * Updated YAML APIs
2025-01-06 12:55:16 +02:00
Sviatoslav Boichuk
c7a5316629 Fixed spell issues in CGW codebase 2025-01-02 16:40:58 +02:00