kamctl: regenerated db schema file with secfilter updates
authorDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 24 Mar 2020 09:32:10 +0000 (10:32 +0100)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 24 Mar 2020 09:33:30 +0000 (10:33 +0100)
14 files changed:
utils/kamctl/db_berkeley/kamailio/secfilter [new file with mode: 0644]
utils/kamctl/db_berkeley/kamailio/version
utils/kamctl/db_redis/kamailio/secfilter [new file with mode: 0644]
utils/kamctl/db_sqlite/secfilter-create.sql
utils/kamctl/dbtext/kamailio/secfilter [new file with mode: 0644]
utils/kamctl/dbtext/kamailio/version
utils/kamctl/mongodb/kamailio/secfilter.json [new file with mode: 0644]
utils/kamctl/mongodb/kamailio/version-create.mongo
utils/kamctl/mysql/secfilter-create.sql
utils/kamctl/oracle/secfilter-create.sql
utils/kamctl/postgres/secfilter-create.sql
utils/kamctl/xhttp_pi/pi_framework.xml
utils/kamctl/xhttp_pi/secfilter-mod [new file with mode: 0644]
utils/kamctl/xhttp_pi/secfilter-table [new file with mode: 0644]

diff --git a/utils/kamctl/db_berkeley/kamailio/secfilter b/utils/kamctl/db_berkeley/kamailio/secfilter
new file mode 100644 (file)
index 0000000..38fbb9a
--- /dev/null
@@ -0,0 +1,10 @@
+METADATA_COLUMNS
+id(int) action(int) type(int) data(str)
+METADATA_KEY
+
+METADATA_READONLY
+0
+METADATA_LOGFLAGS
+0
+METADATA_DEFAULTS
+NIL|''|''|''
index 5a5d5bd..f8051cb 100644 (file)
@@ -108,6 +108,8 @@ rtpproxy|
 rtpproxy|1
 sca_subscriptions|
 sca_subscriptions|2
+secfilter|
+secfilter|1
 silo|
 silo|8
 sip_trace|
diff --git a/utils/kamctl/db_redis/kamailio/secfilter b/utils/kamctl/db_redis/kamailio/secfilter
new file mode 100644 (file)
index 0000000..52f37e9
--- /dev/null
@@ -0,0 +1,2 @@
+id/int,action/int,type/int,data/string,
+1
index 6f8af6d..476ea46 100644 (file)
@@ -1,11 +1,11 @@
 CREATE TABLE secfilter (
-  id INTEGER PRIMARY KEY NOT NULL,
-  action SMALLINT DEFAULT 0 NOT NULL,
-  type SMALLINT DEFAULT 0 NOT NULL,
-  data VARCHAR(64) DEFAULT '' NOT NULL
+    id INTEGER PRIMARY KEY NOT NULL,
+    action SMALLINT DEFAULT '' NOT NULL,
+    type SMALLINT DEFAULT '' NOT NULL,
+    data VARCHAR(64) DEFAULT '' NOT NULL
 );
 
-CREATE INDEX secfilter_idx ON secfilter (action, type, data);
+CREATE INDEX secfilter_secfilter_idx ON secfilter (action, type, data);
 
-INSERT INTO version (table_name, table_version) values ('secfilter', '1');
+INSERT INTO version (table_name, table_version) values ('secfilter','1');
 
diff --git a/utils/kamctl/dbtext/kamailio/secfilter b/utils/kamctl/dbtext/kamailio/secfilter
new file mode 100644 (file)
index 0000000..79fd511
--- /dev/null
@@ -0,0 +1 @@
+id(int,auto) action(int) type(int) data(string) 
index c639c5b..a733827 100644 (file)
@@ -49,6 +49,7 @@ rls_watchers:3
 rtpengine:1
 rtpproxy:1
 sca_subscriptions:2
+secfilter:1
 silo:8
 sip_trace:4
 speed_dial:2
