Merge branch 'lichang' into lite
This commit is contained in:
@@ -132,6 +132,7 @@ INSERT INTO "ne_config" VALUES (242, 'CBC', 'mmeProfile', 'MME Profile', 'array'
|
||||
-- OMC parameter config
|
||||
INSERT INTO "ne_config" VALUES (260, 'OMC', 'alarmEmailForward', 'Alarm Email Forward Interface', 'list', '[{"access":"rw","comment":"Is it enabled forward alarm with Email interface","display":"Enable","filter":"true;false","name":"enable","type":"bool","value":"true"},{"access":"rw","comment":"","display":"Email List","filter":"","name":"emailList","type":"string","value":""},{"access":"rw","comment":"Email SMTP server","display":"SMTP Server","filter":"","name":"smtp","type":"string","value":""},{"access":"rw","comment":"","display":"Port","filter":"0~65535","name":"port","type":"int","value":""},{"access":"rw","comment":"","display":"User","filter":"","name":"user","type":"string","value":""},{"access":"rw","comment":"","display":"Password","filter":"","name":"password","type":"string","value":""},{"access":"rw","comment":"If skip TLS verify (true/false)","display":"TLS Skip Verify","filter":"true;false","name":"tlsSkipVerify","type":"bool","value":"true"}]', 3, '', 1725505025649, 'public');
|
||||
INSERT INTO "ne_config" VALUES (261, 'OMC', 'alarmSMSForward', 'Alarm SMS Forward Interface', 'list', '[{"access":"rw","comment":"Is it enabled forward alarm with SMS interface","display":"Enable","filter":"true;false","name":"enable","type":"bool","value":"true"},{"access":"rw","comment":"Multiple mobile separated by commas","display":"Mobile List","filter":"","name":"mobileList","type":"string","value":""},{"access":"rw","comment":"The SMSC SMPP Address","display":"SMSC Address","filter":"","name":"smscAddr","type":"string","value":""},{"access":"rw","comment":"","display":"System ID","filter":"","name":"systemID","type":"string","value":""},{"access":"rw","comment":"","display":"Password","filter":"","name":"password","type":"string","value":""},{"access":"rw","comment":"","display":"System Type","filter":"","name":"systemType","type":"string","value":""},{"access":"rw","comment":"Short message coding type","display":"Data Coding","filter":"{\"0\":\"GSM7BIT\",\"1\":\"ASCII\",\"2\":\"BINARY8BIT1\",\"3\":\"LATIN1\",\"4\":\"BINARY8BIT2\",\"6\":\"CYRILLIC\",\"7\":\"HEBREW\",\"8\":\"UCS2\"}","name":"dataCoding","type":"enum","value":"GSM7BIT"},{"access":"rw","comment":"It is the source address, the length is between 3 and 20","display":"Service Number","filter":"3~20","name":"serviceNumber","type":"string","value":"OMC"}]', 4, '', 1727664057261, 'public');
|
||||
INSERT INTO "ne_config" VALUES (262, 'OMC', 'trace', 'NE Signaling Trace', 'list', '[{\"access\":\"read-write\",\"comment\":\"enable or disable NE signaling trace creation\",\"display\":\"Enable\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"enabled\",\"type\":\"bool\",\"value\":\"false\"},{\"access\":\"read-write\",\"comment\":\"NE signaling trace host address\",\"display\":\"Host\",\"filter\":\"0~128\",\"name\":\"host\",\"type\":\"ipv4\",\"value\":\"172.16.5.100\"},{\"access\":\"read-write\",\"comment\":\"NE signaling trace port\",\"display\":\"Port\",\"filter\":\"3000~65530\",\"name\":\"port\",\"type\":\"int\",\"value\":\"33033\"}]', 1, '', 1748570559170, 'public');
|
||||
|
||||
-- 更新 SMSC 配置 2025521
|
||||
INSERT INTO "ne_config" VALUES (280, 'SMSC', 'system', 'System', 'list', '[{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CDR Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"cdrFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SM Validity\",\"filter\":\"0-2147483647\",\"name\":\"smValidity\",\"type\":\"int\",\"value\":\"259200\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"logFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable local users.\",\"display\":\"Local Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"localPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable outbound roaming users.\",\"display\":\"Local Roaming Out Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"localRoamingOutPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable inbound roaming users.\",\"display\":\"Visitor Roaming In Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"visitorRoamingInPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to other unattainable users.\",\"display\":\"Other Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"otherPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Define the maximum port number that the queue of pending SMS may grow to.\",\"display\":\"Polling Number\",\"filter\":\"0-64\",\"name\":\"pollingNumber\",\"type\":\"int\",\"value\":\"64\"},{\"access\":\"read-write\",\"comment\":\"Specify the priority parameter of SM_RP_PRI. true = High; false = Low.\",\"display\":\"Priority Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"priorityFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable TP-Reply-Path parameter in the SMS-DELIVER data unit.\",\"display\":\"TP Reply Path Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"tpReplyPathFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SMSC Number\",\"filter\":\"0~32\",\"name\":\"smscNumber\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SMSC Domain\",\"filter\":\"0~16\",\"name\":\"smscDomain\",\"type\":\"string\",\"value\":\"0.0.0.0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CSFB VoLTE Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"csfbVolteFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Camel Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"camelFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SCF Address\",\"filter\":\"0~16\",\"name\":\"scfAddress\",\"type\":\"string\",\"value\":\"0.0.0.0\"},{\"access\":\"read-write\",\"comment\":\"If add plus then set false\",\"display\":\"MT Id Format Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"mtIdFormatFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"enable mcast sms\",\"display\":\"Mcast Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"mcastFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Level\",\"filter\":\"{\\\"0\\\":\\\"none\\\",\\\"1\\\":\\\"error\\\",\\\"2\\\":\\\"debug\\\"}\",\"name\":\"logLevel\",\"type\":\"enum\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"The MB sizeof log file\",\"display\":\"Log Size\",\"filter\":\"1-1000\",\"name\":\"logSize\",\"type\":\"int\",\"value\":\"200\"},{\"access\":\"read-write\",\"comment\":\"The number of log file\",\"display\":\"Log Number\",\"filter\":\"1-20\",\"name\":\"logNum\",\"type\":\"int\",\"value\":\"10\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Directory\",\"filter\":\"0~128\",\"name\":\"logDir\",\"type\":\"string\",\"value\":\"/var/log/\"}]', 1, '', 1747799255683, 'public');
|
||||
|
||||
@@ -133,6 +133,7 @@ INSERT INTO `ne_config` VALUES (242, 'CBC', 'mmeProfile', 'MME Profile', 'array'
|
||||
-- OMC parameter config
|
||||
INSERT INTO `ne_config` VALUES (260, 'OMC', 'alarmEmailForward', 'Alarm Email Forward Interface', 'list', '[{\"access\":\"rw\",\"comment\":\"Is it enabled forward alarm with Email interface\",\"display\":\"Enable\",\"filter\":\"true;false\",\"name\":\"enable\",\"type\":\"bool\",\"value\":\"true\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Email List\",\"filter\":\"\",\"name\":\"emailList\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"Email SMTP server\",\"display\":\"SMTP Server\",\"filter\":\"\",\"name\":\"smtp\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Port\",\"filter\":\"0~65535\",\"name\":\"port\",\"type\":\"int\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"User\",\"filter\":\"\",\"name\":\"user\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Password\",\"filter\":\"\",\"name\":\"password\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"If skip TLS verify (true/false)\",\"display\":\"TLS Skip Verify\",\"filter\":\"true;false\",\"name\":\"tlsSkipVerify\",\"type\":\"bool\",\"value\":\"true\"}]', 3, '', 1725505025649, 'public');
|
||||
INSERT INTO `ne_config` VALUES (261, 'OMC', 'alarmSMSForward', 'Alarm SMS Forward Interface', 'list', '[{\"access\":\"rw\",\"comment\":\"Is it enabled forward alarm with SMS interface\",\"display\":\"Enable\",\"filter\":\"true;false\",\"name\":\"enable\",\"type\":\"bool\",\"value\":\"true\"},{\"access\":\"rw\",\"comment\":\"Multiple mobile separated by commas\",\"display\":\"Mobile List\",\"filter\":\"\",\"name\":\"mobileList\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"The SMSC SMPP Address\",\"display\":\"SMSC Address\",\"filter\":\"\",\"name\":\"smscAddr\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"System ID\",\"filter\":\"\",\"name\":\"systemID\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Password\",\"filter\":\"\",\"name\":\"password\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"System Type\",\"filter\":\"\",\"name\":\"systemType\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"Short message coding type\",\"display\":\"Data Coding\",\"filter\":\"{\\\"0\\\":\\\"GSM7BIT\\\",\\\"1\\\":\\\"ASCII\\\",\\\"2\\\":\\\"BINARY8BIT1\\\",\\\"3\\\":\\\"LATIN1\\\",\\\"4\\\":\\\"BINARY8BIT2\\\",\\\"6\\\":\\\"CYRILLIC\\\",\\\"7\\\":\\\"HEBREW\\\",\\\"8\\\":\\\"UCS2\\\"}\",\"name\":\"dataCoding\",\"type\":\"enum\",\"value\":\"GSM7BIT\"},{\"access\":\"rw\",\"comment\":\"It is the source address, the length is between 3 and 20\",\"display\":\"Service Number\",\"filter\":\"3~20\",\"name\":\"serviceNumber\",\"type\":\"string\",\"value\":\"OMC\"}]', 4, '', 1727664057261, 'public');
|
||||
INSERT INTO `ne_config` VALUES (262, 'OMC', 'trace', 'NE Signaling Trace', 'list', '[{\"access\":\"read-write\",\"comment\":\"enable or disable NE signaling trace creation\",\"display\":\"Enable\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"enabled\",\"type\":\"bool\",\"value\":\"false\"},{\"access\":\"read-write\",\"comment\":\"NE signaling trace host address\",\"display\":\"Host\",\"filter\":\"0~128\",\"name\":\"host\",\"type\":\"ipv4\",\"value\":\"172.16.5.100\"},{\"access\":\"read-write\",\"comment\":\"NE signaling trace port\",\"display\":\"Port\",\"filter\":\"3000~65530\",\"name\":\"port\",\"type\":\"int\",\"value\":\"33033\"}]', 1, '', 1748570559170, 'public');
|
||||
|
||||
-- 更新 SMSC 配置 2025521
|
||||
INSERT INTO `ne_config` VALUES (280, 'SMSC', 'system', 'System', 'list', '[{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CDR Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"cdrFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SM Validity\",\"filter\":\"0-2147483647\",\"name\":\"smValidity\",\"type\":\"int\",\"value\":\"259200\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"logFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable local users.\",\"display\":\"Local Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"localPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable outbound roaming users.\",\"display\":\"Local Roaming Out Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"localRoamingOutPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable inbound roaming users.\",\"display\":\"Visitor Roaming In Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"visitorRoamingInPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to other unattainable users.\",\"display\":\"Other Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"otherPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Define the maximum port number that the queue of pending SMS may grow to.\",\"display\":\"Polling Number\",\"filter\":\"0-64\",\"name\":\"pollingNumber\",\"type\":\"int\",\"value\":\"64\"},{\"access\":\"read-write\",\"comment\":\"Specify the priority parameter of SM_RP_PRI. true = High; false = Low.\",\"display\":\"Priority Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"priorityFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable TP-Reply-Path parameter in the SMS-DELIVER data unit.\",\"display\":\"TP Reply Path Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"tpReplyPathFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SMSC Number\",\"filter\":\"0~32\",\"name\":\"smscNumber\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SMSC Domain\",\"filter\":\"0~16\",\"name\":\"smscDomain\",\"type\":\"string\",\"value\":\"0.0.0.0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CSFB VoLTE Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"csfbVolteFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Camel Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"camelFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SCF Address\",\"filter\":\"0~16\",\"name\":\"scfAddress\",\"type\":\"string\",\"value\":\"0.0.0.0\"},{\"access\":\"read-write\",\"comment\":\"If add plus then set false\",\"display\":\"MT Id Format Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"mtIdFormatFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"enable mcast sms\",\"display\":\"Mcast Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"mcastFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Level\",\"filter\":\"{\\\"0\\\":\\\"none\\\",\\\"1\\\":\\\"error\\\",\\\"2\\\":\\\"debug\\\"}\",\"name\":\"logLevel\",\"type\":\"enum\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"The MB sizeof log file\",\"display\":\"Log Size\",\"filter\":\"1-1000\",\"name\":\"logSize\",\"type\":\"int\",\"value\":\"200\"},{\"access\":\"read-write\",\"comment\":\"The number of log file\",\"display\":\"Log Number\",\"filter\":\"1-20\",\"name\":\"logNum\",\"type\":\"int\",\"value\":\"10\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Directory\",\"filter\":\"0~128\",\"name\":\"logDir\",\"type\":\"string\",\"value\":\"/var/log/\"}]', 1, '', 1747799255683, 'public');
|
||||
|
||||
@@ -13,11 +13,11 @@ serverVersion: "lite"
|
||||
server:
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6: ""
|
||||
port: 33080
|
||||
port: 33080 # http listen port
|
||||
schema: http
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6: ""
|
||||
port: 33443
|
||||
port: 33443 # https listen port
|
||||
schema: https
|
||||
certFile: /usr/local/etc/omc/certs/www.omc.net.crt
|
||||
keyFile: /usr/local/etc/omc/certs/www.omc.net.key
|
||||
@@ -26,7 +26,7 @@ server:
|
||||
# web service configuration
|
||||
# if you are using nginx to take over, you can disable the
|
||||
webServer:
|
||||
enabled: true
|
||||
enabled: true # web server enabled, default false
|
||||
rootDir: /usr/local/etc/omc/web
|
||||
listen:
|
||||
- addr: 0.0.0.0:44080
|
||||
@@ -36,13 +36,12 @@ webServer:
|
||||
certFile: /usr/local/etc/omc/certs/www.omc.net.crt
|
||||
keyFile: /usr/local/etc/omc/certs/www.omc.net.key
|
||||
|
||||
|
||||
# track configuration for NE
|
||||
# track configuration for NE signaling trace
|
||||
# host fill in the specific IP address
|
||||
trace:
|
||||
enabled: false
|
||||
host: "172.16.5.100" # fill in the specific IP address
|
||||
port: 33033
|
||||
|
||||
enabled: false # trace enabled, default false
|
||||
host: "172.16.5.100" # trace host, default 127.0.0.1
|
||||
port: 33033 # trace port, default 33033
|
||||
|
||||
# data source
|
||||
database:
|
||||
@@ -50,15 +49,15 @@ database:
|
||||
# std: standard
|
||||
std:
|
||||
type: "mysql"
|
||||
host: "127.0.0.1"
|
||||
port: 33066
|
||||
username: "root"
|
||||
password: "1000omc@kp!"
|
||||
database: "omc_db"
|
||||
host: "127.0.0.1" # mysql host
|
||||
port: 33066 # mysql port
|
||||
username: "root" # mysql username
|
||||
password: "1000omc@kp!" # mysql password
|
||||
database: "omc_db" # mysql database
|
||||
# lite: lite
|
||||
lite:
|
||||
type: "sqlite"
|
||||
database: "/usr/local/etc/omc/database/omc_db.sqlite"
|
||||
database: "/usr/local/etc/omc/database/omc_db.sqlite" # sqlite database
|
||||
# default data source name
|
||||
defaultDataSourceName: "lite"
|
||||
|
||||
@@ -67,9 +66,9 @@ database:
|
||||
redis:
|
||||
dataSource:
|
||||
default:
|
||||
port: 6379 # Redis port
|
||||
host: "127.0.0.1" # Redis host
|
||||
password: "helloearth"
|
||||
port: 6379 # redis port
|
||||
host: "127.0.0.1" # redis host
|
||||
password: "helloearth" # redis password
|
||||
db: 10 # Redis db_num
|
||||
# default data source name
|
||||
defaultDataSourceName: "default"
|
||||
|
||||
@@ -12,11 +12,11 @@ serverVersion: "std"
|
||||
server:
|
||||
- ipv4: "0.0.0.0"
|
||||
ipv6: ""
|
||||
port: 33040
|
||||
port: 33040 # http listen port
|
||||
schema: http
|
||||
- ipv4: "0.0.0.0"
|
||||
ipv6: ""
|
||||
port: 33443
|
||||
port: 33443 # https listen port
|
||||
schema: https
|
||||
certFile: ./local/certs/www.omc.net.crt
|
||||
keyFile: ./local/certs/www.omc.net.key
|
||||
@@ -24,7 +24,7 @@ server:
|
||||
# web service configuration
|
||||
# if you are using nginx to take over, you can disable the
|
||||
webServer:
|
||||
enabled: false
|
||||
enabled: false # web server enabled, default false
|
||||
rootDir: ./local/web
|
||||
listen:
|
||||
- addr: "0.0.0.0:80"
|
||||
@@ -34,11 +34,12 @@ webServer:
|
||||
certFile: ./local/certs/www.omc.net.crt
|
||||
keyFile: ./local/certs/www.omc.net.key
|
||||
|
||||
# track configuration for NE
|
||||
# track configuration for NE signaling trace
|
||||
# host fill in the specific IP address
|
||||
trace:
|
||||
enabled: true
|
||||
host: "192.168.5.58" # fill in the specific IP address
|
||||
port: 33033
|
||||
enabled: true # trace enabled, default false
|
||||
host: "192.168.5.58" # trace host, default 127.0.0.1
|
||||
port: 33033 # trace port, default 33033
|
||||
|
||||
# data sources
|
||||
database:
|
||||
|
||||
@@ -1,4 +1,29 @@
|
||||
omc:
|
||||
trace:
|
||||
display: "NE Signaling Trace"
|
||||
sort: 1
|
||||
list:
|
||||
- name: "enabled"
|
||||
type: "bool"
|
||||
value: "false"
|
||||
access: "read-write"
|
||||
filter: '{"0":"false","1":"true"}'
|
||||
display: "Enable"
|
||||
comment: "enable or disable NE signaling trace creation"
|
||||
- name: "host"
|
||||
type: "ipv4"
|
||||
value: "172.16.5.100"
|
||||
access: "read-write"
|
||||
filter: '0~128'
|
||||
display: "Host"
|
||||
comment: "NE signaling trace host address"
|
||||
- name: "port"
|
||||
type: "int"
|
||||
value: "33033"
|
||||
access: "read-write"
|
||||
filter: '3000~65530'
|
||||
display: "Port"
|
||||
comment: "NE signaling trace port"
|
||||
alarmEmailForward:
|
||||
display: "Alarm Email Forward Interface"
|
||||
sort: 3
|
||||
@@ -6,7 +31,7 @@ omc:
|
||||
- name: "enable"
|
||||
type: "bool"
|
||||
value: "true"
|
||||
access: "rw"
|
||||
access: "rw"
|
||||
filter: "true;false"
|
||||
display: "Enable"
|
||||
comment: "Is it enabled forward alarm with Email interface"
|
||||
@@ -59,7 +84,7 @@ omc:
|
||||
- name: "enable"
|
||||
type: "bool"
|
||||
value: "true"
|
||||
access: "rw"
|
||||
access: "rw"
|
||||
filter: "true;false"
|
||||
display: "Enable"
|
||||
comment: "Is it enabled forward alarm with SMS interface"
|
||||
@@ -104,11 +129,11 @@ omc:
|
||||
access: "rw"
|
||||
filter: '{"0":"GSM7BIT","1":"ASCII","2":"BINARY8BIT1","3":"LATIN1","4":"BINARY8BIT2","6":"CYRILLIC","7":"HEBREW","8":"UCS2"}'
|
||||
display: "Data Coding"
|
||||
comment: "Short message coding type"
|
||||
comment: "Short message coding type"
|
||||
- name: "serviceNumber"
|
||||
type: "string"
|
||||
value: "OMC"
|
||||
access: "rw"
|
||||
filter: "3~20"
|
||||
display: "Service Number"
|
||||
comment: "It is the source address, the length is between 3 and 20"
|
||||
comment: "It is the source address, the length is between 3 and 20"
|
||||
|
||||
@@ -171,6 +171,13 @@ func Get(key string) any {
|
||||
return conf.Get(key)
|
||||
}
|
||||
|
||||
// Set 设置配置信息
|
||||
//
|
||||
// Set("redis.defaultDataSourceName", "std")
|
||||
func Set(key string, value any) {
|
||||
conf.Set(key, value)
|
||||
}
|
||||
|
||||
// GetAssetsDirFS 访问程序内全局资源访问
|
||||
func GetAssetsDirFS() *embed.FS {
|
||||
return conf.Get("AssetsDir").(*embed.FS)
|
||||
|
||||
@@ -27,7 +27,7 @@ func (c *ConnTCP) New() (*ConnTCP, error) {
|
||||
proto = "tcp6"
|
||||
c.Addr = fmt.Sprintf("[%s]", c.Addr)
|
||||
}
|
||||
address := fmt.Sprintf("%s:%d", c.Addr, c.Port)
|
||||
address := net.JoinHostPort(c.Addr, fmt.Sprint(c.Port))
|
||||
|
||||
// 默认等待5s
|
||||
if c.DialTimeOut == 0 {
|
||||
|
||||
@@ -57,8 +57,14 @@ func (s *SocketTCP) Resolve(callback func(conn *net.Conn, err error)) {
|
||||
callback(nil, fmt.Errorf("tcp service not created"))
|
||||
return
|
||||
}
|
||||
listener := *s.Listener
|
||||
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
callback(nil, fmt.Errorf("tcp service panic err"))
|
||||
}
|
||||
}()
|
||||
|
||||
listener := *s.Listener
|
||||
for {
|
||||
select {
|
||||
case <-s.StopChan:
|
||||
|
||||
@@ -27,7 +27,7 @@ func (c *ConnUDP) New() (*ConnUDP, error) {
|
||||
proto = "udp6"
|
||||
c.Addr = fmt.Sprintf("[%s]", c.Addr)
|
||||
}
|
||||
address := fmt.Sprintf("%s:%d", c.Addr, c.Port)
|
||||
address := net.JoinHostPort(c.Addr, fmt.Sprint(c.Port))
|
||||
|
||||
// 默认等待5s
|
||||
if c.DialTimeOut == 0 {
|
||||
|
||||
@@ -56,10 +56,17 @@ func (s *SocketUDP) Resolve(callback func(*net.UDPConn, error)) {
|
||||
return
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
callback(nil, fmt.Errorf("udp service panic err"))
|
||||
}
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-s.StopChan:
|
||||
callback(nil, fmt.Errorf("udp service not created"))
|
||||
return
|
||||
default:
|
||||
callback(s.Conn, nil)
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ func (s *NeActionController) Service(c *gin.Context) {
|
||||
neTypeLower := strings.ToLower(neInfo.NeType)
|
||||
cmdStr := fmt.Sprintf("sudo systemctl %s %s", body.Action, neTypeLower)
|
||||
if neTypeLower == "omc" {
|
||||
cmdStr = fmt.Sprintf("nohup sh -c \"sudo systemctl stop omc && sleep 5s && sudo systemctl %s omc\" > /dev/null 2>&1 &", body.Action)
|
||||
cmdStr = fmt.Sprintf("nohup sh -c \"sleep 5s && sudo systemctl %s omc\" > /dev/null 2>&1 &", body.Action)
|
||||
} else if neTypeLower == "ims" {
|
||||
if body.Action == "restart" {
|
||||
cmdStr = "ims-stop || true && ims-start"
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
neFetchlink "be.ems/src/modules/network_element/fetch_link"
|
||||
"be.ems/src/modules/network_element/model"
|
||||
neService "be.ems/src/modules/network_element/service"
|
||||
traceService "be.ems/src/modules/trace/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -214,12 +215,17 @@ func (s NeConfigController) DataInfo(c *gin.Context) {
|
||||
}
|
||||
|
||||
if query.NeType == "OMC" {
|
||||
var o *cm_omc.ConfigOMC
|
||||
resData, err := o.Query(query.ParamName)
|
||||
if err != nil {
|
||||
c.JSON(200, resp.ErrMsg(err.Error()))
|
||||
if query.ParamName == "alarmEmailForward" || query.ParamName == "alarmSMSForward" {
|
||||
var o *cm_omc.ConfigOMC
|
||||
resData, err := o.Query(query.ParamName)
|
||||
if err != nil {
|
||||
c.JSON(200, resp.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
c.JSON(200, resp.OkData(resData))
|
||||
return
|
||||
}
|
||||
resData := s.neConfigService.GetOMCYaml(query.ParamName)
|
||||
c.JSON(200, resp.OkData(resData))
|
||||
return
|
||||
}
|
||||
@@ -268,13 +274,26 @@ func (s NeConfigController) DataEdit(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
if body.NeType == "OMC" {
|
||||
var o *cm_omc.ConfigOMC
|
||||
resData, err := o.Modify(body.ParamName, body.ParamData)
|
||||
if body.ParamName == "alarmEmailForward" || body.ParamName == "alarmSMSForward" {
|
||||
var o *cm_omc.ConfigOMC
|
||||
resData, err := o.Modify(body.ParamName, body.ParamData)
|
||||
if err != nil {
|
||||
c.JSON(200, resp.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
c.JSON(200, resp.OkData(resData))
|
||||
return
|
||||
}
|
||||
err := s.neConfigService.ModifyOMCYaml(body.ParamName, body.Loc, body.ParamData)
|
||||
if err != nil {
|
||||
c.JSON(200, resp.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
c.JSON(200, resp.OkData(resData))
|
||||
// 重开跟踪任务信令数据通道UDP
|
||||
if body.ParamName == "trace" {
|
||||
traceService.NewTraceTask.CreateUDP(true)
|
||||
}
|
||||
c.JSON(200, resp.Ok(nil))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ func (s *NeLicenseController) State(c *gin.Context) {
|
||||
neLicense.Status = "0"
|
||||
}
|
||||
// 更新授权码
|
||||
if neLicense.ActivationRequestCode == "" || strings.HasPrefix(neLicense.ActivationRequestCode, "SN") {
|
||||
if neLicense.ActivationRequestCode == "" || strings.HasPrefix(neLicense.ActivationRequestCode, "SN") || neLicense.Status == "0" {
|
||||
code, licensePath := s.neLicenseService.ReadLicenseInfo(neLicense)
|
||||
neLicense.ActivationRequestCode = code
|
||||
neLicense.LicensePath = licensePath
|
||||
|
||||
56
src/modules/network_element/service/ne_config_omc.go
Normal file
56
src/modules/network_element/service/ne_config_omc.go
Normal file
@@ -0,0 +1,56 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"be.ems/src/framework/cmd"
|
||||
"be.ems/src/framework/config"
|
||||
)
|
||||
|
||||
// GetOMCYaml 获取OMC网元配置文件 /usr/local/etc/omc/omc.yaml
|
||||
func (r NeConfig) GetOMCYaml(paramName string) []map[string]any {
|
||||
if paramName == "trace" {
|
||||
traceData := config.Get("trace").(map[string]any)
|
||||
return []map[string]any{traceData}
|
||||
}
|
||||
return []map[string]any{}
|
||||
}
|
||||
|
||||
// ModifyOMCYaml 修改OMC网元配置文件 /usr/local/etc/omc/omc.yaml
|
||||
func (r NeConfig) ModifyOMCYaml(paramName, loc string, paramData any) error {
|
||||
neConfig := r.FindByNeTypeAndParamName("OMC", paramName)
|
||||
if neConfig.ParamType == "list" {
|
||||
if paramName == "trace" {
|
||||
configPath := fmt.Sprint(config.Get("config")) // 获取配置文件路径
|
||||
paramDataMap := paramData.(map[string]any)
|
||||
for k, v := range paramDataMap {
|
||||
config.Set(fmt.Sprintf("trace.%s", strings.ToLower(k)), v)
|
||||
if runtime.GOOS == "windows" {
|
||||
continue // Windows系统不支持sed命令
|
||||
}
|
||||
// 修改参数较少,直接命令改文件内容
|
||||
if k == "enabled" {
|
||||
// sed 's/enabled: \(true\|false\) # trace enabled/enabled: true # trace enabled/' /usr/local/etc/omc/omc.yaml
|
||||
cmd.Execf("sed -i 's/enabled: \\(true\\|false\\) # trace enabled/enabled: %v # trace enabled/' %s", v, configPath)
|
||||
}
|
||||
if k == "host" {
|
||||
// sed 's/host: ".*" # trace host/host: "127.2.2.2" # trace host/' /usr/local/etc/omc/omc.yaml
|
||||
cmd.Execf("sed -i 's/host: \".*\" # trace host/host: \"%v\" # trace host/' %s", v, configPath)
|
||||
}
|
||||
if k == "port" {
|
||||
// sed 's/port: [0-9]\+ # trace port/port: 6964 # trace port/' /usr/local/etc/omc/omc.yaml
|
||||
cmd.Execf("sed -i 's/port: [0-9]\\+ # trace port/port: %v # trace port/' %s", v, configPath)
|
||||
}
|
||||
}
|
||||
// 重开跟踪任务信令数据通道UDP
|
||||
// service.NewTraceTask.CreateUDP(true) 方法导致循环引用,抛给上层调用
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if neConfig.ParamType == "array" {
|
||||
// TODO
|
||||
}
|
||||
return fmt.Errorf("not found method paramName")
|
||||
}
|
||||
@@ -662,7 +662,7 @@ func (r NeVersion) operateRun(preinput map[string]string, cmdStrArr []string, ne
|
||||
}
|
||||
}
|
||||
if !suffix {
|
||||
suffix = strings.LastIndex(outputStr, "# ") != -1
|
||||
suffix = strings.LastIndex(outputStr, "# ") != -1 // 特殊内容中的终端终止符
|
||||
}
|
||||
if len(cmdStrArr) > 0 && suffix {
|
||||
if firstRead {
|
||||
|
||||
@@ -32,6 +32,9 @@ func (r TraceTask) SelectByPage(query map[string]string) ([]model.TraceTask, int
|
||||
if v, ok := query["title"]; ok && v != "" {
|
||||
tx = tx.Where("title like ?", fmt.Sprintf("%s%%", v))
|
||||
}
|
||||
if v, ok := query["neType"]; ok && v != "" {
|
||||
tx = tx.Where("ne_list like ?", fmt.Sprintf("%%%s%%", strings.ToUpper(v)))
|
||||
}
|
||||
if v, ok := query["startTime"]; ok && v != "" {
|
||||
if len(v) == 10 {
|
||||
v = fmt.Sprintf("%s000", v)
|
||||
@@ -90,8 +93,7 @@ func (r TraceTask) SelectByPage(query map[string]string) ([]model.TraceTask, int
|
||||
tx = tx.Order("id desc")
|
||||
}
|
||||
|
||||
err := tx.Find(&rows).Error
|
||||
if err != nil {
|
||||
if err := tx.Find(&rows).Error; err != nil {
|
||||
logger.Errorf("query find err => %v", err.Error())
|
||||
return rows, total
|
||||
}
|
||||
|
||||
@@ -22,22 +22,25 @@ import (
|
||||
// 实例化数据层 TraceTask 结构体
|
||||
var NewTraceTask = &TraceTask{
|
||||
udpService: socket.SocketUDP{},
|
||||
tcpService: socket.SocketTCP{},
|
||||
traceTaskRepository: repository.NewTraceTask,
|
||||
traceDataRepository: repository.NewTraceData,
|
||||
}
|
||||
|
||||
// TraceTask 跟踪任务 服务层处理
|
||||
type TraceTask struct {
|
||||
// UDP服务对象
|
||||
udpService socket.SocketUDP
|
||||
// 跟踪_任务数据信息
|
||||
traceTaskRepository *repository.TraceTask
|
||||
// 跟踪_数据信息
|
||||
traceDataRepository *repository.TraceData
|
||||
udpService socket.SocketUDP // UDP服务对象
|
||||
tcpService socket.SocketTCP // 测试用,后续调整TODO
|
||||
traceTaskRepository *repository.TraceTask // 跟踪_任务数据信息
|
||||
traceDataRepository *repository.TraceData // 跟踪_数据信息
|
||||
}
|
||||
|
||||
// CreateUDP 创建UDP数据通道
|
||||
func (r TraceTask) CreateUDP() error {
|
||||
func (r *TraceTask) CreateUDP(reload bool) error {
|
||||
if reload {
|
||||
r.CloseUDP() // 关闭之前的UDP服务
|
||||
}
|
||||
|
||||
// 跟踪配置是否开启
|
||||
host, port, err := r.traceNotify()
|
||||
if err != nil {
|
||||
@@ -84,12 +87,12 @@ func (r TraceTask) CreateUDP() error {
|
||||
// ============ 本地测试接收网元UDP发过来的数据 后续调整TODO
|
||||
if config.Env() == "local" {
|
||||
// 初始化TCP服务
|
||||
tcpService := socket.SocketTCP{Addr: host, Port: port + 1}
|
||||
if _, err := tcpService.New(); err != nil {
|
||||
r.tcpService = socket.SocketTCP{Addr: host, Port: port + 1}
|
||||
if _, err := r.tcpService.New(); err != nil {
|
||||
return err
|
||||
}
|
||||
// 接收处理TCP数据
|
||||
go tcpService.Resolve(func(conn *net.Conn, err error) {
|
||||
go r.tcpService.Resolve(func(conn *net.Conn, err error) {
|
||||
if err != nil {
|
||||
logger.Errorf("TCP Resolve %s", err.Error())
|
||||
return
|
||||
@@ -125,7 +128,7 @@ func (r TraceTask) CreateUDP() error {
|
||||
}
|
||||
|
||||
// pasreUDPData 解析数据
|
||||
func (r TraceTask) pasreUDPData(buf []byte) error {
|
||||
func (r *TraceTask) pasreUDPData(buf []byte) error {
|
||||
data, err := traceHandler(buf)
|
||||
if err != nil {
|
||||
logger.Errorf("UDP Resolve UDPDataHandler Error: %s", err.Error())
|
||||
@@ -157,8 +160,9 @@ func (r TraceTask) pasreUDPData(buf []byte) error {
|
||||
}
|
||||
|
||||
// CloseUDP 关闭UDP数据通道
|
||||
func (r TraceTask) CloseUDP() {
|
||||
func (r *TraceTask) CloseUDP() {
|
||||
r.udpService.Close()
|
||||
r.tcpService.Close()
|
||||
}
|
||||
|
||||
// FindByPage 根据条件分页查询
|
||||
|
||||
@@ -141,7 +141,7 @@ func Setup(router *gin.Engine) {
|
||||
// InitLoad 初始参数
|
||||
func InitLoad() {
|
||||
// 创建跟踪任务信令数据通道UDP
|
||||
if err := service.NewTraceTask.CreateUDP(); err != nil {
|
||||
if err := service.NewTraceTask.CreateUDP(false); err != nil {
|
||||
logger.Errorf("socket udp init fail: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user