feat: 网元参数配置数据支持版本区分功能

feat(database): add ne_version and schema columns to ne_info table

feat(database): update ne_info table structure in upgrade script

fix(ne_config): handle id as number in Info and Add methods

fix(ne_config): validate neId and fetch neInfo in ListByNeType and DataAdd methods

fix(ne_info): extract version from ServerState in Add and Edit methods

refactor(ne_config): update NeConfig model to include NeVersion

refactor(ne_info): add NeVersion and Schema fields to NeInfo model

test(ne_config): enhance test cases to include version parsing and saving

refactor(ne_config): improve cache handling and querying by NeType and NeVersion

fix(ne_info): update NeInfo version during status change
This commit is contained in:
TsMask
2025-10-17 10:17:07 +08:00
parent 3b053d7f47
commit 8cd86a62d6
18 changed files with 1306 additions and 254 deletions

View File

@@ -469,23 +469,23 @@ amf:
type: "int"
value: "0"
access: "read-only"
filter: "0~15"
filter: "0-32"
display: "Index"
comment: "0~15"
comment: "Max 32"
- name: "plmnId"
type: "regex"
value: "00101"
access: "read-write"
filter: "^[0-9]{5,6}$"
display: "PLMN ID"
comment: ""
comment: "MCC and MNC is less than 6 digits."
- name: "tac"
type: "string"
value: "1"
access: "read-write"
filter: "0~8"
filter: "0-16777215"
display: "TAC"
comment: "0~16777215"
comment: "Multiple TACs separated by commas (tac1,tac2)"
slice:
display: "AMF Support Slice List"
sort: 11

View File

@@ -449,12 +449,12 @@ mme:
display: "Index"
comment: "0~65535"
- name: "imei"
type: "string"
value: "001"
type: "regex"
value: ""
access: "read-write"
filter: "0~64"
filter: "^([0-9]{3,16})$"
display: "IMEI"
comment: "0~64"
comment: "Only check IMEI Prefix, IMEI value is imei prefix value[0-9]{3-16} e.g:'86958304522' )"
enbList:
display: "Enb List Config"
sort: 19

View File

