From 885104dc755ecdc1f7260528366af8eec54456b3 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 19 Dec 2024 11:06:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20SGWC=E5=8F=82=E6=95=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=8F=AF=E9=80=89=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/param/sgwc_param_config.yaml | 210 ++++++++++++++++++++++++++++ database/common/ne_config.sql | 7 + 2 files changed, 217 insertions(+) create mode 100644 config/param/sgwc_param_config.yaml diff --git a/config/param/sgwc_param_config.yaml b/config/param/sgwc_param_config.yaml new file mode 100644 index 00000000..29593137 --- /dev/null +++ b/config/param/sgwc_param_config.yaml @@ -0,0 +1,210 @@ +sgwc: + sgwcSystem: + display: "System Config" + sort: 1 + list: + - name: "s11IpType" + type: "string" + value: "" + access: "read-write" + filter: "^(IPv4|IPv6|IPv4v6)$" + display: "Local S11 IP Type" + comment: "IPv4/IPv6/IPv4v6" + - name: "s11Ipv4" + type: "string" + value: "172.16.5.80" + access: "read-write" + filter: "" + display: "Local S11 IPv4" + comment: "IPv4 Format" + - name: "s11Ipv6" + type: "string" + value: "" + access: "read-write" + filter: "" + display: "Local S11 IPv6" + comment: "IPv6 Format" + - name: "s58IpType" + type: "string" + value: "" + access: "read-write" + filter: "^(IPv4|IPv6|IPv4v6)$" + display: "Local S5/S8 IP Type" + comment: "IPv4/IPv6/IPv4v6" + - name: "s58Ipv4" + type: "string" + value: "172.16.5.81" + access: "read-write" + filter: "" + display: "Local S5/S8 IPv4" + comment: "IPv4 Format" + - name: "s58Ipv6" + type: "string" + value: "" + access: "read-write" + filter: "" + display: "Local S5/S8 IPv6" + comment: "IPv6 Format" + - name: "sxIpType" + type: "string" + value: "" + access: "read-write" + filter: "^(IPv4|IPv6|IPv4v6)$" + display: "Local Sx IP Type" + comment: "IPv4/IPv6/IPv4v6" + - name: "sxIpv4" + type: "string" + value: "172.16.5.81" + access: "read-write" + filter: "" + display: "Local Sx IPv4" + comment: "IPv4 Format" + - name: "sxIpv6" + type: "string" + value: "" + access: "read-write" + filter: "" + display: "Local Sx IPv6" + comment: "IPv6 Format" + upfConfig: + display: "UPF Config" + sort: 3 + array: + - name: "index" + type: "int" + value: "" + access: "read-only" + filter: "0~2047" + display: "Index" + comment: "" + - name: "id" + type: "string" + value: "" + access: "read-write" + filter: "1~64" + display: "UPF ID" + comment: "" + - name: "addr" + type: "string" + value: "" + access: "read-write" + filter: "7~45" + display: "Address" + comment: "e.g. ip:port" + dnnSelectUpf: + display: "DNN Select UPF" + sort: 5 + array: + - name: "index" + type: "int" + value: "0" + access: "read-only" + filter: "0~65535" + display: "Index" + comment: "" + - name: "dnn" + type: "string" + value: "" + access: "read-write" + filter: "1~64" + display: "DNN" + comment: "" + - name: "upfId" + type: "string" + value: "" + access: "read-write" + filter: "1~64" + display: "UPF ID" + comment: "" + dnnTaiSelectUpf: + display: "DNN TAI Select UPF" + sort: 7 + array: + - name: "index" + type: "int" + value: "" + access: "read-only" + filter: "0~65535" + display: "Index" + comment: "" + - name: "dnn" + type: "string" + value: "" + access: "read-write" + filter: "1~64" + display: "DNN" + comment: "" + - name: "tai" + type: "string" + value: "" + access: "read-write" + filter: "1~64" + display: "TAI" + comment: "MCC+MNC+TAC" + - name: "upfId" + type: "string" + value: "upf2-Id" + access: "read-write" + filter: "1~64" + display: "UPF ID" + comment: "" + cdrConfig: + display: "Charging Data Report Config" + sort: 9 + list: + - name: "enable" + type: "bool" + value: "false" + access: "read-write" + filter: "" + display: "CDR Enable" + comment: "" + - name: "cdrFileName" + type: "string" + value: "smf.cdr" + access: "read-write" + filter: "1~64" + display: "CDR File Name" + comment: "" + - name: "cdrFilePath" + type: "string" + value: "/var/log/smfCdr" + access: "read-write" + filter: "1~256" + display: "CDR File Path" + comment: "" + - name: "cdrFileNum" + type: "int" + value: "50" + access: "read-write" + filter: "1~999999999" + display: "CDR File Num" + comment: "" + - name: "cdrFileSize" + type: "int" + value: "300" + access: "read-write" + filter: "1~999999" + display: "CDR File Size" + comment: "Megabytes" + - name: "cdrFileMaxAge" + type: "int" + value: "30" + access: "read-write" + filter: "0~9999" + display: "CDR File Max Age" + comment: "Days" + - name: "timeThreshold" + type: "int" + value: "600" + access: "read-write" + filter: "0~999999999" + display: "Time Threshold" + comment: "Seconds" + - name: "volumeThreshold" + type: "int" + value: "0~999999999999999" + access: "read-write" + filter: "" + display: "Volume Threshold" + comment: "Bytes" diff --git a/database/common/ne_config.sql b/database/common/ne_config.sql index 2922c3df..3073ccb3 100644 --- a/database/common/ne_config.sql +++ b/database/common/ne_config.sql @@ -132,4 +132,11 @@ INSERT INTO `ne_config` VALUES (282, 'SMSC', 'smpplink', 'SMPP Link List', 'arra INSERT INTO `ne_config` VALUES (283, 'SMSC', 'convprefix', 'Conv Prefix List', 'array', '[{\"access\":\"read-only\",\"comment\":\"0~127\",\"display\":\"Index\",\"filter\":\"0~127\",\"name\":\"index\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Prefix\",\"filter\":\"0~16\",\"name\":\"prefix\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Delete Length\",\"filter\":\"0-16\",\"name\":\"deleteLength\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Add Length\",\"filter\":\"0-16\",\"name\":\"addLength\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Add Digits\",\"filter\":\"0~16\",\"name\":\"addDigits\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Number Length\",\"filter\":\"0-32\",\"name\":\"numberLength\",\"type\":\"int\",\"value\":\"0\"}]', 7, 'post,put,delete', 1728528805745, 'public'); INSERT INTO `ne_config` VALUES (284, 'SMSC', 'smppparam', 'SMPP Param List', 'array', '[{\"access\":\"read-only\",\"comment\":\"0~31\",\"display\":\"Index\",\"filter\":\"0~31\",\"name\":\"index\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Link Alias\",\"filter\":\"0-8\",\"name\":\"linkAlias\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Link Type\",\"filter\":\"{\\\"0\\\":\\\"udp\\\",\\\"1\\\":\\\"tcp\\\"}\",\"name\":\"linkType\",\"type\":\"enum\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Server Type\",\"filter\":\"{\\\"0\\\":\\\"client\\\",\\\"1\\\":\\\"server\\\"}\",\"name\":\"serverType\",\"type\":\"enum\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Session Type\",\"filter\":\"{\\\"0\\\":\\\"bindTX\\\",\\\"1\\\":\\\"bindRX\\\",\\\"2\\\":\\\"bindTRX\\\"}\",\"name\":\"sessionType\",\"type\":\"enum\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"System ID\",\"filter\":\"0-16\",\"name\":\"systemID\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Password\",\"filter\":\"0-8\",\"name\":\"password\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"System Type\",\"filter\":\"0-12\",\"name\":\"systemType\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Local GTT\",\"filter\":\"0-16\",\"name\":\"localGTT\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Remote GTT\",\"filter\":\"0-16\",\"name\":\"remoteGTT\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Local IP\",\"filter\":\"0-32\",\"name\":\"localIP\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Remote IP\",\"filter\":\"0-32\",\"name\":\"remoteIP\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Session Init Timer\",\"filter\":\"0-65535\",\"name\":\"sessionInitTimer\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Enquire Link Timer\",\"filter\":\"0-65535\",\"name\":\"enquireLinkTimer\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Inactivity Timer\",\"filter\":\"0-65535\",\"name\":\"inactivityTimer\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Response Timer\",\"filter\":\"0-65535\",\"name\":\"responseTimer\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Local SSN\",\"filter\":\"0-255\",\"name\":\"localSSN\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Remote SSN\",\"filter\":\"0-255\",\"name\":\"remoteSSN\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Enable Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"enable\",\"type\":\"bool\",\"value\":\"1\"}]', 9, 'put', 1728528805748, 'public'); +-- 更新 SGWC 配置 20241219 +INSERT INTO `ne_config` VALUES (300, 'SGWC', 'sgwcSystem', 'System Config', 'list', '[{\"access\":\"read-write\",\"comment\":\"IPv4/IPv6/IPv4v6\",\"display\":\"Local S11 IP Type\",\"filter\":\"^(IPv4|IPv6|IPv4v6)$\",\"name\":\"s11IpType\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"IPv4 Format\",\"display\":\"Local S11 IPv4\",\"filter\":\"\",\"name\":\"s11Ipv4\",\"type\":\"string\",\"value\":\"172.16.5.80\"},{\"access\":\"read-write\",\"comment\":\"IPv6 Format\",\"display\":\"Local S11 IPv6\",\"filter\":\"\",\"name\":\"s11Ipv6\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"IPv4/IPv6/IPv4v6\",\"display\":\"Local S5/S8 IP Type\",\"filter\":\"^(IPv4|IPv6|IPv4v6)$\",\"name\":\"s58IpType\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"IPv4 Format\",\"display\":\"Local S5/S8 IPv4\",\"filter\":\"\",\"name\":\"s58Ipv4\",\"type\":\"string\",\"value\":\"172.16.5.81\"},{\"access\":\"read-write\",\"comment\":\"IPv6 Format\",\"display\":\"Local S5/S8 IPv6\",\"filter\":\"\",\"name\":\"s58Ipv6\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"IPv4/IPv6/IPv4v6\",\"display\":\"Local Sx IP Type\",\"filter\":\"^(IPv4|IPv6|IPv4v6)$\",\"name\":\"sxIpType\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"IPv4 Format\",\"display\":\"Local Sx IPv4\",\"filter\":\"\",\"name\":\"sxIpv4\",\"type\":\"string\",\"value\":\"172.16.5.81\"},{\"access\":\"read-write\",\"comment\":\"IPv6 Format\",\"display\":\"Local Sx IPv6\",\"filter\":\"\",\"name\":\"sxIpv6\",\"type\":\"string\",\"value\":\"\"}]', 1, '', 1734512800790, 'public'); +INSERT INTO `ne_config` VALUES (301, 'SGWC', 'upfConfig', 'UPF Config', 'array', '[{\"access\":\"read-only\",\"comment\":\"\",\"display\":\"Index\",\"filter\":\"0~2047\",\"name\":\"index\",\"type\":\"int\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"UPF ID\",\"filter\":\"1~64\",\"name\":\"id\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"e.g. ip:port\",\"display\":\"Address\",\"filter\":\"7~45\",\"name\":\"addr\",\"type\":\"string\",\"value\":\"\"}]', 3, '', 1734512800805, 'public'); +INSERT INTO `ne_config` VALUES (302, 'SGWC', 'dnnSelectUpf', 'DNN Select UPF', 'array', '[{\"access\":\"read-only\",\"comment\":\"\",\"display\":\"Index\",\"filter\":\"0~65535\",\"name\":\"index\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"DNN\",\"filter\":\"1~64\",\"name\":\"dnn\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"UPF ID\",\"filter\":\"1~64\",\"name\":\"upfId\",\"type\":\"string\",\"value\":\"\"}]', 5, '', 1734512800811, 'public'); +INSERT INTO `ne_config` VALUES (303, 'SGWC', 'dnnTaiSelectUpf', 'DNN TAI Select UPF', 'array', '[{\"access\":\"read-only\",\"comment\":\"\",\"display\":\"Index\",\"filter\":\"0~65535\",\"name\":\"index\",\"type\":\"int\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"DNN\",\"filter\":\"1~64\",\"name\":\"dnn\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"MCC+MNC+TAC\",\"display\":\"TAI\",\"filter\":\"1~64\",\"name\":\"tai\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"UPF ID\",\"filter\":\"1~64\",\"name\":\"upfId\",\"type\":\"string\",\"value\":\"upf2-Id\"}]', 7, '', 1734512800816, 'public'); +INSERT INTO `ne_config` VALUES (304, 'SGWC', 'cdrConfig', 'Charging Data Report Config', 'list', '[{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CDR Enable\",\"filter\":\"\",\"name\":\"enable\",\"type\":\"bool\",\"value\":\"false\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CDR File Name\",\"filter\":\"1~64\",\"name\":\"cdrFileName\",\"type\":\"string\",\"value\":\"smf.cdr\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CDR File Path\",\"filter\":\"1~256\",\"name\":\"cdrFilePath\",\"type\":\"string\",\"value\":\"/var/log/smfCdr\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CDR File Num\",\"filter\":\"1~999999999\",\"name\":\"cdrFileNum\",\"type\":\"int\",\"value\":\"50\"},{\"access\":\"read-write\",\"comment\":\"Megabytes\",\"display\":\"CDR File Size\",\"filter\":\"1~999999\",\"name\":\"cdrFileSize\",\"type\":\"int\",\"value\":\"300\"},{\"access\":\"read-write\",\"comment\":\"Days\",\"display\":\"CDR File Max Age\",\"filter\":\"0~9999\",\"name\":\"cdrFileMaxAge\",\"type\":\"int\",\"value\":\"30\"},{\"access\":\"read-write\",\"comment\":\"Seconds\",\"display\":\"Time Threshold\",\"filter\":\"0~999999999\",\"name\":\"timeThreshold\",\"type\":\"int\",\"value\":\"600\"},{\"access\":\"read-write\",\"comment\":\"Bytes\",\"display\":\"Volume Threshold\",\"filter\":\"\",\"name\":\"volumeThreshold\",\"type\":\"int\",\"value\":\"0~999999999999999\"}]', 9, '', 1734512800821, 'public'); + SET FOREIGN_KEY_CHECKS=1;