Commit Graph

14112 Commits

Author SHA1 Message Date
DanB
86347c2741 Updating IPs dynamic options v1.0.0-dev 2025-06-03 17:52:01 +02:00
ionutboangiu
0d11ac9d8a Replace Units with Address in IPUsage
Units are not needed anymore, as only one address can be allocated
at once.
2025-06-03 16:27:01 +02:00
ionutboangiu
d22727782e change IP API methods from plural to singular 2025-06-03 16:07:28 +02:00
ionutboangiu
33735613e7 Rename Pool type to IPPool for clarity 2025-06-03 14:23:29 +02:00
ionutboangiu
df10601b18 include ips cases in index admins apis 2025-06-03 14:23:29 +02:00
ionutboangiu
eb9f826ffd Rename IP to IPAllocations 2025-06-03 14:23:29 +02:00
armirveliaj
fb92e613d8 Add coverage tests on engine 2025-06-03 13:12:13 +02:00
ionutboangiu
3d76af47bc Revise IPProfile definition + tests 2025-06-03 13:10:15 +02:00
ionutboangiu
27456ce5cf add sample IPs API calls 2025-06-01 14:04:28 +02:00
ionutboangiu
805ae5d916 integrate ips with sessions (incomplete) 2025-06-01 14:04:28 +02:00
ionutboangiu
a66c472a36 sessions: rename jsoncfg obj fields to camel case 2025-06-01 14:04:28 +02:00
ionutboangiu
8645dc5c5e sessions: simplify dynopts obj cloning 2025-06-01 14:04:28 +02:00
ionutboangiu
0fb46c9160 sessions: handle errors in cfg load func 2025-06-01 14:04:28 +02:00
ionutboangiu
132a23144a add ips flags to sessions cfg 2025-06-01 14:04:28 +02:00
ionutboangiu
c031366a98 remove constants of non-existent APIs
for resources and ips only
2025-06-01 14:04:28 +02:00
ionutboangiu
4ef2182b67 register IPs service using the correct function 2025-06-01 14:04:28 +02:00
ionutboangiu
9ee93ed879 ips: prepend options instead of append
to ensure default options are at the end. Otherwise, they would
always match first.
2025-06-01 14:04:28 +02:00
ionutboangiu
9812e6f605 return if Service Start/Shutdown errors
Previously, a couple cases could just close the shutdown channel but
in logs it would appear as if they have been started.
2025-05-30 14:54:09 +02:00
ionutboangiu
4afe92695c register IPService object under the correct name 2025-05-30 14:54:09 +02:00
ionutboangiu
130d516a16 Revise service toggle test
- ensure analyzers folder is cleaned up (could cause deadlocks)
- ensure timeout is not reset for every ping (never times out because pinging
  duration is much shorter than timeout)
2025-05-30 14:54:09 +02:00
ionutboangiu
38fa360df9 cgr-engine: add flag to print cfg in JSON format 2025-05-30 14:54:09 +02:00
ionutboangiu
eed6b8a51a add implementation for new ips module 2025-05-29 15:46:42 +02:00
ionutboangiu
1b4324157d return nil when cloning nil dynopts objects 2025-05-29 15:46:42 +02:00
ionutboangiu
180eb6cbfd extract resources apis to different file 2025-05-29 15:46:42 +02:00
ionutboangiu
2f7da3702a remove redundant dm init in test flush helper 2025-05-27 17:31:01 +02:00
ionutboangiu
d619246c84 close db connections in test flush helpers
Previously, database connections would stay alive until "go test"
would finish, sometimes leading to max conn errors.
2025-05-27 17:31:01 +02:00
ionutboangiu
d02bfac20b Fix rsyslog config to capture logs across distros
Add three conditions to properly capture CGRateS logs:

- programname startswith 'cgr-engine': catches logs from external
  libraries that don't use our syslogger (e.g. diameter conn errors)
- programname startswith 'CGRateS': handles deb-based distros
  where our syslog tag becomes the program name
- msg contains 'CGRateS': handles rpm-based distros where systemd
  journal overrides programname but our tag remains in message content
2025-05-27 17:30:30 +02:00
ionutboangiu
6557c13b61 remove unused chargers conn in test
to prevent errors due to chargers not being enabled
2025-05-26 08:22:23 +02:00
ionutboangiu
8d8af20ee1 ensure MaxAbstracts reply is the right type
to prevent panic while using *internal conn
2025-05-26 08:22:23 +02:00
ionutboangiu
4af1cc106c cdrs: add internal channel to connmanager
now checking for the right constant (CDRServer)
2025-05-26 08:22:23 +02:00
ionutboangiu
c3bf93f1b6 Fix context lifecycle in scheduled actions
Remove ctx field from scheduledActs struct and create a fresh context
when actions execute via cron. This prevents "context canceled" errors
that occurred when stored contexts from API calls were used for delayed
execution. The context is now properly received from the caller in case
of "*asap" actions.
2025-05-26 08:19:43 +02:00
arberkatellari
7fe60c2b8b fix failing tests 2025-05-18 16:21:37 +02:00
ionutboangiu
a4e45cd7db ci: fix var name to disable repo cloning 2025-05-14 12:11:06 +02:00
arberkatellari
5847ceab00 Add and revise tests for offline internal DB 2025-05-13 17:07:17 +02:00
arberkatellari
5b66678313 Add offline internal DB functionality for dataDB,storDB & configDB 2025-05-13 17:07:17 +02:00
ionutboangiu
ac0b43a218 update session basics test 2025-05-12 17:31:19 +02:00
ionutboangiu
07da68b0bb prevent redundant cost calculations in V1CostForEvent
Previously the function continued looping through all verbosity
iterations (default 1000) even after finding a valid cost,
causing unnecessary processing.
2025-05-12 17:29:41 +02:00
ionutboangiu
0937d374e5 remove outdated documentation files 2025-05-12 14:15:13 +02:00
ionutboangiu
c30c09084d cast cached resource into the correct type
and ensure it is wrapped to allow locking
2025-05-09 09:45:40 +02:00
ionutboangiu
2e883b2489 update installation docs + cleanup 2025-05-09 09:44:53 +02:00
ionutboangiu
6a2654e6d8 port doc changes from v0.11 2025-05-09 09:44:53 +02:00
ionutboangiu
3acb9deac5 Simplify GetCDRs implementation
Remove redundant checks and use a single CDR instance for both filtering and
results.
2025-05-09 09:43:04 +02:00
ionutboangiu
2a85e371a2 Fix GORM pagination with zero limit/offset
Previously, q.Limit(0) was always set, causing GORM to
return no records since limit=0 was interpreted as "get 0
records" rather than "no limit". Now we only set limit and
offset when they're > 0, which makes pagination behave
correctly with default values.
2025-05-09 09:43:04 +02:00
ionutboangiu
961f132efb remove redundant dist entry in reprepro cfg 2025-05-08 16:31:10 +02:00
ionutboangiu
109ed8fe34 prometheus: replace string literals with constants 2025-05-03 21:44:51 +02:00
ionutboangiu
c2fb0df6c6 normalize metric types for mixed connection types 2025-05-03 21:44:51 +02:00
ionutboangiu
b86e5d2b14 prom: append correct subsystem to cores internal conn 2025-05-03 21:44:51 +02:00
ionutboangiu
d8eccf83da revise wrong prom metric comment 2025-05-03 21:44:51 +02:00
ionutboangiu
a71c803bc1 update prometheus deps 2025-05-03 21:44:51 +02:00
ionutboangiu
5e46eeb28a move action type definitions to utils 2025-05-03 21:42:36 +02:00