@@ -0,0 +1,423 @@
mme:
system:
display: "System Config"
sort: 1
list:
- name: "mmeName"
type: "string"
value: "MME1"
filter: "0~32"
display: "MME Name"
- name: "networkName.full"
type: "string"
value: "EPC"
filter: "0~64"
display: "Full Network Name"
- name: "networkName.short"
type: "string"
value: "Next"
filter: "0~16"
display: "Short Network Name"
- name: "s1.mtu"
type: "int"
value: "1500"
access: "read-write"
filter: "576~9000"
display: "MTU"
comment: "Maximum Transmission Unit"
- name: "s1.address"
type: "string"
value: "192.168.8.220"
access: "read-write"
filter: "IP"
display: "S1 Local Address"
comment: "Local IP for S1 interface"
- name: "s6a.local.address"
type: "string"
value: "172.16.5.220"
access: "read-write"
filter: "IP"
display: "Local S6a IP"
comment: "Local IP for Diameter S6a"
- name: "s6a.local.host"
type: "string"
value: "mme.epc.mnc001.mcc001.3gppnetwork.org"
access: "read-write"
filter: "0~128"
display: "Local Hostname"
comment: "MME Diameter Host FQDN"
- name: "s6a.local.realm"
type: "string"
value: "epc.mnc001.mcc001.3gppnetwork.org"
access: "read-write"
filter: "0~128"
display: "Local Realm"
comment: "Diameter Realm"
- name: "s11.local.address"
type: "string"
value: "172.16.5.220"
access: "read-write"
filter: "IP"
display: "Local S11 IP"
- name: "n26.local.address"
type: "string"
value: "172.16.5.210"
access: "read-write"
filter: "IP"
display: "Local N26 IP"
- name: "t3402.value"
type: "string"
value: "12m"
filter: "1s~60m"
display: "T3402 Timer"
- name: "t3412.value"
type: "string"
value: "54m"
display: "T3412 Timer"
- name: "t3423.value"
type: "string"
value: "12m"
display: "T3423 Timer"
- name: "message.gtp.t3ResponseDuration"
type: "string"
value: "2s"
display: "GTP Response Timeout"
- name: "message.gtp.n3ResponseRcount"
type: "int"
value: "3"
display: "GTP Response Retries"
- name: "message.gtp.t3HoldingDuration"
type: "string"
value: "6s"
display: "GTP Holding Duration"
- name: "message.gtp.n3HoldingRcount"
type: "int"
value: "1"
display: "GTP Holding Retries"
- name: "message.s6a"
type: "string"
value: "3s"
display: "S6a Timeout"
- name: "handover.value"
type: "string"
value: "300ms"
display: "Handover Timeout"
- name: "s1Flex.instance"
type: "int"
value: "0"
access: "read-write"
filter: "0~2"
display: "mme instance id for s1 flex"
comment: "mme instance id for s1 flex"
- name: "redisDb.enable"
type: "bool"
value: "false"
access: "read-write"
filter: '{"0":"false","1":"true"}'
display: "Enable Redis"
comment: "true|false"
- name: "redisDb.netType"
type: "string"
value: "tcp"
access: "read-write"
filter: '{"tcp":"tcp"}'
display: "Network Type"
comment: "Network type for Redis (tcp)"
- name: "redisDb.addr"
type: "string"
value: "172.16.5.140:6379"
access: "read-write"
filter: "IP:Port"
display: "Redis Master Address"
comment: "IP:Port format"
- name: "redisDb.slaveAddrList"
type: "string"
value: "172.16.5.148:6379"
access: "read-write"
filter: "IP:Port"
display: "Redis Slave Addresses"
comment: "List of Redis slaves for replication"
- name: "redisDb.poolSize"
type: "int"
value: "10"
access: "read-write"
filter: "1~1000"
display: "Connection Pool Size"
comment: "Max Redis connection pool size"
- name: "relativeCapacity"
type: "int"
value: "255"
filter: "0~255"
display: "MME Relative Capacity"
comment: "Used for load balancing among MMEs"
- name: "logDir"
type: "string"
value: "/var/log/"
access: "read-write"
filter: "0~128"
display: "Log Directory"
comment: "Directory where log files will be stored"
- name: "logNum"
type: "int"
value: "10"
access: "read-write"
filter: "1~100"
display: "Log File Count"
comment: "Maximum number of log files to retain"
- name: "logSize"
type: "int"
value: "200"
access: "read-write"
filter: "1~10000"
display: "Log File Size (MB)"
comment: "Max size per log file"
- name: "logLevel"
type: "enum"
value: "debug"
access: "read-write"
filter: '{"debug":"debug","info":"info","warn":"warn","error":"error"}'
display: "Log Level"
comment: "debug|info|warn|error"
gummei:
display: "GUMMEI List"
sort: 3
array:
- name: "index"
type: "int"
value: "0"
access: "read"
filter: "0~15"
display: "Index"
comment: "0~15"
- name: "plmnId"
type: "regex"
value: "00101"
filter: "^[0-9]{5,6}$"
display: "PLMN ID"
- name: "mmeGid"
type: "int"
value: "2"
filter: "0~65535"
display: "MME Group ID"
- name: "mmeCode"
type: "int"
value: "1"
filter: "0~255"
display: "MME Code"
servedTai:
display: "TAI List"
sort: 4
array:
- name: "index"
type: "int"
value: "0"
access: "read"
filter: "0~15"
display: "Index"
comment: "0~15"
- name: "plmnId"
type: "regex"
value: "00101"
filter: "^[0-9]{5,6}$"
display: "PLMN ID"
- name: "tac"
type: "int"
value: "1"
filter: "0~65535"
display: "TAC"
s6a:
display: "HSS List"
sort: 5
array:
- name: "index"
type: "int"
value: "0"
access: "read"
filter: "0~15"
display: "Index"
comment: "0~15"
- name: "address"
type: "string"
value: "172.16.5.221"
filter: "IP"
display: "HSS Address"
- name: "priority"
type: "int"
value: "1"
filter: "1~10"
display: "Priority"
- name: "plmnList"
type: "array"
display: "PLMN IDs"
array:
- name: "index"
type: "int"
value: "0"
access: "read"
filter: "0~15"
display: "Index"
comment: "0~15"
- name: "plmnId"
type: "string"
value: ["00101"]
filter: "^[0-9]{5,6}$"
display: "PLMN ID"
s11:
display: "SGW List"
sort: 9
array:
- name: "index"
type: "int"
value: "0"
access: "read"
filter: "0~15"
display: "Index"
comment: "0~15"
- name: "address"
type: "string"
value: "172.16.5.222"
filter: "IP"
display: "SGW Address"
- name: "priority"
type: "int"
value: "1"
filter: "1~10"
display: "Priority"
- name: "tai"
type: "array"
display: "Tracking Areas"
array:
- name: "index"
type: "int"
value: "0"
access: "read"
filter: "0~15"
display: "Index"
comment: "0~15"
- name: "plmnId"
type: "string"
value: "00101"
filter: "^[0-9]{5,6}$"
display: "PLMN ID"
- name: "tac"
type: "int"
value: "1"
filter: "0~65535"
display: "TAC"
s5s8:
display: "PGW List"
sort: 11
array:
- name: "index"
type: "int"
value: "0"
access: "read"
filter: "0~15"
display: "Index"
comment: "0~15"
- name: "address"
type: "string"
value: "172.16.5.223"
filter: "IP"
display: "PGW Address"
- name: "priority"
type: "int"
value: "1"
filter: "1~10"
display: "Priority"
- name: "servedApn"
type: "array"
display: "Served APNs"
array:
- name: "index"
type: "int"
value: "0"
access: "read"
filter: "0~15"
display: "Index"
comment: "0~15"
- name: "plmnId"
type: "string"
value: "00101"
filter: "^[0-9]{5,6}$"
display: "PLMN ID"
- name: "apn"
type: "string"
value: "internet"
filter: "0~128"
display: "APN"
n26:
display: "AMF List"
sort: 13
array:
- name: "index"
type: "int"
value: "0"
access: "read"
filter: "0~15"
display: "Index"
comment: "0~15"
- name: "address"
type: "string"
value: "172.16.5.224"
filter: "IP"
display: "AMF Address"
- name: "priority"
type: "int"
value: "1"
filter: "1~10"
display: "Priority"
- name: "tai"
type: "array"
display: "Tracking Areas"
array:
- name: "index"
type: "int"
value: "0"
access: "read"
filter: "0~15"
display: "Index"
comment: "0~15"
- name: "plmnId"
type: "string"
value: "00101"
filter: "^[0-9]{5,6}$"
display: "PLMN ID"
- name: "tac"
type: "int"
value: "1"
filter: "0~65535"
display: "TAC"
enbList:
display: "Enb List Config"
sort: 19
visible: "hide"
array:
- name: "index"
type: "int"
value: "0"
access: "read-only"
filter: "0~128"
display: "Index"
comment: "0~128"
- name: "name"
type: "string"
value: ""
access: "read-write"
filter: "0~64"
display: "ENB Name"
comment: "text content length 0~64"
- name: "address"
type: "string"
value: ""
access: "read-write"
filter: "0~64"
display: "ENB Address"
comment: "text content length 0~64"
- name: "position"
type: "string"
value: ""
access: "read-write"
filter: "0~64"
display: "Position"
comment: "location description. Prohibition of spaces, length of text content 0-64"

