add implementation for new ips module

This commit is contained in:
ionutboangiu
2025-05-14 17:57:37 +03:00
committed by Dan Christian Bogos
parent d6676866d5
commit 43cdd396ba
74 changed files with 3424 additions and 92 deletions

View File

@@ -13,7 +13,7 @@
},
"filters": {
"apiers_conns": ["*localhost"],
"apiers_conns": ["*localhost"]
},
"rals": {
@@ -62,12 +62,12 @@
"radius_agent": {
"enabled": true,
"sessions_conns": ["*bijson_localhost"],
"client_da_addresses": {
"127.0.0.1": {
"transport": "udp",
"host": "",
"port": 3799,
"flags": ["*log"]
"client_da_addresses": {
"127.0.0.1": {
"transport": "udp",
"host": "",
"port": 3799,
"flags": ["*log"]
}
},
"listeners":[

View File

@@ -267,6 +267,30 @@ CREATE TABLE tp_resources (
UNIQUE KEY `unique_tp_resource` (`tpid`,`tenant`, `id`,`filter_ids` )
);
--
-- Table structure for table `tp_ips`
--
DROP TABLE IF EXISTS tp_ips;
CREATE TABLE tp_ips (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`tpid` varchar(64) NOT NULL,
`tenant` varchar(64) NOT NULL,
`id` varchar(64) NOT NULL,
`filter_ids` varchar(64) NOT NULL,
`activation_interval` varchar(64) NOT NULL,
`ttl` varchar(32) NOT NULL,
`type` varchar(64) NOT NULL,
`address_pool` varchar(64) NOT NULL,
`allocation` varchar(64) NOT NULL,
`stored` BOOLEAN NOT NULL,
`weight` decimal(8,2) NOT NULL,
`created_at` TIMESTAMP,
PRIMARY KEY (`pk`),
KEY `tpid` (`tpid`),
UNIQUE KEY `unique_tp_ip` (`tpid`,`tenant`, `id`,`filter_ids` )
);
--
-- Table structure for table `tp_stats`
--

View File

@@ -263,6 +263,30 @@ CREATE INDEX tp_resources_idx ON tp_resources (tpid);
CREATE INDEX tp_resources_unique ON tp_resources ("tpid", "tenant", "id", "filter_ids");
--
-- Table structure for table `tp_ips`
--
DROP TABLE IF EXISTS tp_ips;
CREATE TABLE tp_ips (
"pk" SERIAL PRIMARY KEY,
"tpid" varchar(64) NOT NULL,
"tenant"varchar(64) NOT NULL,
"id" varchar(64) NOT NULL,
"filter_ids" varchar(64) NOT NULL,
"activation_interval" varchar(64) NOT NULL,
"ttl" varchar(32) NOT NULL,
"type" varchar(64) NOT NULL,
"address_pool" varchar(64) NOT NULL,
"allocation" varchar(64) NOT NULL,
"stored" BOOLEAN NOT NULL,
"weight" NUMERIC(8,2) NOT NULL,
"created_at" TIMESTAMP WITH TIME ZONE
);
CREATE INDEX tp_ips_idx ON tp_ips (tpid);
CREATE INDEX tp_ips_unique ON tp_ips ("tpid", "tenant", "id", "filter_ids");
--
-- Table structure for table `tp_stats`
--

View File

@@ -267,6 +267,30 @@ CREATE TABLE tp_resources (
UNIQUE KEY `unique_tp_resource` (`tpid`,`tenant`, `id`,`filter_ids` )
);
--
-- Table structure for table `tp_ips`
--
DROP TABLE IF EXISTS tp_ips;
CREATE TABLE tp_ips (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`tpid` varchar(64) NOT NULL,
`tenant` varchar(64) NOT NULL,
`id` varchar(64) NOT NULL,
`filter_ids` varchar(64) NOT NULL,
`activation_interval` varchar(64) NOT NULL,
`ttl` varchar(32) NOT NULL,
`type` varchar(64) NOT NULL,
`address_pool` varchar(64) NOT NULL,
`allocation` varchar(64) NOT NULL,
`stored` BOOLEAN NOT NULL,
`weight` decimal(8,2) NOT NULL,
`created_at` TIMESTAMP,
PRIMARY KEY (`pk`),
KEY `tpid` (`tpid`),
UNIQUE KEY `unique_tp_ip` (`tpid`,`tenant`, `id`,`filter_ids` )
);
--
-- Table structure for table `tp_stats`
--

View File

@@ -267,6 +267,30 @@ CREATE TABLE tp_resources (
UNIQUE KEY `unique_tp_resource` (`tpid`,`tenant`, `id`,`filter_ids` )
);
--
-- Table structure for table `tp_ips`
--
DROP TABLE IF EXISTS tp_ips;
CREATE TABLE tp_ips (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`tpid` varchar(64) NOT NULL,
`tenant` varchar(64) NOT NULL,
`id` varchar(64) NOT NULL,
`filter_ids` varchar(64) NOT NULL,
`activation_interval` varchar(64) NOT NULL,
`ttl` varchar(32) NOT NULL,
`type` varchar(64) NOT NULL,
`address_pool` varchar(64) NOT NULL,
`allocation` varchar(64) NOT NULL,
`stored` BOOLEAN NOT NULL,
`weight` decimal(8,2) NOT NULL,
`created_at` TIMESTAMP,
PRIMARY KEY (`pk`),
KEY `tpid` (`tpid`),
UNIQUE KEY `unique_tp_ip` (`tpid`,`tenant`, `id`,`filter_ids` )
);
--
-- Table structure for table `tp_stats`
--

View File

@@ -263,6 +263,30 @@ CREATE INDEX tp_resources_idx ON tp_resources (tpid);
CREATE INDEX tp_resources_unique ON tp_resources ("tpid", "tenant", "id", "filter_ids");
--
-- Table structure for table `tp_ips`
--
DROP TABLE IF EXISTS tp_ips;
CREATE TABLE tp_ips (
"pk" SERIAL PRIMARY KEY,
"tpid" varchar(64) NOT NULL,
"tenant"varchar(64) NOT NULL,
"id" varchar(64) NOT NULL,
"filter_ids" varchar(64) NOT NULL,
"activation_interval" varchar(64) NOT NULL,
"ttl" varchar(32) NOT NULL,
"type" varchar(64) NOT NULL,
"address_pool" varchar(64) NOT NULL,
"allocation" varchar(64) NOT NULL,
"stored" BOOLEAN NOT NULL,
"weight" NUMERIC(8,2) NOT NULL,
"created_at" TIMESTAMP WITH TIME ZONE
);
CREATE INDEX tp_ips_idx ON tp_ips (tpid);
CREATE INDEX tp_ips_unique ON tp_ips ("tpid", "tenant", "id", "filter_ids");
--
-- Table structure for table `tp_stats`
--
@@ -289,6 +313,7 @@ CREATE TABLE tp_stats (
CREATE INDEX tp_stats_idx ON tp_stats (tpid);
CREATE INDEX tp_stats_unique ON tp_stats ("tpid","tenant", "id", "filter_ids","metric_ids");
--
-- Table structure for table `tp_rankings`
--