47 Commits

Author SHA1 Message Date
Oleksandr Mazur
c95e8dfe6b Docker compose template: enable topomap feat by default
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-19 14:51:16 +02:00
Oleksandr Mazur
e9d37d1b8c Initial formalization of API in form of YAML files
Add initial list of YAML files that formalize Kafka API:
 - requests list that CGW can handle
 - responses that CGW will generate
 - unsolicited events that CGW might generate

Also a small cleanup of requests and responses was made,
to align it with a common format (renamed some of the fields,
added missing etc).
Tests are tweaked to accomodate for changed field names.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-19 14:51:16 +02:00
Oleksandr Mazur
3155b8da83 CGW: remove 'infra_name' from infra_group API
Remove unused 'infra_name' from NB API requests that
manage infra_group (add/del).
Also change tests / utils and helper scripts to no longer
form kafka msgs with 'infra_name' present.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-19 14:51:16 +02:00
Oleksandr Mazur
49555495e8 Tests: core: add timeout values for common clients
Force redis, PSQL, kafka clients to have a strict
timeout value for any requests.

It's done to ensure our tests do not hang for an unknown
period of time in case if something goes wrong.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-11 16:24:15 +02:00
Sviatoslav Boichuk
09e92207e9 Added malformed packets basic tests 2024-12-10 15:23:36 +02:00
Olexandr, Mazur
cd35ca6e1e Merge pull request #105 from Telecominfraproject/dev-basic-msg-relay-test
Dev basic msg relay test
2024-12-10 13:57:48 +02:00
Oleksandr Mazur
3e63d06f8a Utils: Kafka: add missing cfg samples
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-10 11:47:24 +02:00
Sviatoslav Boichuk
7d1588c318 Fixed func params 2024-12-10 11:25:14 +02:00
Sviatoslav Boichuk
2405379c50 Added infra assign message relay test 2024-12-10 11:23:37 +02:00
Sviatoslav Boichuk
87eaa2dee9 Fixed GRPC Public Host name in Docker Compose template file 2024-12-09 17:05:58 +02:00
Sviatoslav Boichuk
932b211706 Merge pull request #103 from Telecominfraproject/feat/test_initial_infra_message_impl
Initial infra message impl
2024-12-06 13:03:03 +02:00
Oleksandr Mazur
10fd2d765b Testing: initial message queue (infra msg) infrastructure
Add initial infrastructure for sending / receiving messages
using websocket bindings for client sim.
Add initial handle-reboot-simulation test, that both
tests CGW's ability to sink down a request, as well as
test it's behavior whenever simulated device's been rebooted.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-05 14:52:24 +02:00
Sviatoslav Boichuk
1356565f58 Added Docker Compose tempalte to start multi-cgw instances 2024-12-05 14:22:21 +02:00
Oleksandr Mazur
7f9fbd6905 Utils: client simulator: add a missed mac list that is used in clientsim
The predefined mac list in the txt file is used
internally by the client simulator. It was missed
in previous commits.

Future clientsim rework should eliminate use of <predefined>
mac lists, but it's used now.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-03 15:13:58 +02:00
Oleksandr Mazur
8ce7104ef8 Utils: Kafka: fix helper scripts / cli parser group add
Remove unused shard id argument from cli parser in
<generic> (assign to <any>) infra group create request.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-03 15:12:07 +02:00
Oleksandr Mazur
c17b89f1d2 Utils: Client simulator: fix sim not starting using docker
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-11-26 15:15:35 +02:00
Sviatoslav Boichuk
bb14546499 Rework kafka consumer polling mechanism 2024-11-25 17:40:50 +02:00
Sviatoslav Boichuk
c18c657255 Added cleanup for each test case 2024-11-25 17:06:27 +02:00
Sviatoslav Boichuk
d5b6de0047 Added PSQL Client & Redis Client - modified tests 2024-11-25 13:55:58 +02:00
Sviatoslav Boichuk
35ee4f0a25 Added multiple infras add/del tests and capacity overflow 2024-11-21 14:16:34 +02:00
Sviatoslav Boichuk
03f8ad6056 Infra add/del tests initial 2024-11-20 16:22:12 +02:00
Sviatoslav Boichuk
7d9fbc918b Added infra group test cases 2024-11-18 12:47:18 +02:00
Sviatoslav Boichuk
8e59cd1569 Added metrics checkers to basic tests 2024-11-18 09:59:41 +02:00
Oleksandr Mazur
768c41dd90 Testing: introduce initial automated testing _core_ changes
Implement initial core for automated tests:
 * mostly resuses/extends existing simulator, kafka producer etc;
 * helper scripts added for manual testing
   (single infra/group add/del etc)
 * Tests compose either of simple steps premade into fixtures,
   or combine usage of both fixtures + custom code inside
   test's funcion

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-11-12 14:20:08 +02:00
Oleksandr Mazur
d70c4d718d Client simulator: use pool of macs with single crt/key
Make client simulator use single cert/key pair with mac
being taken from predefind macs list. This makes it easier
to use simulator, as it doesn't depend upon a big list
of certificates that are expected to match simulated MAC
and so on.