View File

@@ -0,0 +1,534 @@
pgwc:
pgwcSystem:
display: "PGWC Sytem Config"
sort: 1
list:
- name: "s58Ip"
type: "string"
value: "172.16.5.151"
access: "read-write"
filter: ''
display: "Local S58 IP"
comment: ""
- name: "n4Ipv4"
type: "ipv4"
value: "172.16.5.150"
access: "read-write"
filter: ""
display: "N4 IPv4"
comment: ""
- name: "n4Ipv6"
type: "ipv6"
value: ""
access: "read-write"
filter: ""
display: "N4 IPv6"
comment: ""
- name: "n4UIpv4"
type: "ipv4"
value: ""
access: "read-write"
filter: ""
display: "N4U IPv4"
comment: ""
- name: "n4UIpv6"
type: "ipv6"
value: ""
access: "read-write"
filter: ""
display: "N4U IPv6"
comment: ""
- name: "gxEnable"
type: "bool"
value: ""
access: "read-write"
filter: ''
display: "Gx Policy Enable"
comment: ""
- name: "gxChargingEnable"
type: "bool"
value: ""
access: "read-write"
filter: ''
display: "Gx Charging Enable"
comment: ""
- name: "gyChargingEnable"
type: "bool"
value: ""
access: "read-write"
filter: ''
display: "Gy Charging Enable"
comment: ""
- name: "primaryDnsIpv4"
type: "ipv4"
value: "114.114.114.114"
access: "read-write"
filter: ""
display: "Primary DNS IPv4"
comment: ""
- name: "secondaryDnsIpv4"
type: "ipv4"
value: ""
access: "read-write"
filter: ""
display: "Secondary DNS IPv4"
comment: ""
- name: "primaryDnsIpv6"
type: "ipv6"
value: ""
access: "read-write"
filter: ""
display: "Primary DNS IPv6"
comment: ""
- name: "secondaryDnsIpv6"
type: "ipv6"
value: ""
access: "read-write"
filter: ""
display: "Secondary DNS IPv6"
comment: ""
- name: "primaryPcscfIpv4"
type: "ipv4"
value: "172.16.5.110"
access: "read-write"
filter: ""
display: "Primary PCSCF IPv4"
comment: ""
- name: "secondaryPcscfIpv4"
type: "ipv4"
value: ""
access: "read-write"
filter: ""
display: "Secondary PCSCF IPv4"
comment: ""
- name: "primaryPcscfIpv6"
type: "ipv6"
value: ""
access: "read-write"
filter: ""
display: "Primary PCSCF IPv6"
comment: ""
- name: "secondaryPcscfIpv6"
type: "ipv6"
value: ""
access: "read-write"
filter: ""
display: "Secondary PCSCF IPv6"
comment: ""
- name: "ueMtu"
type: "int"
value: ""
access: "read-write"
filter: "0~65535"
display: "UE MTU"
comment: ""
localDiameterConfig:
display: "Local Diameter Config"
sort: 3
list:
- name: "ipAddr"
type: "string"
value: "172.16.5.150"
access: "read-write"
filter: ''
display: "Local Diameter IP"
comment: ""
- name: "hostName"
type: "string"
value: "pgwc.mnc001.mcc001.3gppnetwork.org"
access: "read-write"
filter: ''
display: "Local Diameter Host Name"
comment: ""
- name: "realmName"
type: "string"
value: "mnc001.mcc001.3gppnetwork.org"
access: "read-write"
filter: ''
display: "Local Diameter Realm Name"
comment: ""
- name: "gyServiceContextId"
type: "string"
value: "gy@3gpp"
access: "read-write"
filter: ''
display: "Local Gy Service Context ID"
comment: ""
- name: "gxServiceContextId"
type: "string"
value: "gx@3gpp"
access: "read-write"
filter: ''
display: "Local Gx Service Context ID"
comment: ""
remoteGyCfg:
display: "Remote Gy Config"
sort: 5
list:
- name: "enable"
type: "bool"
value: 'false'
access: "read-write"
filter: ""
display: "Remote Gy Enable"
comment: ""
- name: "remoteAddrs"
type: "string"
value: ""
access: "read-write"
filter: ''
display: "Remote Gy Addresses"
comment: "e.g. ipv4:port;ipv4:port;ipv4:port"
remoteGxCfg:
display: "Remote Gx Config"
sort: 7
list:
- name: "enable"
type: "bool"
value: 'false'
access: "read-write"
filter: ""
display: "Remote Gx Enable"
comment: ""
- name: "remoteAddrs"
type: "string"
value: ""
access: "read-write"
filter: ''
display: "Remote Gx Addresses"
comment: "e.g. ipv4:port;ipv4:port;ipv4:port"
upfConfig:
display: "UPF Config"
sort: 9
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"
- name: "ipPoolType"
type: "string"
value: "IPv4v6"
access: "read-write"
filter: ""
display: "Ip Pool Type"
comment: "IPv4,IPv6,IPv4v6"
- name: "ipv4Pools"
type: "string"
value: ""
access: "read-write"
filter: "10~256"
display: "IPv4 Pools"
comment: "CIDR format, e.g. 192.168.1.0/24"
- name: "ipv6Pools"
type: "string"
value: ""
access: "read-write"
filter: "5~512"
display: "IPv6 Pools"
comment: "CIDR format, e.g. fe80::20c:29ff:fee4:dab7/50"
- name: "staticIpv4Enable"
type: "bool"
value: "false"
access: "read-write"
filter: ""
display: "Static IPv4 Enable"
comment: ""
- name: "staticIpv4Start"
type: "ipv4"
value: ""
access: "read-write"
filter: ""
display: "Static IPv4 Start"
comment: "ipv4 format"
- name: "staticIpv4End"
type: "ipv4"
value: ""
access: "read-write"
filter: ""
display: "Static IPv4 End"
comment: "ipv4 format"
- name: "staticIpv6Enable"
type: "bool"
value: "false"
access: "read-write"
filter: ""
display: "Static IPv6 Enable"
comment: ""
- name: "staticIpv6Start"
type: "ipv6"
value: ""
access: "read-write"
filter: ""
display: "Static IPv6 Start"
comment: "ipv6 format"
- name: "staticIpv6End"
type: "ipv6"
value: ""
access: "read-write"
filter: ""
display: "Static IPv6 End"
comment: "ipv6 format"
- name: "ueDnnIpPool"
display: "UE DNN IP Pool"
array:
- name: "index"
type: "int"
value: ""
access: "read-only"
filter: "0~2047"
display: "Index"
comment: ""
- name: "dnn"
type: "string"
value: ""
access: "read-write"
filter: "1~64"
display: "DNN"
comment: ""
- name: "ipPoolType"
type: "string"
value: "IPv4v6"
access: "read-write"
filter: ""
display: "Ip Pool Type"
comment: "IPv4,IPv6,IPv4v6"
- name: "ipv4Pools"
type: "string"
value: ""
access: "read-write"
filter: "10~256"
display: "IPv4 Pools"
comment: "CIDR format, e.g. 192.168.1.0/24"
- name: "ipv6Pools"
type: "string"
value: ""
access: "read-write"
filter: "5~512"
display: "IPv6 Pools"
comment: "CIDR format, e.g. fe80::20c:29ff:fee4:dab7/50"
- name: "staticIpv4Enable"
type: "bool"
value: "false"
access: "read-write"
filter: ""
display: "Static IPv4 Enable"
comment: ""
- name: "staticIpv4Start"
type: "ipv4"
value: ""
access: "read-write"
filter: ""
display: "Static IPv4 Start"
comment: "ipv4 format"
- name: "staticIpv4End"
type: "ipv4"
value: ""
access: "read-write"
filter: ""
display: "Static IPv4 End"
comment: "ipv4 format"
- name: "staticIpv6Enable"
type: "bool"
value: "false"
access: "read-write"
filter: ""
display: "Static IPv6 Enable"
comment: ""
- name: "staticIpv6Start"
type: "ipv6"
value: ""
access: "read-write"
filter: ""
display: "Static IPv6 Start"
comment: "ipv6 format"
- name: "staticIpv6End"
type: "ipv6"
value: ""
access: "read-write"
filter: ""
display: "Static IPv6 End"
comment: "ipv6 format"
dnnSelectUpf:
display: "DNN Select UPF"
sort: 11
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: 13
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: ""
localDhcpCfg:
display: "Local DHCP Config"
sort: 15
list:
- name: "enable"
type: "bool"
value: "false"
access: "read-write"
filter: ""
display: "Enable"
comment: ""
- name: "localIp"
type: "string"
value: ""
access: "read-write"
filter: ""
display: "Local IP"
comment: ""
dnnselectdhcpserver:
display: "DNN Select DHCP Server"
sort: 17
array:
- name: "index"
type: "int"
value: ""
access: "read-only"
filter: "0~65535"
display: "Index"
comment: ""
- name: "enable"
type: "bool"
value: "false"
access: "read-write"
filter: ""
display: "Enable"
comment: ""
- name: "dnn"
type: "string"
value: ""
access: "read-write"
filter: "1~64"
display: "DNN"
comment: ""
- name: "dhcpServerAddr"
type: "string"
value: ""
access: "read-write"
filter: ""
display: "DHCP Server IP"
comment: "e.g. 192.168.1.1"
offlineChargingConfig:
display: "Offline Charging Config"
sort: 19
list:
- 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: "freeSubsCdrEnable"
type: "bool"
value: "false"
access: "read-write"
filter: ""
display: "Free Subscribers CDR Enable"
comment: ""
- name: "timeThreshold"
type: "int"
value: "600"
access: "read-write"
filter: "0~999999999"
display: "Time Threshold"
comment: "Seconds"
- name: "volumeThreshold"
type: "int"
value: "0"
access: "read-write"
filter: "0~999999999999999"
display: "Volume Threshold"
comment: "Bytes"

View File

@@ -611,6 +611,13 @@ smf:
filter: ""
display: "Local IP"
comment: ""
- name: "ntfyEnable"
type: "bool"
value: "false"
access: "read-write"
filter: ""
display: "DHCP Server Ntfy Enable"
comment: ""
dnnselectdhcpserver:
display: "DNN Select DHCP Server"
sort: 23
@@ -644,7 +651,7 @@ smf:
display: "DHCP Server IP"
comment: "e.g. 192.168.1.1"
offlineChargingConfig:
display: "Offline Charging Config"
display: "Charging Config"
sort: 25
list:
- name: "cdrFileName"
@@ -682,12 +689,19 @@ smf:
filter: "0~9999"
display: "CDR File Max Age"
comment: "Days"
- name: "onlineCdrEnable"
type: "bool"
value: "false"
access: "read-write"
filter: ""
display: "Online Charging CDR Enable"
comment: ""
- name: "freeSubsCdrEnable"
type: "bool"
value: "false"
access: "read-write"
filter: ""
display: "Free Subscribers CDR Enable"
display: "Offline Charging CDR Enable"
comment: ""
- name: "timeThreshold"
type: "int"