diff --git a/utils/kamctl/mongodb/kamailio/secfilter.json b/utils/kamctl/mongodb/kamailio/secfilter.json
new file mode 100644 (file)
index 0000000..1f7baf4
--- /dev/null
@@ -0,0 +1,26 @@
+{
+  "name": "secfilter",
+  "version": 1,
+  "columns": [
+    "id": {
+      "type": "int",
+      "default": null,
+      "null": false
+    },
+    "action": {
+      "type": "int",
+      "default": "",
+      "null": false
+    },
+    "type": {
+      "type": "int",
+      "default": "",
+      "null": false
+    },
+    "data": {
+      "type": "string",
+      "default": "",
+      "null": false
+    }
+  ]
+}
\ No newline at end of file
index 2b8d914..2aa9a7e 100644 (file)
@@ -49,6 +49,7 @@ db.getCollection("version").insert({ table_name: "rls_watchers", table_version:
 db.getCollection("version").insert({ table_name: "rtpengine", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "rtpproxy", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "sca_subscriptions", table_version: NumberInt(2) });
+db.getCollection("version").insert({ table_name: "secfilter", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "silo", table_version: NumberInt(8) });
 db.getCollection("version").insert({ table_name: "sip_trace", table_version: NumberInt(4) });
 db.getCollection("version").insert({ table_name: "speed_dial", table_version: NumberInt(2) });
index 9e6eab7..18a67c7 100644 (file)
@@ -1,11 +1,11 @@
 CREATE TABLE `secfilter` (
-  `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
-  `action` TINYINT(1) DEFAULT 0 NOT NULL,
-  `type` TINYINT(1) DEFAULT 0 NOT NULL,
-  `data` VARCHAR(64) DEFAULT '' NOT NULL
+    `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+    `action` SMALLINT DEFAULT '' NOT NULL,
+    `type` SMALLINT DEFAULT '' NOT NULL,
+    `data` VARCHAR(64) DEFAULT '' NOT NULL
 );
 
 CREATE INDEX secfilter_idx ON secfilter (`action`, `type`, `data`);
 
-INSERT INTO version (`table_name`, `table_version`) values ('secfilter', '1');
+INSERT INTO version (table_name, table_version) values ('secfilter','1');
 
index 539be00..684d1c4 100644 (file)
@@ -1,8 +1,8 @@
 CREATE TABLE secfilter (
-  id NUMBER(10) PRIMARY KEY,
-  action NUMBER(1) DEFAULT 0 NOT NULL,
-  type NUMBER(1) DEFAULT 0 NOT NULL,
-  data VARCHAR2(64) DEFAULT '' NOT NULL
+    id NUMBER(10) PRIMARY KEY,
+    action NUMBER(5) DEFAULT '',
+    type NUMBER(5) DEFAULT '',
+    data VARCHAR2(64) DEFAULT ''
 );
 
 CREATE OR REPLACE TRIGGER secfilter_tr
@@ -13,7 +13,7 @@ END secfilter_tr;
 /
 BEGIN map2users('secfilter'); END;
 /
-CREATE INDEX ORA_secfilter_idx  ON secfilter (action, type, data);
+CREATE INDEX secfilter_secfilter_idx  ON secfilter (action, type, data);
 
-INSERT INTO version (table_name, table_version) values ('secfilter', '1');
+INSERT INTO version (table_name, table_version) values ('secfilter','1');
 
index fc44a80..71badd4 100644 (file)
@@ -1,11 +1,11 @@
 CREATE TABLE secfilter (
-  id SERIAL PRIMARY KEY NOT NULL,
-  action SMALLINT DEFAULT 0 NOT NULL,
-  type SMALLINT DEFAULT 0 NOT NULL,
-  data VARCHAR(64) DEFAULT '' NOT NULL
+    id SERIAL PRIMARY KEY NOT NULL,
+    action SMALLINT DEFAULT '' NOT NULL,
+    type SMALLINT DEFAULT '' NOT NULL,
+    data VARCHAR(64) DEFAULT '' NOT NULL
 );
 
-CREATE INDEX secfilter_idx ON secfilter (action, type, data);
+CREATE INDEX secfilter_secfilter_idx ON secfilter (action, type, data);
 
-INSERT INTO version (table_name, table_version) values ('secfilter', '1');
+INSERT INTO version (table_name, table_version) values ('secfilter','1');
 
index de448e3..827d527 100644 (file)
                <column><field>subscribe_cseq</field><type>DB1_INT</type></column>
                <column><field>server_id</field><type>DB1_INT</type></column>
        </db_table>
+       <!-- Declaration of secfilter table-->
+       <db_table id="secfilter">
+               <table_name>secfilter</table_name>
+               <db_url_id>mysql</db_url_id>
+               <column><field>id</field><type>DB1_INT</type></column>
+               <column><field>action</field><type>DB1_INT</type></column>
+               <column><field>type</field><type>DB1_INT</type></column>
+               <column><field>data</field><type>DB1_STR</type></column>
+       </db_table>
        <!-- Declaration of sip_trace table-->
        <db_table id="sip_trace">
                <table_name>sip_trace</table_name>
                        </clause_cols>
                </cmd>
        </mod>
+       <!-- secfilter provisionning -->
+       <mod><mod_name>secfilter</mod_name>
+               <cmd><cmd_name>show</cmd_name>
+                       <db_table_id>secfilter</db_table_id>
+                       <cmd_type>DB1_QUERY</cmd_type>
+                       <query_cols>
+                               <col><field>id</field><link_cmd>update</link_cmd></col>
+                               <col><field>action</field></col>
+                               <col><field>type</field></col>
+                               <col><field>data</field></col>
+                       </query_cols>
+               </cmd>
+               <cmd><cmd_name>add</cmd_name>
+                       <db_table_id>secfilter</db_table_id>
+                       <cmd_type>DB1_INSERT</cmd_type>
+                       <query_cols>
+                               <col><field>action</field></col>
+                               <col><field>type</field></col>
+                               <col><field>data</field></col>
+                       </query_cols>
+               </cmd>
+               <cmd><cmd_name>update</cmd_name>
+                       <db_table_id>secfilter</db_table_id>
+                       <cmd_type>DB1_UPDATE</cmd_type>
+                       <clause_cols>
+                               <col><field>id</field><operator>=</operator></col>
+                       </clause_cols>
+                       <query_cols>
+                               <col><field>action</field></col>
+                               <col><field>type</field></col>
+                               <col><field>data</field></col>
+                       </query_cols>
+               </cmd>
+               <cmd><cmd_name>delete</cmd_name>
+                       <db_table_id>secfilter</db_table_id>
+                       <cmd_type>DB1_DELETE</cmd_type>
+                       <clause_cols>
+                               <col><field>id</field><operator>=</operator></col>
+                       </clause_cols>
+               </cmd>
+       </mod>
        <!-- sip_trace provisionning -->
        <mod><mod_name>sip_trace</mod_name>
                <cmd><cmd_name>show</cmd_name>
diff --git a/utils/kamctl/xhttp_pi/secfilter-mod b/utils/kamctl/xhttp_pi/secfilter-mod
new file mode 100644 (file)
index 0000000..abad1bc
--- /dev/null
@@ -0,0 +1,41 @@
+       <!-- secfilter provisionning -->
+       <mod><mod_name>secfilter</mod_name>
+               <cmd><cmd_name>show</cmd_name>
+                       <db_table_id>secfilter</db_table_id>
+                       <cmd_type>DB1_QUERY</cmd_type>
+                       <query_cols>
+                               <col><field>id</field><link_cmd>update</link_cmd></col>
+                               <col><field>action</field></col>
+                               <col><field>type</field></col>
+                               <col><field>data</field></col>
+                       </query_cols>
+               </cmd>
+               <cmd><cmd_name>add</cmd_name>
+                       <db_table_id>secfilter</db_table_id>
+                       <cmd_type>DB1_INSERT</cmd_type>
+                       <query_cols>
+                               <col><field>action</field></col>
+                               <col><field>type</field></col>
+                               <col><field>data</field></col>
+                       </query_cols>
+               </cmd>
+               <cmd><cmd_name>update</cmd_name>
+                       <db_table_id>secfilter</db_table_id>
+                       <cmd_type>DB1_UPDATE</cmd_type>
+                       <clause_cols>
+                               <col><field>id</field><operator>=</operator></col>
+                       </clause_cols>
+                       <query_cols>
+                               <col><field>action</field></col>
+                               <col><field>type</field></col>
+                               <col><field>data</field></col>
+                       </query_cols>
+               </cmd>
+               <cmd><cmd_name>delete</cmd_name>
+                       <db_table_id>secfilter</db_table_id>
+                       <cmd_type>DB1_DELETE</cmd_type>
+                       <clause_cols>
+                               <col><field>id</field><operator>=</operator></col>
+                       </clause_cols>
+               </cmd>
+       </mod>
diff --git a/utils/kamctl/xhttp_pi/secfilter-table b/utils/kamctl/xhttp_pi/secfilter-table
new file mode 100644 (file)
index 0000000..8d57537
--- /dev/null
@@ -0,0 +1,9 @@
+       <!-- Declaration of secfilter table-->
+       <db_table id="secfilter">
+               <table_name>secfilter</table_name>
+               <db_url_id>mysql</db_url_id>
+               <column><field>id</field><type>DB1_INT</type></column>
+               <column><field>action</field><type>DB1_INT</type></column>
+               <column><field>type</field><type>DB1_INT</type></column>
+               <column><field>data</field><type>DB1_STR</type></column>
+       </db_table>