Fixup some python imports to not use relative import,
but rather istruct makefile to pass python path var
that includes relative path.
This is a change required for following commits that
bring automated testing using this simulator.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-11-12 13:26:16 +02:00
Sviatoslav Boichuk
dc471c60ab Reworked CGW Queue manager 2024-11-07 12:05:22 +02:00
Sviatoslav Boichuk
39585fddc5 Rename infrastructure_group_infra_message to infrastructure_group_infra_message_enqueue 2024-11-07 12:05:22 +02:00
Sviatoslav Boichuk
725bc5ae16 Change device to infra in NB API 2024-10-29 12:00:24 +02:00
Oleksandr Mazur
abb99f544c Add proper all-in-one make job
This change makes it possibly to fire make all / make run
without any additional prerequisites required.
It instructs Makefile to launch docker compose for thirdparty
services, as well as instructs CGW container to communicate
with newly created containers.
Also generates self-signed certs, in case if these are missing.

- Tweak docker-compose files for thirdparty services to resign
  in a cgw-dedicated network, and use hostnames where needed;
- Change CGW app default network to cgw-dedicated network;
- Tweak PGSQL scripts to create tables in CGW DB, as well
  as change ownership to them.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-10-02 14:37:13 +03:00
Olexandr, Mazur
8630f24794 Merge pull request #72 from Telecominfraproject/dev-gid-to-cgw
Added new API to add group to specific shard id
2024-08-22 16:05:26 +03:00
Oleksandr Mazur
1dcc745fcd Kafka simulator: add a helper script to populate infras / groups
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-08-20 15:34:39 +03:00
Sviatoslav Boichuk
800bfd963c Add new NB API to assigne group to specific CGW 2024-08-16 14:39:16 +03:00
Sviatoslav Boichuk
a02c3a87e8 Do not use TLS connection to NB services 2024-08-12 17:48:33 +03:00
Sviatoslav Boichuk
8931f2fbd2 Change server key file permission according to PSQL requirement 2024-07-31 08:50:27 +03:00
Sviatoslav Boichuk
7af4157aeb Support TLS for Redis & PSQL 2024-07-18 10:35:06 +03:00
Oleksandr Mazur
91ca72023d Utils: simulation runner: fix sim not starting
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-07-04 11:01:01 +03:00
Oleksandr Mazur
7bf8e1e4ff Utils: Kafka producer: change default subnet to localhost
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-07-04 11:01:01 +03:00
Carsten Schafer
cac306cda8 Add README for toolbox and correct logging env variable name 2024-06-26 15:55:17 -04:00
Carsten Schafer
dd6de62459 Add toolbox 2024-06-24 15:15:54 -04:00
Carsten Schafer
2098eb98d5 simulator tweaks 2024-06-24 15:15:17 -04:00
Carsten Schafer
3438c5916d Add helm chart 2024-06-24 15:14:50 -04:00
Oleksandr Mazur
cee366eb06 Topo-map: Implement realtime (leave/join) client events handling
- Timestamp for events is calculated upon socket read,
   which is the most accurate TS we can have;
 - topo map uses the TS in calculations to deduce the
   'latest' most-actual event while constructing map;
 - Origin of edges and nodes is preserved, which means
   topomap would not delete any nodes missing from state
   message, in case if this node is also a directly
   connected uCentral device instance;
 - Disconnected leaf-nodes are automatically removed,
   in case if their origin's not uCentral direct connection
   (info about node received from state/rt evts etc)

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-06-05 18:18:33 +03:00
OutBack Dingo
c5eba0b9c7 Revert "updated cluster helm charts"
This reverts commit bd4d93ebb4.
2024-05-14 23:02:56 +07:00
OutBack Dingo
bd4d93ebb4 updated cluster helm charts
Signed-off-by: OutBack Dingo <outbackdingo@gmail.com>
2024-05-14 21:10:17 +07:00
outbackdingo
2e6ed6b49d added docker-compose and helm chart for advanced cluster 2024-05-03 08:43:06 +07:00
outbackdingo
bd862ffebc added docker-compose and helm chart
Signed-off-by: outbackdingo <outbachdingo@gmail.com>
2024-04-30 11:46:42 +07:00
Paul White
6a0344aa87 cgw: initial commit
Signed-off-by: Paul White <paul@shasta.cloud>
2024-03-17 20:33:16 -07:00