diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7b65dd0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# ---> VisualStudioCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Run temp file and dir +docs/temp/ + + +# Built Visual Studio Code Extensions +*.vsix +*.bak + + diff --git a/docs/01-5GC OMC安装指南 v1.3.pdf b/docs/01-5GC OMC安装指南 v1.3.pdf new file mode 100644 index 0000000..2e6e7c6 Binary files /dev/null and b/docs/01-5GC OMC安装指南 v1.3.pdf differ diff --git a/docs/01-5GC OMC安装指南.md b/docs/01-5GC OMC安装指南.md new file mode 100644 index 0000000..47b0f9c --- /dev/null +++ b/docs/01-5GC OMC安装指南.md @@ -0,0 +1,415 @@ +# 5GC OMC安装指南 + +## 1 安装环境及依赖包 + +X86_64通用服务器: + +``` +计算机或者虚拟机环境(最低配置):CPU: 2, Memory: 8.00 GB, Disk: 200 GB +操作系统环境:Ubuntu 18.04 +数据库环境:mariadb-10.3.38-GA +WEB服务: nginx 1.14.0 (ubuntu) +安装包名称格式:OMC 5GC16.1.1.amd64.deb (其中,'5GC16.1.1'为版本号, 'amd64'为硬件平台名称) +``` + +麒麟arm64服务器: + +``` +计算机或者虚拟机环境(最低配置):CPU: 2, Memory: 8.00 GB, Disk: 200 GB +操作系统环境:银河麒麟 kylin server v10 +数据库环境:mariadb-10.3.35-1.p01.ky10.aarch64 +WEB服务: nginx 1.16.1-11.p01.ky10.aarch64 +安装包名称格式:OMC 5GC16.1.1.arm64.rpm (其中,'5GC16.1.1'为版本号, 'arm64'为硬件平台名称) +``` + +注意事项: + +```tips +* 以下操作以银河麒麟arm64硬件平台为例 +* 全新安装方式,数据库的数据会被全部清除 +``` + +### 1.1 安装数据库 + +注意:非第一次安装或者全新安装请跳过此步骤 + +mariadb版本:mariadb-server-3:10.3.35-1.p01.ky10.aarch64 + +软件安装 + +```bash +# yum clean all +# yum makecache +# yum -y update +# yum install -y mariadb +# yum install -y mariadb-server-3:10.3.35-1.p01.ky10.aarch64 +``` + +配置修改 + +修改/etc/my.cnf.d/mariadb-server.cnf +增加或者修改如下三行: + +``` +bind-address=0.0.0.0 +port=33066 +max_connections=1000 +``` + +验证测试 + +```bash +# systemctl enable mariadb +# systemctl restart mariadb +# systemctl status mariadb +``` + +正常显示结果如下: + +```bash +[root@ems omc]# systemctl status mariadb +● mariadb.service - MariaDB 10.3.35 database server + Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) + Active: active (running) since Sun 2023-04-30 11:09:56 CST; 7h ago + Docs: man:mysqld(8) + https://mariadb.com/kb/en/library/systemd/ + Main PID: 5127 (mysqld) + Status: "Taking your SQL requests now..." + Tasks: 37 + Memory: 101.0M + CGroup: /system.slice/mariadb.service + └─5127 /usr/libexec/mysqld +``` + +修改mysql数据库root密码: + +```tips +!!!注意!!!: 修改后的密码需要更新到/usr/local/omc/etc/restconf.yaml, crontask.yaml和nbi_alarm.json等配置文件中的数据库信息配置项 +``` + +```bash +[root@ems ~]# mysql -u root +MariaDB [none]> use mysql + +MariaDB [mysql]> update user set password=PASSWORD('******') where User='root'; + +MariaDB [mysql]> flush privileges; + +MariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '******' + +MariaDB [mysql]> quit +``` + +通过以下登录命令确认修改成功 + +``` +[root@ems ~]# mysql -u root -h 192.168.0.229 -P 33066 -p +Enter password: +Welcome to the MariaDB monitor. Commands end with ; or \g. +Your MariaDB connection id is 95 +Server version: 10.3.35-MariaDB MariaDB Server + +Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. + +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + +MariaDB [(none)]> + +``` + +### 1.2 安装WEB服务 + +注意:非第一次安装或者全新安装请跳过此步骤 + +WEB服务: nginx-1.16.1-11.p01.ky10.aarch64 + +* 软件安装 + +```bash +# yum clean all +# yum makecache +# yum -y update +# yum install -y nginx +``` + +* 验证测试 + +```bash +# systemctl enable nginx +# systemctl daemon-reload +# systemctl start nginx +# systemctl status nginx +● nginx.service - The nginx HTTP and reverse proxy server + Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled) + Active: active (running) since Tue 2023-05-02 20:57:48 CST; 3h 12min ago + Main PID: 23163 (nginx) + Tasks: 5 + Memory: 19.3M + CGroup: /system.slice/nginx.service + ├─23163 nginx: master process /usr/sbin/nginx + ├─23164 nginx: worker process + ├─23165 nginx: worker process +``` + +## 2 安装配置OMC + +### 2.1 安装OMC软件包 + +* 导入签名证书 + +OMC软件包使用了RPM的GPG数字签名,第一次安装时需要导入签名证书, OMC的签名证书为RPM-GPG-KEY-OMCUSER + +```bash +# rpm --import RPM-GPG-KEY-OMCUSER +``` + +* 验证软件包完整性 + +显示"digests signatures OK"表示软件包是合法签名 + +```bash +# rpm -K OMC\ 5GC16.1.1.arm64.rpm +OMC-5GC16.1.1-20230628.ky10.aarch64.rpm: digests signatures OK +``` + +* 安装OMC软件包 + +```bash +# rpm -ivh OMC\ 5GC16.1.1.arm64.rpm +``` + +安装后的软件包目录树(实际目录树会随版本不同有变化,以下仅供参考): + +```bash +# cd /usr/local +# tree omc -L 2 +omc +├── backup +├── bin +│   ├── cpsshkey.sh +│   ├── crontask +│   ├── importdb.sh +│   ├── nbi_alarm +│   ├── ne-hosts +│   ├── omcsvc.sh +│   ├── restagent +│   └── tables.txt +├── database +├── etc +│   ├── cm +│   ├── crontask.yaml +│   ├── db +│   ├── default +│   ├── nbi_alarm.json +│   ├── restconf.yaml +│   ├── schema +│   └── tasks.yaml +├── htdocs +│   └── front +├── license +├── log +│   ├── crontask.log -> /usr/local/omc/log/crontask.log-20230629 +│   ├── crontask.log-20230628 +│   ├── crontask.log-20230629 +│   ├── nbi_alarm +│   ├── restagent.log -> /usr/local/omc/log/restagent.log-20230629 +│   ├── restagent.log-20230628 +│   └── restagent.log-20230629 +├── software +└── upload +# +``` + +### 2.2 修改nginx服务的OMC配置 + +安装软件包成功后可以根据实际环境对nginx的OMC配置进行修改,前端Web的默认侦听端口是8888,除了侦听端口,其它不用修改 + +```bash +# cd /etc/nginx/conf.d +# cat omc.conf +server { + listen 8888 default_server; + root /usr/local/omc/htdocs/front/; + index index.html index.htm; + server_name localhost; + location / { + try_files $uri $uri/ =404; + } +} +``` + +### 2.3 修改OMC Web前端配置 + +根据实际环境修改如下文件的IP地址和端口,端口需要和OMC的配置文件一致, OMC后端ipv4服务侦听端口默认为3030, ipv6的默认侦听端口为6060: + +```bash +# sudo sed -i.bak 's/192.168.2.119:/192.168.0.229:/g' /usr/local/omc/htdocs/front/config.js +``` + +### 2.4 修改OMC后端配置 + +说明: + +```tips +* 目录/usr/local/omc/etc/default下的文件是OMC程序的初始配置文件,不要修改 +* 拷贝default目录下的文件至/usr/local/omc/etc目录,根据使用环境修改配置文件 +``` + +```bash +# cd /usr/local/omc/etc +# cp default/* ../ +``` + +根据实际的运行环境对配置文件restconf.yaml, crontask.yaml, nbi_alarm.json, nbi_agent.json, 4a_agent.yaml及tasks.yaml进行修改, 特别是侦听端口和数据库配置信息(包括端口/用户/密码) + +### 2.5 数据库配置 + +注意:第一次或全新安装执行该步骤, 该步骤会清除掉原有的omc数据库 + +```bash +# /usr/local/omc/bin/importdb.sh install +``` + +升级安装执行该步骤 + +```bash +# /usr/local/omc/bin/importdb.sh upgrade +``` + +### 2.6 防火墙配置 + +如果系统默认是打开防火墙,需要添加配置文件中配置的服务和端口(端口要和实际环境配置一致),如下: + +```bash +# firewall-cmd --add-port=33066/tcp --permanent +# firewall-cmd --add-port=8443/tcp --permanent +# firewall-cmd --add-port=8080/tcp --permanent +# firewall-cmd --add-port=4443/tcp --permanent +# firewall-cmd --add-port=8888/tcp --permanent +# firewall-cmd --add-port=3030/tcp --permanent +# firewall-cmd --add-port=4040/tcp --permanent +# firewall-cmd --add-port=5050/tcp --permanent +# firewall-cmd --add-port=6060/tcp --permanent +# firewall-cmd --add-port=31232-31271/tcp --permanent +# firewall-cmd --add-port=2222/tcp --permanent +# firewall-cmd --add-port=2152/udp --permanent +# firewall-cmd --reload +``` + +### 2.7 配置被管网元的SSH信任关系 + +为了便于OMC管理被管网元(包括登录网元,安装软件,备份配置文件和执行命令等操作), 第一次安装时需要配置被管网元与OMC的SSH信任关系,便于无密码SSH登录: + +* 修改/usr/local/omc/bin目录下的nehosts文件(******替换为明文密码), 根据现网环境增加被管网元的ip, 用户和密码信息列表 +* 运行脚本cpsshkey.sh, 将公钥拷贝至被管网元 +* 运行ssh root@192.168.4.133验证是否可以无密码登录 +* 执行成功后, 为了防止密码泄露,清除掉nehosts文件的密码信息 + +```bash +[root@ems bin]# cat nehosts +# host user password +# Example: 192.168.4.133 root password +192.168.4.133 root ****** +192.168.4.134 root ****** +[root@ems bin]# ./cpsshkey.sh +[root@ems bin]# ssh root@192.168.4.133 +``` + +## 3 启动和停止OMC + +### 3.1 系统服务启动 + +```bash +# systemctl enable restagent.service +# systemctl enable crontask.service +# systemctl enable sshsvc.service +# systemctl enable captrace.service +# systemctl daemon-reload +``` + +执行上述命令后,它被设置为作为 systemd 服务运行。 + +### 3.2 手动启动/查询/停止OMC + +您可以按如下方式启动,查询状态,停止和重新启动OMC, 以下命令可通过/usr/local/omc/bin/omcsvc.sh脚本一次性执行: + +```bash +# cd /usr/local/omc/bin +# ./omcsvc.sh start/stop/restart/status +``` + +单个OMC进程的执行命令如下, 启动/状态/停止/重启: + +```bash +# systemctl start restagent.service +# systemctl start crontask.service +# systemctl start sshsvc.service +# systemctl start captrace.service +``` + +```bash +# systemctl status restagent.service +# systemctl status crontask.service +# systemctl status sshsvc.service +# systemctl status captrace.service +``` + +```bash +# systemctl stop restagent.service +# systemctl stop crontask.service +# systemctl stop sshsvc.service +# systemctl stop captrace.service +``` + +```bash +# systemctl restart restagent.service +# systemctl restart crontask.service +# systemctl restart sshsvc.service +# systemctl restart captrace.service +``` + +## 4 问题定位跟踪 + +OMC restagent程序的配置文件在restagent.yaml,trace级别的日志通常在调试系统时使用,正常运行级别为debug,如下配置项所示: + +```yaml +logger: + file: /usr/local/omc/log/restagent.log + level: debug + duration: 24 + count: 90 +``` + +OMC crontask程序的配置文件在crontask.yaml,trace级别的日志通常在调试系统时使用,正常运行级别为debug,如下配置项所示: + +```yaml +logger: + file: /usr/local/omc/log/crontask.log + level: trace + duration: 24 + count: 90 +``` + +OMC sshsvc程序的配置文件在sshsvc.yaml,日志配置项如下所示: + +```json +logger: + file: /usr/local/omc/log/sshsvc.log + level: debug + duration: 24 + count: 30 +``` + +OMC captrace程序的配置文件在capconf.yaml,日志配置项如下所示: + +```json +logger: + file: /usr/local/omc/log/captrace.log + level: trace + duration: 24 + count: 10 +``` + +## 5 管理核心网系统 + +通过浏览器输入:[http://192.168.0.229:8888](http://192.168.0.229:8888) diff --git a/docs/02-5GC OMC http restful external intefaces v0.7.pdf b/docs/02-5GC OMC http restful external intefaces v0.7.pdf new file mode 100644 index 0000000..331d7f5 Binary files /dev/null and b/docs/02-5GC OMC http restful external intefaces v0.7.pdf differ diff --git a/docs/02-5GC OMC http restful external intefaces.md b/docs/02-5GC OMC http restful external intefaces.md new file mode 100644 index 0000000..124c22d --- /dev/null +++ b/docs/02-5GC OMC http restful external intefaces.md @@ -0,0 +1,1065 @@ +# 5GC OMC Http External Restful Interfaces + +## 1 状态管理 + +* URI: + + ```uri + /api/rest/systemManagement/v1/elementType/{elementTypeValue}/objectType/systemState + ``` + + 说明: + + ```Tips + ** elementTypeValue=smf/amf/..查询的网元网元类型 + ``` +* Method: + + GET +* Return: + + ```json + + "data": [ + { + "AMF_0": { + "error": { + "errorCode": "1", + "errorInfo": "Internal server error, NF connnect refused" + }, + "ipAddress": "192.168.2.188" + } + }, + { + "SMF_0": { + "ipAddress": "192.168.1.232", + "systemState": { + "capability": 10000, + "cpuUsage": { + "nfCpuUsage": 2, + "sysCpuUsage": 52 + }, + "diskSpace": { + "partitionInfo": [ + { + "total": 1920, + "used": 0 + }, + { + "total": 393, + "used": 13 + }, + { + "total": 48700, + "used": 32431 + }, + { + "total": 1965, + "used": 0 + }, + { + "total": 5, + "used": 0 + }, + { + "total": 1965, + "used": 0 + }, + { + "total": 55, + "used": 55 + }, + { + "total": 63, + "used": 63 + }, + { + "total": 91, + "used": 91 + }, + { + "total": 49, + "used": 49 + }, + { + "total": 55, + "used": 55 + }, + { + "total": 73, + "used": 73 + }, + { + "total": 91, + "used": 91 + }, + { + "total": 1475, + "used": 206 + }, + { + "total": 49, + "used": 49 + }, + { + "total": 393, + "used": 13 + }, + { + "total": 393, + "used": 0 + }, + { + "total": 73, + "used": 73 + }, + { + "total": 63, + "used": 63 + } + ], + "partitionNum": 19 + }, + "expiryDate": "2025-02-28", + "memUsage": { + "nfUsedMem": 163992, + "sysMemUsage": 1345, + "totalMem": 4025608 + }, + "serialNum": "13740126", + "version": "1.5.3.2" + } + } + }, + { + "SMF_1": { + "ipAddress": "192.168.1.173", + "systemState": { + "capability": 10000, + "cpuUsage": { + "nfCpuUsage": 0, + "sysCpuUsage": 69 + }, + "diskSpace": { + "partitionInfo": [ + { + "total": 3966, + "used": 0 + }, + { + "total": 797, + "used": 0 + }, + { + "total": 200559, + "used": 5968 + }, + { + "total": 3987, + "used": 0 + }, + { + "total": 5, + "used": 0 + }, + { + "total": 3987, + "used": 0 + }, + { + "total": 797, + "used": 0 + } + ], + "partitionNum": 7 + }, + "expiryDate": "2024-12-31", + "memUsage": { + "nfUsedMem": 212136, + "sysMemUsage": 720, + "totalMem": 8167360 + }, + "serialNum": "13740272", + "version": "1.5.3.3" + } + } + } + ] + } + ``` + +## 2 故障管理 + +### 2.1 告警上报 + +* URI + + ```uri + /api/rest/faultManagement/v1/elementType/{elementTypeValue}/objectType/alarms + ``` +* Method + + POST +* Relation + + NF->OMC +* Body + + ```json + type Alarm struct { + AlarmSeq int `json:"alarmSeq"` + AlarmId string `json:"alarmId"` + NeId string `json:"neId"` + AlarmCode int `json:"alarmCode"` + AlarmTitle string `json:"alarmTitle"` + EventTime string `json:"eventTime"` + AlarmType string `json:"alarmType"` + OrigSeverity string `json:"origSeverity"` + PVFlag string `json:"pvFlag"` + NeName string `json:"neName"` + NeType string `json:"neType"` + ObjectName string `json:"objectName"` + LocationInfo string `json:"locationInfo"` + Province string `json:"province"` + AlarmStatus int `json:"alarmStatus"` + SpecificProblem string `json:"specificProblem"` + SpecificProblemID string `json:"specificProblemID"` + AddInfo string `json:"addInfo"` + } + ``` + +### 2.2 获取网元告警 + +* URI + + ```uri + /api/rest/faultManagement/v1/elementType/{elementTypeValue}/objectType/alarms + ``` +* Method + + GET +* Relation + + OMC->NF +* Body + + n/a +* Return + + ```json + type Alarms struct { + Alarms []struct { + AlarmSeq int `json:"alarmSeq"` + AlarmId string `json:"alarmId"` + NeId string `json:"neId"` + AlarmCode int `json:"alarmCode"` + AlarmTitle string `json:"alarmTitle"` + EventTime string `json:"eventTime"` + AlarmType string `json:"alarmType"` + OrigSeverity string `json:"origSeverity"` + PVFlag string `json:"pvFlag"` + NeName string `json:"neName"` + NeType string `json:"neType"` + ObjectName string `json:"objectName"` + LocationInfo string `json:"locationInfo"` + Province string `json:"province"` + AlarmStatus int `json:"alarmStatus"` + SpecificProblem string `json:"specificProblem"` + SpecificProblemID string `json:"specificProblemID"` + AddInfo string `json:"addInfo"` + } `json:"Alarms"` + } + ``` + +## 3 配置管理 + +### 3.1 参数配置表 + +* 类型定义(type) + + * string + + > filter指定字符串长度,如:"filter": "6~100" , 字符串的长度范围,如果单个数字表示最大长度 + > + * ipv4 + + > filter忽略 + > + * ipv6 + + > filter忽略 + > + * int + + > filter指定整型数的范围,如:"filter": "100~999" + > + * enum + + > "filter": '{"0": "http", "1": "https"}' + > + * bool + + > "filter": '{"0": "false", "1": "true"}' + > + * regex + + > filter为正则表达式 + > +* 可选(optional) + + * true,默认值,表示该字段为可选填,没有写该属性项时optional为true(兼容以前配置文件) + * false,表示必填项 +* Example + + ```yaml + UDM: + system: + display: "System" + list: + - name: "serviceIP" + type: "ipv4" + value: "172.16.5.140" + optional: "false" + access: "read-write" + filter: '' + display: "Service IP" + comment: "" + - name: "servicePort" + type: "int" + value: "8080" + access: "read-write" + filter: "0~65535" + display: "Service Port" + comment: "0~65535" + subsSmfSelection: + display: "Subs Smf Selection" + array: + - name: "index" + type: "int" + value: "0" + access: "read-write" + filter: '0~15' + display: "Index" + comment: "0~15" + - name: "name" + type: "string" + value: 'def_ambr' + access: "read-write" + filter: '^.{1,32}$' + display: "Name" + comment: "0~32" + - name: "snssai" + type: "string" + value: '1-000001' + access: "read-write" + filter: '^\d{1,3}[A-Fa-f0-9]{6}$' + display: "Snssai" + comment: "" + - name: "dnnList" + type: "int" + value: '0' + access: "read-write" + filter: '0~3' + display: "Dnn List" + comment: "" + array: + - name: "index" + type: "int" + value: "0" + access: "read-write" + filter: '0~15' + display: "index" + comment: "0~15" + - name: "dnn" + type: "string" + value: 'cmnet' + access: "read-write" + filter: '^.{1,32}$' + display: "Dnn" + comment: "0~32" + - name: "defaultDnnInd" + type: "bool" + value: 'true' + access: "read-write" + filter: 'false;true;' + display: "default Dnn Indicator" + comment: "" + ``` + + 完整文件具体请参考 udm_param_config.yaml + +### 3.2 获取参数 + +* URI + + ```uri + /api/rest/systemManagement/v1/elementType/{elementTypeValue}/objectType/config/{paraName}?loc={index0}/{paraName1}/{index1}/... + ``` + + 说明 + + ```Tips + elementTypeValue: udm, smf, amf... 网元类型 + udm paraName: system, subsUEAmbr, subsSmfSelection ... + 非array的参数,忽略loc + ``` +* Params + + * loc 多层表的定位信息 +* Method + + > GET + > +* Return + + ```uri + /api/rest/systemManagement/v1/elementType/udm/objectType/config/system + ``` + + ```json + { + "data": [ + { + "serviceIP": "172.16.5.140", + "servicePort": "8080", + "...": "..." + } + ] + } + ``` + + ```uri + /api/rest/systemManagement/v1/elementType/udm/objectType/config/subsSmfSelection?loc=1/dnnList + ``` + + ```json + { + "data": [ + { + "index": "0", + "dnn": "cmnet", + "...": "..." + }, + { + "index": "1", + "dnn": "ims", + "...": "..." + } + ] + } + ``` + +### 3.3 配置参数 + +* URI + + ```uri + /api/rest/systemManagement/v1/elementType/{elementTypeValue}/objectType/config/{paraName}?loc={index0}/{paraName1}/{index1} + ``` +* Params + + * loc 多层表的定位信息 +* Method + + > POST/PUT/DELETE + > + + 说明: + + ```Tips + 单层表不支持POST/DELETE操作 + ``` +* Body + + ```json + { + "serviceIP": "172.16.5.140", + "servicePort": "8080", + "...": "..." + } + ``` + + 说明: + + ```Tips + DELETE操作不带Body + ``` + +### 3.4 创建网元 + +* URI + + ```uri + /api/rest/systemManagement/v1/elementType/{elementTypeValue}/objectType/neInfo + ``` +* Params + + N/A +* Method + + > POST + > +* Body + + ```json + { + + } + ``` + +## 4 性能管理 + +### 4.1 任务管理 + +* URI + + ```uri + /api/rest/performanceManagement/v1/elementType/{elementTypeValue}/objectType/measureTask?id={taskId1}&id={taskId2} + ``` +* Method + + POST/PUT/DELETE/PATCH +* Params + + taskId=1&taskId=2 + + * POST: 增加测量任务,激活任务,不带id参数,id在body + * PUT: 修改测量任务,激活任务,不带id参数,id在body + * DELETE:删除测量任务,不需要带body,带id参数,可带多个 + * PATCH: 暂停测量任务,不需要带body,带id参数,可带多个 + + 测量任务创建/修改后暂时存储在OMC数据库,激活任务时再下发到网元 +* Relation NF + + OMC -> NF/NF -> OMC +* Body + + 下发测量任务的报文结构 + + ```json + type MeasureTask struct { + Tasks []struct { + Id int `json:"Id"` + + StartTime string `json:"StartTime"` + EndTime string `json:"EndTime"` + + Schedule struct { + Type string `json:"Type"` // 计划类型:Weekly/Monthly, 如果type为"", 则任务以StartTime和EndTime为条件进行统计, 否则以Shedule方式进行 + Days []int `json:"Days"` // Weekly: [0,1,...5,6],0~6表示星期日~星期六, Monthly: [1,2,3,...,30,31]一个月的几天 + Periods []struct { + Start string `json:"Start"` // 零点或者零点加测量粒度的整数倍 00:15:00 + End string `json:"End"` // 零点加测量粒度的整数倍 08:45:00, 16:15:00 + } `json:"Periods"` + } `json:"Schedule"` + + GranulOption string `json:"GranulOption"` // 测量粒度选项:15M/30M/60M/24H + + KPISet []struct { + Code string `json:"Code"` // 统计编码 如:SMFHA01 + KPIs []string `json:"KPIs` // 指标项集合 ["SMF.AttCreatePduSession", "SMF.AttCreatePduSession._Dnn"] + } `json:"KPISet"` + } `json:"Tasks"` + + NotifyUrl string `json:"NotifyUrl"` /* 数据上报URL "http://x.x.x.x:xxxx/api/rest/performanceManagement/v1/elementType/smf/objectType/measureReport" */ + } + ``` +* Return + +### 4.2 订阅任务数据上报 + +* URI + + ```uri + /api/rest/performanceManagement/v1/elementType/{elementTypeValue}/objectType/measureReport + ``` +* Method + + POST +* Relation + + NF -> OMC +* Body + + 网元返回测量数据的报文结构 + + ```json + type MeasureReport struct { + Id int `json:"Id"` + Timestamp string `json:"TimeStamp"` + NeName string `json:"NeName"` + RmUID string `json:"rmUID"` + NeType string `json:"NeType"` + + Report struct { + Period struct { + StartTime string `json:"StartTime"` + EndTime string `json:"EndTime"` + } `json:"Period"` + + Datas []struct { + Code string `json:"Code"` // 统计编码 如:SMFHA01 + KPIs []struct { + KPIID string `json:"KPIID"` // 指标项, 如: SMF.AttCreatePduSession._Dnn + KPIValues []struct { + Name string `json:"Name"` // 单个的写"Total", 或者指标项有多个测量项,如Dnn的名称写对应的Dnn"cmnet"/"ims" + Value int64 `json:"Value"` + } `json:"KPIValues"` + } `json:"KPIs"` + } `json:"Datas"` + } `json:"Report"` + } + ``` + +### 4.3 黄金指标上报 + +* URI + + ```uri + /api/rest/performanceManagement/v1/elementType/{elementTypeValue}/objectType/kpiReport/{index} + ``` + + index取值范围: 0-1439 +* Method + + POST +* Body + + ```json + type KpiReport struct { + Timestamp string `json:"TimeStamp"` + Task struct { + Period struct { + StartTime string `json:"StartTime"` + EndTime string `json:"EndTime"` + } `json:"Period"` + NE struct { + NEName string `json:"NEName"` + RmUID string `json:"rmUID"` + NeType string `json:"NeType"` + KPIs []struct { + KPIID string `json:"KPIID"` + Value int `json:"Value"` + Err string `json:"Err"` + } `json:"KPIs"` + } `json:"NE"` + } `json:"Task"` + } + ``` + +### 4.4 测量数据主动上报 + +* URI + + ```uri + /api/rest/performanceManagement/v1/elementType/{elementTypeValue}/objectType/measurement/{index} + ``` +* Method + + POST +* Relations + + NF -> OMC +* Params + + NA +* Body + + 网元主动上报测量数据的报文结构 + + ```json + type Measurement struct { + Index int `json:"Index"` // 1天当中测量时间粒度(如15分钟)的切片索引: 0~95 + Timestamp string `json:"TimeStamp"` + NeName string `json:"NeName"` // UserLabel + RmUID string `json:"rmUID"` + NeType string `json:"NeType"` // 网元类型 + PmVersion string `json:"PmVersion"` // 性能数据版本号 + Dn string `json:"Dn"` // (???)网元标识, 如:RJN-CMZJ-TZ,SubNetwork=5GC88,ManagedElement=SMF53456,SmfFunction=53456 + Period string `json:"Period"` // 测量时间粒度选项:5/15/30/60 + TimeZone string `json:"TimeZone"` // 时区, 如: "UTC+8" + StartTime string `json:"StartTime"` + + Datas []struct { + ObjectType string `json:"ObjectType"` // 网络资源类别名称, Pm指标项列表中为空间粒度 如:SmfFunction + KPIs []struct { + KPIID string `json:"KPIID"` // 指标项, 如: SMF.AttCreatePduSession._Dnn + KPIValues []struct { + Name string `json:"Name"` // 单个的写"Total", 或者指标项有多个测量项,如Dnn的名称写对应的Dnn"cmnet"/"ims" + Value int64 `json:"Value"` + } `json:"KPIValues"` + } `json:"KPIs"` + } `json:"Datas"` + } + ``` +* Return + + Code: 204, no content + +### 4.5 测量数据获取/补采 + +* URI + + ```uri + /api/rest/performanceManagement/v1/elementType/{elementTypeValue}/objectType/measurement/{index} + ``` +* Method + + GET +* Relations + + OMC -> NF +* Params + + NA +* Body + + NA +* Return + + 网元返回测量数据的报文结构 + + ```json + type Measurement struct { + Index int `json:"Index"` // 1天中测量时间粒度(如15分钟)的切片索引: 0~95 + Timestamp string `json:"TimeStamp"` + NeName string `json:"NeName"` // UserLabel + RmUID string `json:"rmUID"` + NeType string `json:"NeType"` // 网元类型 + PmVersion string `json:"PmVersion"` // 性能数据版本号 + Dn string `json:"Dn"` // (???)网元标识, 如:RJN-CMZJ-TZ,SubNetwork=5GC88,ManagedElement=SMF53456,SmfFunction=53456 + Period string `json:"Period"` // 测量时间粒度选项:5/15/30/60 + TimeZone string `json:"TimeZone"` + StartTime string `json:"StartTime"` + + Datas []struct { + ObjectType string `json:"ObjectType"` // 网络资源类别名称, Pm指标项列表中为空间粒度 如:SmfFunction + KPIs []struct { + KPIID string `json:"KPIID"` // 指标项, 如: SMF.AttCreatePduSession._Dnn + KPIValues []struct { + Name string `json:"Name"` // 单个的写"Total", 或者指标项有多个测量项,如Dnn的名称写对应的Dnn"cmnet"/"ims" + Value int64 `json:"Value"` + } `json:"KPIValues"` + } `json:"KPIs"` + } `json:"Datas"` + } + ``` + +## 5 跟踪管理 + +### 5.1 订阅管理 + +* 创建订阅 + + * URI + + ```uri + /api/rest/traceManagement/v1/subscriptions + ``` + * Method + + POST + * Relations + + OMC front-end->OMC back-end, OMC -> NF + * Body + + ```json + type TraceTask struct { + TraceType string `json:"traceType"` + StartTime string `json:"startTime"` + EndTime string `json:"endTime"` + Imsi string `json:"imsi"` + Msisdn string `json:"msisdn"` + SrcIp string `json:"srcIp"` + DstIp string `json:"dstIp"` + SignalPort int16 `json:"signalPort"` + NeType string `json:"neType"` + NeId string `json:"neId"` + UeIp string `json:"ueIp"` + Interfaces []string `json:"interfaces"` + } + ``` + + Example: + + ```json + { + "traceType": "Interface", + "startTime": "2023-07-04 13:00:00", + "endTime": "2023-07-04 19:00:00", + "neType": "UDM", + "neId": "SZ_01", + "interfaces": ["N8","N10"] + } + ``` + * Return + + Code=204 non-content +* 修改订阅 + + * URI + + ```uri + /api/rest/traceManagement/v1/subscriptions + ``` + * Method + + PUT + * Relations + + OMC front-end->OMC back-end, OMC -> NF + * Body + + ```json + type TraceTask struct { + Id int `json:"id"` + TraceType string `json:"traceType"` + StartTime string `json:"startTime"` + EndTime string `json:"endTime"` + Imsi string `json:"imsi"` + Msisdn string `json:"msisdn"` + SrcIp string `json:"srcIp"` + DstIp string `json:"dstIp"` + SignalPort int16 `json:"signalPort"` + NeType string `json:"neType"` + NeId string `json:"neId"` + UeIp string `json:"ueIp"` + Interfaces []string `json:"interfaces"` + } + ``` + + Example: + + ```json + { + "id": 1, + "traceType": "Interface", + "startTime": "2023-07-04 13:00:00", + "endTime": "2023-07-04 19:00:00", + "neType": "UDM", + "neId": "SZ_01", + "interfaces": ["N8","N10", "N11"] + } + ``` + * Return + + Code=204 non-content +* 删除订阅 + + * URI + + ```uri + /api/rest/traceManagement/v1/subscriptions?id={id1}&id={id2} + ``` + * Method + + DELETE + * Relations + + OMC front-end->OMC back-end, OMC -> NF + * Params + + id:订阅任务id,支持多个 + * Body + + NA + * Return + + Code=204, non-content +* 查询订阅 (暂不实现,直接从数据库查询) + + * URI + 查询单个订阅: + + ```uri + /api/rest/traceManagement/v1/subscriptions?id={id} + ``` + + 查询所有订阅: + + ```http + /api/rest/traceManagement/v1/subscriptions + ``` + * Method + + GET + * Body + + NA + * Return + + ```json + { + "data": [ + { + "id": 1, + "traceType": "Interface", + "startTime": "2023-07-04 13:00:00", + "endTime": "2023-07-04 19:00:00", + "neType": "UDM", + "neId": "SZ_01", + "interfaces": ["N8","N10", "N11"] + } + ] + } + ``` + +## 6 操作维护 + +### 6.1 MML命令 + +#### 6.1.1 MML命令格式 + +* 命令格式 + + ```mml + oper object:parameter1={value1},parameter2={value2},parameter3={value3}; + ``` + + * 操作(operation) + + * 根据实际操作可选用如下动作,如果没有合适的可自行增加,要做到简洁直观 + + ```list + add: 增加 + mod(set):修改/设置 + del(rmv):删除 + dsp(lst):查询显示 + bak:备份 + exp:导出 + imp:导入 + bat: 批量 + exec(run):执行 + act/dea: 激活/去激活 + ``` + * 与对象之间采用空格分隔 + * 对象(object) + + * 操作的对象,如签约数据(sub/udmuser)/鉴权数据(auth/authdat), n7接口(n7server) + * 对象名称用所操作对象的英文名(或缩写), 为字母或者数字的组合, 不含空格, "-", "_"等特殊字符 + * 使用":"与参数进行分隔 + * 参数(param) + + * 参数名采用英文常用名/约定俗成的缩写/缩略语等, 如imsi,msisdn,ip,port等, 为字母或者数字的组合, 不含空格, "-", "_"等特殊字符 + * 参数值为字符串, 如有":", ",", ";", "\\"字符, 需加"\\"进行转义 + * 参数之间用","进行分隔 + * 命令结束符";", 操作/对象/参数均采用小写字母(HW采用的都是大写字母) +* 目前现有的各个网元的命令格式 + + 除了UDM签约数据/鉴权数据的MML格式和上述格式基本一致, 各个网元的系统参数MML都不一样, 需统一成上述格式 + + * UDM鉴权数据/签约数据 + + ```mml + add authdat:imsi=460000100000030,ki=805DADC6E8A54A0D59D622C7A04D08E0,amf=8000,algo=0,opc=CF7FD414E05754CFE08B4FE7F2EF2A36 + ``` + * UDM系统参数 + + ```mml + set n8ip 172.16.5.130 + ``` + * AMF系统参数 + + ```mml + set n8_ip 192.168.1.121 + ``` + * SMF/UPF系统参数 + + ```mml + set n7 server + ``` + +### 6.2 MML接口 + +* URI + + ```uri + /api/rest/opeartionManagement/v1/elementType/{elementTypeValue}/objectType/mml?ne_id={neId} + ``` +* Related NF + + OMC front-end -> OMC back-end + + OSS -> OMC (北向接口) +* Params + + ne_id={neId} +* Method + + POST +* Body + + ```json + { + "mml": [ + "date", + "list ver", + "list lic", + "list comm" + ] + } + ``` +* Return + + ```json + { + "data": [ + "2023-05-11 17:52:32.37333745 +0800 CST m=+28762.188435351\n", + "16.1.1\n", + "Expiry date: 2024-12-31, sn: 13740272\n", + "COMMAND NOT FOUND, opr: list, obj: comm\n" + ] + } + ``` + +## 7 北向资源配置数据接口 + +### 7.1 查询资源数据接口 + +* URI + + ```uri + /api/rest/resourceManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/{objectTypeValue}?rmUIDs={rmUIDValues}&fields={attributeNames} + ``` +* Related NF + + OMC -> NF + + OSS -> OMC (北向接口) +* Params + + * rmUIDs={rmUIDValues} + + 可携带多额rmUID(统一资源定位符), OMC->NF不带 + * fields={attributeNames} + + 属性域集合={属性名列表}, 指定资源对象多个属性名的英文逗号分割,一个属性名时无英文逗号。 +* Method + + GET +* Body + + ```json + GET /api/rest/resourceManagement/v1/elementType/SMF/objectType/ManagedElement?rmUIDs=1101AGTHXSMF0000015704000100&fields=UserLabel HTTP/1.1 + accessToken: 52661fbd-6b84-4fc2-aa1e-17879a5c6c9b + Host: serverIP:port + Content-Type: application/json; charset=UTF-8 + Content-Length:… + { + } + ``` +* Return + + ```json + HTTP/1.1 200 OK + Content - Type: application/json + Content-Length:… + { + "data": [{ + "rmUID": "1101AGTHXSMF0000015704000100", + "UserLabel": "SMFRJBJJC01", + ... + }] + } + ``` diff --git a/docs/03-5GC OMC 北向接口.docx b/docs/03-5GC OMC 北向接口.docx new file mode 100644 index 0000000..957ce7d Binary files /dev/null and b/docs/03-5GC OMC 北向接口.docx differ diff --git a/docs/03-5GC OMC 北向接口.pdf b/docs/03-5GC OMC 北向接口.pdf new file mode 100644 index 0000000..7841743 Binary files /dev/null and b/docs/03-5GC OMC 北向接口.pdf differ diff --git a/docs/04-5GC OMC Architecture v0.81.pdf b/docs/04-5GC OMC Architecture v0.81.pdf new file mode 100644 index 0000000..6230120 Binary files /dev/null and b/docs/04-5GC OMC Architecture v0.81.pdf differ diff --git a/docs/04-5GC OMC Architecture.md b/docs/04-5GC OMC Architecture.md new file mode 100644 index 0000000..c218782 --- /dev/null +++ b/docs/04-5GC OMC Architecture.md @@ -0,0 +1,24 @@ +# 5GC OMC架构及功能 + +## 架构图 + +![1689742764754](image/04-5GCOMCArchitecturev0.81/1689742764754.png) + + +## 开发平台 + +1. 采用B/S模式,运行在linux系统,支持x86和arm平台 +2. 前端:html+css+js +3. 后端:Golang+Nginx+MySQL + +## 功能清单 + +1. 拓扑管理(State/Monitor):网络拓扑,系统状态等 +2. 故障管理(FM):活动告警/历史告警等 +3. 配置管理(CM):网元管理,参数配置等 +4. 性能管理(PM):性能统计相关指标项的订阅任务,数据报表,性能门限等 +5. 操作维护(MML):MML命令操作,系统维护等 +6. 日志管理(Log):操作日志,安全日志,告警日志,北向日志等 +7. 跟踪管理(Trace):信令跟踪任务创建,信令分析等 +8. 安全管理(Security):用户管理,用户组管理,权限管理等 +9. 北向接口(NBI: Northbound Interface): 北向接口服务,资源配置数据,性能统计数据, 性能黄金指标, 告警上报, 4A等 diff --git a/docs/05-5GC OMC restful intefaces v0.75.pdf b/docs/05-5GC OMC restful intefaces v0.75.pdf new file mode 100644 index 0000000..0260261 Binary files /dev/null and b/docs/05-5GC OMC restful intefaces v0.75.pdf differ diff --git a/docs/05-5GC OMC restful intefaces.md b/docs/05-5GC OMC restful intefaces.md new file mode 100644 index 0000000..ac5e3d2 --- /dev/null +++ b/docs/05-5GC OMC restful intefaces.md @@ -0,0 +1,1443 @@ +# EMS restful interfaces + +## 1. 状态管理 + +* URI: + + ```uri + /api/rest/systemManagement/v1/elementType/{elementTypeValue}/objectType/systemState + ``` + + 说明: + + ```Tips + ** elementTypeValue=smf/amf/..查询的网元网元类型 + ``` +* Method: + + GET +* Return: + + NF -> OMC BE的json结构 + + ``` + type SysState struct { + HostName string `json:"hostName"` // linux命令: hostname + OsInfo string `json:"osInfo"` // linux命令: uname -a + DbInfo string `json:"dbInfo"` // 网元如果有db, 显示数据库名和版本信息, OMC: mysql --version + Version string `json:"version"` // 软件版本信息: 16.1.1 + IpAddr []string `json:"ipAddr"` // 网管的ipv4和ipv6 + Port uint16 `json:"port"` // 用于网管的port + Capability uint32 `json:"capability"` + SerialNum string `json:"serialNum"` + ExpiryDate string `json:"expiryDate"` + HardwareInfo struct { + CPUs int `json:"cpus"` // 主机(裸机/虚拟机)的cpu个数 + Memory int `json:"memory"` // 主机(裸机/虚拟机): 配置的内存 + } `json:"hardwareInfo"` + CpuUsage struct { + NfCpuUsage uint16 `json:"nfCpuUsage"` + SysCpuUsage uint16 `json:"sysCpuUsage"` + } `json:"cpuUsage"` + MemUsage struct { + TotalMem uint32 `json:"totalMem"` + NfUsedMem uint32 `json:"nfUsedMem"` + SysMemUsage uint16 `json:"sysMemUsage"` + } `json:"memUsage"` + DiskSpace struct { + PartitionNum uint8 `json:"partitionNum"` + PartitionInfo []struct { + Total uint32 `json:"total"` // MB + Used uint32 `json:"used"` // MB + } `json:"partitionInfo"` + } `json:"diskSpace"` + //Timestamp string `json:"timestamp"` + } + ``` + +* Example: + OMC BE -> OMC FE + ```json + + "data": [ + { + "AMF_0": { + "error": { + "errorCode": "1", + "errorInfo": "Internal server error, NF connnect refused" + }, + "ipAddress": "192.168.2.188" + } + }, + { + "SMF_0": { + "ipAddress": "192.168.1.232", + "systemState": { + "capability": 10000, + "cpuUsage": { + "nfCpuUsage": 2, + "sysCpuUsage": 52 + }, + "diskSpace": { + "partitionInfo": [ + { + "total": 1920, + "used": 0 + }, + { + "total": 393, + "used": 13 + }, + { + "total": 48700, + "used": 32431 + }, + { + "total": 1965, + "used": 0 + }, + { + "total": 5, + "used": 0 + }, + { + "total": 1965, + "used": 0 + }, + { + "total": 55, + "used": 55 + }, + { + "total": 63, + "used": 63 + }, + { + "total": 91, + "used": 91 + }, + { + "total": 49, + "used": 49 + }, + { + "total": 55, + "used": 55 + }, + { + "total": 73, + "used": 73 + }, + { + "total": 91, + "used": 91 + }, + { + "total": 1475, + "used": 206 + }, + { + "total": 49, + "used": 49 + }, + { + "total": 393, + "used": 13 + }, + { + "total": 393, + "used": 0 + }, + { + "total": 73, + "used": 73 + }, + { + "total": 63, + "used": 63 + } + ], + "partitionNum": 19 + }, + "expiryDate": "2025-02-28", + "memUsage": { + "nfUsedMem": 163992, + "sysMemUsage": 1345, + "totalMem": 4025608 + }, + "serialNum": "13740126", + "version": "1.5.3.2" + } + } + }, + { + "SMF_1": { + "ipAddress": "192.168.1.173", + "systemState": { + "capability": 10000, + "cpuUsage": { + "nfCpuUsage": 0, + "sysCpuUsage": 69 + }, + "diskSpace": { + "partitionInfo": [ + { + "total": 3966, + "used": 0 + }, + { + "total": 797, + "used": 0 + }, + { + "total": 200559, + "used": 5968 + }, + { + "total": 3987, + "used": 0 + }, + { + "total": 5, + "used": 0 + }, + { + "total": 3987, + "used": 0 + }, + { + "total": 797, + "used": 0 + } + ], + "partitionNum": 7 + }, + "expiryDate": "2024-12-31", + "memUsage": { + "nfUsedMem": 212136, + "sysMemUsage": 720, + "totalMem": 8167360 + }, + "serialNum": "13740272", + "version": "1.5.3.3" + } + } + } + ] + } + ``` + +## 2 故障管理 + +### 2.1 告警上报 + +* URI + + ```uri + /api/rest/faultManagement/v1/elementType/{elementTypeValue}/objectType/alarms + ``` +* Method + + POST +* Relations + + NF->OMC +* Body + + ```json + type Alarm struct { + AlarmSeq int `json:"alarmSeq"` + AlarmId string `json:"alarmId"` + NeId string `json:"neId"` + AlarmCode int `json:"alarmCode"` + AlarmTitle string `json:"alarmTitle"` + EventTime string `json:"eventTime"` + AlarmType string `json:"alarmType"` + OrigSeverity string `json:"origSeverity"` + PVFlag string `json:"pvFlag"` + NeName string `json:"neName"` + NeType string `json:"neType"` + ObjectName string `json:"objectName"` + LocationInfo string `json:"locationInfo"` + Province string `json:"province"` + AlarmStatus int `json:"alarmStatus"` + SpecificProblem string `json:"specificProblem"` + SpecificProblemID string `json:"specificProblemID"` + AddInfo string `json:"addInfo"` + } + ``` + +### 2.2 获取网元告警 + +* URI + + ```uri + /api/rest/faultManagement/v1/elementType/{elementTypeValue}/objectType/alarms + ``` +* Method + + GET +* Relations + + OMC->NF +* Body + + n/a +* Return + + ```json + type Alarms struct { + Alarms []struct { + AlarmSeq int `json:"alarmSeq"` + AlarmId string `json:"alarmId"` + NeId string `json:"neId"` + AlarmCode int `json:"alarmCode"` + AlarmTitle string `json:"alarmTitle"` + EventTime string `json:"eventTime"` + AlarmType string `json:"alarmType"` + OrigSeverity string `json:"origSeverity"` + PVFlag string `json:"pvFlag"` + NeName string `json:"neName"` + NeType string `json:"neType"` + ObjectName string `json:"objectName"` + LocationInfo string `json:"locationInfo"` + Province string `json:"province"` + AlarmStatus int `json:"alarmStatus"` + SpecificProblem string `json:"specificProblem"` + SpecificProblemID string `json:"specificProblemID"` + AddInfo string `json:"addInfo"` + } `json:"Alarms"` + } + ``` + +## 3. 配置管理 + +### 3.1 参数配置表 + +* 类型定义(type) + + * string + + > filter指定字符串长度,如:"filter": "6~100" , 字符串的长度范围,如果单个数字表示最大长度 + > + * ipv4 + + > filter忽略 + > + * ipv6 + + > filter忽略 + > + * int + + > filter指定整型数的范围,如:"filter": "100~999" + > + * enum + + > "filter": '{"0": "http", "1": "https"}' + > + * bool + + > "filter": '{"0": "false", "1": "true"}' + > + * regex + + > filter为正则表达式 + > +* 可选(optional) + + * true,默认值,表示该字段为可选填,没有写该属性项时optional为true(兼容以前配置文件) + * false,表示必填项 +* Example + + ```yaml + UDM: + system: + display: "System" + list: + - name: "serviceIP" + type: "ipv4" + value: "172.16.5.140" + optional: "false" + access: "read-write" + filter: '' + display: "Service IP" + comment: "" + - name: "servicePort" + type: "int" + value: "8080" + access: "read-write" + filter: "0~65535" + display: "Service Port" + comment: "0~65535" + subsSmfSelection: + display: "Subs Smf Selection" + array: + - name: "index" + type: "int" + value: "0" + access: "read-write" + filter: '0~15' + display: "Index" + comment: "0~15" + - name: "name" + type: "string" + value: 'def_ambr' + access: "read-write" + filter: '^.{1,32}$' + display: "Name" + comment: "0~32" + - name: "snssai" + type: "string" + value: '1-000001' + access: "read-write" + filter: '^\d{1,3}[A-Fa-f0-9]{6}$' + display: "Snssai" + comment: "" + - name: "dnnList" + type: "int" + value: '0' + access: "read-write" + filter: '0~3' + display: "Dnn List" + comment: "" + array: + - name: "index" + type: "int" + value: "0" + access: "read-write" + filter: '0~15' + display: "index" + comment: "0~15" + - name: "dnn" + type: "string" + value: 'cmnet' + access: "read-write" + filter: '^.{1,32}$' + display: "Dnn" + comment: "0~32" + - name: "defaultDnnInd" + type: "bool" + value: 'true' + access: "read-write" + filter: 'false;true;' + display: "default Dnn Indicator" + comment: "" + ``` + + 完整文件具体请参考 udm_param_config.yaml + +### 3.2 获取参数 + +* URI + + ```uri + /api/rest/systemManagement/v1/elementType/{elementTypeValue}/objectType/config/{paraName}?loc={index0}/{paraName1}/{index1}/... + ``` + + 说明 + + ```Tips + elementTypeValue: udm, smf, amf... 网元类型 + udm paraName: system, subsUEAmbr, subsSmfSelection ... + 非array的参数,忽略loc + ``` +* Params + + * loc 多层表的定位信息 +* Method + + > GET + > +* Return + + ```uri + /api/rest/systemManagement/v1/elementType/udm/objectType/config/system + ``` + + ```json + { + "data": [ + { + "serviceIP": "172.16.5.140", + "servicePort": "8080", + "...": "..." + } + ] + } + ``` + + ```uri + /api/rest/systemManagement/v1/elementType/udm/objectType/config/subsSmfSelection?loc=1/dnnList + ``` + + ```json + { + "data": [ + { + "index": "0", + "dnn": "cmnet", + "...": "..." + }, + { + "index": "1", + "dnn": "ims", + "...": "..." + } + ] + } + ``` + +### 3.3 配置参数 + +* URI + + ```uri + /api/rest/systemManagement/v1/elementType/{elementTypeValue}/objectType/config/{paraName}?loc={index0}/{paraName1}/{index1} + ``` +* Params + + * loc 多层表的定位信息 +* Method + + > POST/PUT/DELETE + > + + 说明: + + ```Tips + 单层表不支持POST/DELETE操作 + ``` +* Body + + ```json + { + "serviceIP": "172.16.5.140", + "servicePort": "8080", + "...": "..." + } + ``` + + 说明: + + ```Tips + DELETE操作不带Body + ``` + +### 3.4 创建/修改网元 + +* URI + + ```uri + /api/rest/systemManagement/v1/elementType/{elementTypeValue}/objectType/config/omcNeConfig + ``` +* Params + + N/A +* Method + + PUT +* Body + + ```json + type OmcNeConfig struct { + NeId string `json:"neId" xorm:"ne_id"` // 网元标识(内部), + RmUID string `json:"rmUID" xorm:"rm_uid"` // neUID/rmUID 网元唯一标识 + NeName string `json:"neName" xorm:"ne_name"` // 网元名称/友好名称(北向资源/性能等使用) + PvFlag string `json:"pvFlag" xorm:"pv_flag"` // 网元虚实性标识 VNF/PNF: 虚拟/物理 + Province string `json:"province" xorm:"province"` // 网元所在省份 + VendorName string `json:"vendorName" xorm:"vendor_name"` // 厂商名称 + // ManagedBy string `json:"managedBy" xorm:"managed_by"` // 管理ManagedElement的ManagementNode对象类的DN值 + Dn string `json:"dn" xorm:"dn"` // 资源里边的ManagedBy,性能的Dn,网络唯一标识 + } + ``` + +## 4 性能管理 + +### 4.1 任务管理 + +* URI + + ```uri + /api/rest/performanceManagement/v1/elementType/{elementTypeValue}/objectType/measureTask?id={taskId1}&id={taskId2} + ``` +* Method + + POST/PUT/DELETE/PATCH +* Params + + taskId=1&taskId=2 + + * POST: 增加测量任务,激活任务,不带id参数,id在body + * PUT: 修改测量任务,激活任务,不带id参数,id在body + * DELETE:删除测量任务,不需要带body,带id参数,可带多个 + * PATCH: 暂停测量任务,不需要带body,带id参数,可带多个 + + 测量任务创建/修改后暂时存储在OMC数据库,激活任务时再下发到网元 +* Relations + + OMC -> NF/NF -> OMC +* Body + + 下发测量任务的报文结构 + + ```json + type MeasureTask struct { + Tasks []struct { + Id int `json:"Id"` + + StartTime string `json:"StartTime"` + EndTime string `json:"EndTime"` + + Schedule struct { + Type string `json:"Type"` // 计划类型:Weekly/Monthly, 如果type为"", 则任务以StartTime和EndTime为条件进行统计, 否则以Shedule方式进行 + Days []int `json:"Days"` // Weekly: [0,1,...5,6],0~6表示星期日~星期六, Monthly: [1,2,3,...,30,31]一个月的几天 + Periods []struct { + Start string `json:"Start"` // 零点或者零点加测量粒度的整数倍 00:15:00 + End string `json:"End"` // 零点加测量粒度的整数倍 08:45:00, 16:15:00 + } `json:"Periods"` + } `json:"Schedule"` + + GranulOption string `json:"GranulOption"` // 测量粒度选项:15M/30M/60M/24H + + KPISet []struct { + Code string `json:"Code"` // 统计编码 如:SMFHA01 + KPIs []string `json:"KPIs` // 指标项集合 ["SMF.AttCreatePduSession", "SMF.AttCreatePduSession._Dnn"] + } `json:"KPISet"` + } `json:"Tasks"` + + NotifyUrl string `json:"NotifyUrl"` /* 数据上报URL "http://x.x.x.x:xxxx/api/rest/performanceManagement/v1/elementType/smf/objectType/measureReport" */ + } + ``` +* Return + +### 4.2 订阅任务数据上报 + +* URI + + ```uri + /api/rest/performanceManagement/v1/elementType/{elementTypeValue}/objectType/measureReport + ``` +* Method + + POST +* Relations + + NF -> OMC +* Body + + 网元返回测量数据的报文结构 + + ```json + type MeasureReport struct { + Id int `json:"Id"` + Timestamp string `json:"TimeStamp"` + NeName string `json:"NeName"` + RmUID string `json:"rmUID"` + NeType string `json:"NeType"` + + Report struct { + Period struct { + StartTime string `json:"StartTime"` + EndTime string `json:"EndTime"` + } `json:"Period"` + + Datas []struct { + Code string `json:"Code"` // 统计编码 如:SMFHA01 + KPIs []struct { + KPIID string `json:"KPIID"` // 指标项, 如: SMF.AttCreatePduSession._Dnn + KPIValues []struct { + Name string `json:"Name"` // 单个的写"Total", 或者指标项有多个测量项,如Dnn的名称写对应的Dnn"cmnet"/"ims" + Value int64 `json:"Value"` + } `json:"KPIValues"` + } `json:"KPIs"` + } `json:"Datas"` + } `json:"Report"` + } + ``` + +### 4.3 黄金指标上报 + +* URI + + ```uri + /api/rest/performanceManagement/v1/elementType/{elementTypeValue}/objectType/kpiReport/{index} + ``` + + index取值范围: 0-1439 +* Method + + POST +* Body + + ```json + type KpiReport struct { + Timestamp string `json:"TimeStamp"` + Task struct { + Period struct { + StartTime string `json:"StartTime"` + EndTime string `json:"EndTime"` + } `json:"Period"` + NE struct { + NEName string `json:"NEName"` + RmUID string `json:"rmUID"` + NeType string `json:"NeType"` + KPIs []struct { + KPIID string `json:"KPIID"` + Value int `json:"Value"` + Err string `json:"Err"` + } `json:"KPIs"` + } `json:"NE"` + } `json:"Task"` + } + ``` + +### 4.4 测量数据主动上报 + +* URI + + ```uri + /api/rest/performanceManagement/v1/elementType/{elementTypeValue}/objectType/measurement/{index} + ``` +* Method + + POST +* Relations + + NF -> OMC +* Params + + NA +* Body + + 网元主动上报测量数据的报文结构 + + ```json + type Measurement struct { + Index int `json:"Index"` // 1天当中测量时间粒度(如15分钟)的切片索引: 0~95 + Timestamp string `json:"TimeStamp"` + NeName string `json:"NeName"` // UserLabel + RmUID string `json:"rmUID"` + NeType string `json:"NeType"` // 网元类型 + PmVersion string `json:"PmVersion"` // 性能数据版本号 + Dn string `json:"Dn"` // (???)网元标识, 如:RJN-CMZJ-TZ,SubNetwork=5GC88,ManagedElement=SMF53456,SmfFunction=53456 + Period string `json:"Period"` // 测量时间粒度选项:5/15/30/60 + TimeZone string `json:"TimeZone"` // 时区, 如: "UTC+8" + StartTime string `json:"StartTime"` + + Datas []struct { + ObjectType string `json:"ObjectType"` // 网络资源类别名称, Pm指标项列表中为空间粒度 如:SmfFunction + KPIs []struct { + KPIID string `json:"KPIID"` // 指标项, 如: SMF.AttCreatePduSession._Dnn + KPIValues []struct { + Name string `json:"Name"` // 单个的写"Total", 或者指标项有多个测量项,如Dnn的名称写对应的Dnn"cmnet"/"ims" + Value int64 `json:"Value"` + } `json:"KPIValues"` + } `json:"KPIs"` + } `json:"Datas"` + } + ``` +* Return + + Code: 204, no content + +### 4.5 测量数据获取/补采 + +* URI + + ```uri + /api/rest/performanceManagement/v1/elementType/{elementTypeValue}/objectType/measurement/{index} + ``` +* Method + + GET +* Relations + + OMC -> NF +* Params + + NA +* Body + + NA +* Return + + 网元返回测量数据的报文结构 + + ```json + type Measurement struct { + Index int `json:"Index"` // 1天中测量时间粒度(如15分钟)的切片索引: 0~95 + Timestamp string `json:"TimeStamp"` + NeName string `json:"NeName"` // UserLabel + RmUID string `json:"rmUID"` + NeType string `json:"NeType"` // 网元类型 + PmVersion string `json:"PmVersion"` // 性能数据版本号 + Dn string `json:"Dn"` // (???)网元标识, 如:RJN-CMZJ-TZ,SubNetwork=5GC88,ManagedElement=SMF53456,SmfFunction=53456 + Period string `json:"Period"` // 测量时间粒度选项:5/15/30/60 + TimeZone string `json:"TimeZone"` + StartTime string `json:"StartTime"` + + Datas []struct { + ObjectType string `json:"ObjectType"` // 网络资源类别名称, Pm指标项列表中为空间粒度 如:SmfFunction + KPIs []struct { + KPIID string `json:"KPIID"` // 指标项, 如: SMF.AttCreatePduSession._Dnn + KPIValues []struct { + Name string `json:"Name"` // 单个的写"Total", 或者指标项有多个测量项,如Dnn的名称写对应的Dnn"cmnet"/"ims" + Value int64 `json:"Value"` + } `json:"KPIValues"` + } `json:"KPIs"` + } `json:"Datas"` + } + ``` + +## 5 跟踪管理 + +### 5.1 订阅管理 + +* 创建订阅 + + * URI + + ```uri + /api/rest/traceManagement/v1/subscriptions + ``` + * Method + + POST + * Relations + + OMC front-end->OMC back-end, OMC -> NF + * Body + + OMC front-end->OMC back-end: id 不带 + OMC->NF:id必选 + + ```json + type TraceTask struct { + Id int `json:"id"` + TraceType string `json:"traceType"` + StartTime string `json:"startTime"` + EndTime string `json:"endTime"` + Imsi string `json:"imsi"` + Msisdn string `json:"msisdn"` + SrcIp string `json:"srcIp"` + DstIp string `json:"dstIp"` + SignalPort int16 `json:"signalPort"` + NeType string `json:"neType"` + NeId string `json:"neId"` + UeIp string `json:"ueIp"` + Interfaces []string `json:"interfaces"` + NotifyUrl string `json:"notifyUrl"` + } + ``` + + Example: + + ```json + { + "id": 3, + "traceType": "Interface", + "startTime": "2023-07-04 13:00:00", + "endTime": "2023-07-04 19:00:00", + "neType": "UDM", + "neId": "SZ_01", + "interfaces": ["N8","N10"], + "notifyUrl": "gtp:192.168.0.229:2152", + } + ``` + * Return + + Code=204 non-content +* 修改订阅 + + * URI + + ```uri + /api/rest/traceManagement/v1/subscriptions + ``` + * Method + + PUT + * Relations + + OMC front-end->OMC back-end, OMC -> NF + * Body + + ```json + type TraceTask struct { + Id int `json:"id"` + TraceType string `json:"traceType"` + StartTime string `json:"startTime"` + EndTime string `json:"endTime"` + Imsi string `json:"imsi"` + Msisdn string `json:"msisdn"` + SrcIp string `json:"srcIp"` + DstIp string `json:"dstIp"` + SignalPort int16 `json:"signalPort"` + NeType string `json:"neType"` + NeId string `json:"neId"` + UeIp string `json:"ueIp"` + Interfaces []string `json:"interfaces"` + NotifyUrl string `json:"notifyUrl"` + } + ``` + + Example: + + ```json + { + "id": 3, + "traceType": "Interface", + "startTime": "2023-07-04 13:00:00", + "endTime": "2023-07-04 19:00:00", + "neType": "UDM", + "neId": "SZ_01", + "interfaces": ["N8","N10", "N11"], + "notifyUrl": "gtp:192.168.0.229:2152", + } + ``` + * Return + + Code=204 non-content +* 删除订阅 + + * URI + + ```uri + /api/rest/traceManagement/v1/subscriptions?id={id1}&id={id2} + ``` + * Method + + DELETE + * Relations + + OMC front-end->OMC back-end, OMC -> NF + * Params + + id:订阅任务id,支持多个 + * Body + + NA + * Return + + Code=204, non-content +* 查询订阅 (暂不实现,直接从数据库查询) + + * URI + 查询单个订阅: + + ```uri + /api/rest/traceManagement/v1/subscriptions?id={id} + ``` + + 查询所有订阅: + + ```http + /api/rest/traceManagement/v1/subscriptions + ``` + * Method + + GET + * Body + + NA + * Return + + ```json + { + "data": [ + { + "id": 1, + "traceType": "Interface", + "startTime": "2023-07-04 13:00:00", + "endTime": "2023-07-04 19:00:00", + "neType": "UDM", + "neId": "SZ_01", + "interfaces": ["N8","N10", "N11"] + } + ] + } + ``` + +### 5.2 消息上报 + +Example: + +```json +{ + "id": [1,2], + "timestamp": "20230413 16:02:27.523496", + "imsi": "4600001000000001", + "msisdn": "12307550001", + "srcAddr": "192.168.1.172:51034", + "dstAddr": "192.168.1.187:8080", + "neType": "AMF", + "neId": "SZ_0", + "interface": "N8", + "data": "00002f01040000007f418d0be25c2e3cb8570bcedc780f038345", + "diagnosis": "It is external debug information", +} +``` + +## 6. 操作维护 + +### 6.1 MML命令 + +#### 6.1.1 MML命令格式 + +* 命令格式 + + ```mml + oper object:parameter1={value1},parameter2={value2},parameter3={value3}; + ``` + + * 操作(operation) + + * 根据实际操作可选用如下动作,如果没有合适的可自行增加,要做到简洁直观 + + ```list + add: 增加 + mod(set):修改/设置 + del(rmv):删除 + dsp(lst):查询显示 + bak:备份 + exp:导出 + imp:导入 + bat: 批量 + exec(run):执行 + act/dea: 激活/去激活 + ``` + * 与对象之间采用空格分隔 + * 对象(object) + + * 操作的对象,如签约数据(sub/udmuser)/鉴权数据(auth/authdat), n7接口(n7server) + * 对象名称用所操作对象的英文名(或缩写), 为字母或者数字的组合, 不含空格, "-", "_"等特殊字符 + * 使用":"与参数进行分隔 + * 参数(param) + + * 参数名采用英文常用名/约定俗成的缩写/缩略语等, 如imsi,msisdn,ip,port等, 为字母或者数字的组合, 不含空格, "-", "_"等特殊字符 + * 参数值为字符串, 如有":", ",", ";", "\\"字符, 需加"\\"进行转义 + * 参数之间用","进行分隔 + * 命令结束符";", 操作/对象/参数均采用小写字母(HW采用的都是大写字母) +* 目前现有的各个网元的命令格式 + + 除了UDM签约数据/鉴权数据的MML格式和上述格式基本一致, 各个网元的系统参数MML都不一样, 需统一成上述格式 + + * UDM鉴权数据/签约数据 + + ```mml + add authdat:imsi=460000100000030,ki=805DADC6E8A54A0D59D622C7A04D08E0,amf=8000,algo=0,opc=CF7FD414E05754CFE08B4FE7F2EF2A36 + ``` + * UDM系统参数 + + ```mml + set n8ip 172.16.5.130 + ``` + * AMF系统参数 + + ```mml + set n8_ip 192.168.1.121 + ``` + * SMF/UPF系统参数 + + ```mml + set n7 server + ``` + +#### 6.1.2 MML配置表 + +* 类型定义(type) + + * string + + filter指定字符串长度,如:"filter": "6~100" , 字符串的长度范围,如果单个数字表示最大长度 + * ipv4 + + filter忽略 + * ipv6 + + filter忽略 + * int + + filter指定整型数的范围,如:"filter": "100~999" + * enum + + "filter": '{"0": "http", "1": "https"}' + * bool + + "filter": '{"0": "false", "1": "true"}' + * regex + + filter为正则表达式 +* Example + + ```yaml + udm: + authdataManagement: + display: "Authentication Data Management" + mml: + - operation: "dsp" + object: "authdat" + display: "Display Auth Data" + params: + - name: "imsi" + type: "string" + optional: "false" + filter: "" + display: "IMSI" + comment: "" + subscriberManagement: + display: "Subcriber Management" + mml: + - operation: "dsp" + object: "authdat" + display: "Display Auth Data" + params: + - name: "imsi" + type: "string" + optional: "false" + filter: "" + display: "IMSI" + comment: "" + systemManagement: + display: "System Management" + mml: + - operation: "set" + object: "n8ip" + display: "Set N8 IP Address" + params: + - name: "ip" + type: "ipv4" + optional: "false" + filter: "" + display: "IP Address" + comment: "" + ``` + +### 6.2 MML接口 + +* URI + + ```uri + /api/rest/opeartionManagement/v1/elementType/{elementTypeValue}/objectType/mml?ne_id={neId} + ``` +* Relations + + OMC front-end -> OMC back-end + + OSS -> OMC (北向接口) +* Params + + ne_id={neId} +* Method + + POST +* Body + + ```json + { + "mml": [ + "date", + "list ver", + "list lic", + "list comm" + ] + } + ``` +* Return + + ```json + { + "data": [ + "2023-05-11 17:52:32.37333745 +0800 CST m=+28762.188435351\n", + "16.1.1\n", + "Expiry date: 2024-12-31, sn: 13740272\n", + "COMMAND NOT FOUND, opr: list, obj: comm\n" + ] + } + ``` + +## 7 北向接口(NBI) + +### 7.1 查询资源数据接口 + +* URI + + ```uri + /api/rest/resourceManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/{objectTypeValue}?rmUIDs={rmUIDValues}&fields={attributeNames} + ``` +* Relations + + OMC -> NF + + OSS -> OMC (北向接口) +* Params + + * rmUIDs={rmUIDValues} + + 可携带多额rmUID(统一资源定位符), OMC->NF不带 + * fields={attributeNames} + + 属性域集合={属性名列表}, 指定资源对象多个属性名的英文逗号分割,一个属性名时无英文逗号。 +* Method + + GET +* Body + + ```json + GET /api/rest/resourceManagement/v1/elementType/SMF/objectType/ManagedElement?rmUIDs=1101AGTHXSMF0000015704000100&fields=UserLabel HTTP/1.1 + accessToken: 52661fbd-6b84-4fc2-aa1e-17879a5c6c9b + Host: serverIP:port + Content-Type: application/json; charset=UTF-8 + Content-Length:… + { + } + ``` +* Return + + ```json + HTTP/1.1 200 OK + Content - Type: application/json + Content-Length:… + { + "data": [{ + "rmUID": "1101AGTHXSMF0000015704000100", + "UserLabel": "SMFRJBJJC01", + ... + }] + } + ``` + +## 8 文件接口 + +### 8.1 软件管理 + +#### 8.1.1 软件包管理接口 + +* URI + + ```uri + /api/rest/systemManagement/v1/{neType}/software/{version}?md5Sum={md5Sum} + ``` +* Relations + + OMC front-end -> OMC back-end +* Params + + md5Sum={md5Sum} +* Method + + * POST: upload to OMC, 上传文件到OMC, content_type=multipart/form-data + * GET: download from omc, 下载文件到OMC, content_type=multipart/form-data + * DELETE: delete from omc +* Body + + POST: 软件包文件, OMC按网元类型存储文件,如果文件名相同则会覆盖 +* Return + + * POST/DELETE: code=204 + * GET: code=200, 返回文件 + +#### 8.1.2 网元软件包管理接口 + +* URI + + ```uri + /api/rest/systemManagement/v1/{neType}/software/{version}/{neId} + ``` +* Relations + + OMC front-end -> OMC back-end +* Params +* Method + + * POST: distribute to NF + * PUT: active + * PATCH: rollback +* Body + + NA +* Return + + Code: 204 Not content + +### 8.2 License管理 + +#### 8.2.1 License文件管理接口 + +* URI + + ```uri + /api/rest/systemManagement/v1/{neType}/license + ``` +* Relations + + OMC front-end -> OMC back-end +* Params +* Method + + * POST: upload to OMC, 上传文件到OMC, content_type=multipart/form-data + * GET: download from omc, 下载文件到OMC, content_type=multipart/form-data + * DELETE: delete from omc +* Body + + POST: 携带License文件, OMC按网元类型存储文件,如果文件名相同则会覆盖 +* Return + + Code: 204 Not content + +#### 8.2.2 网元License管理接口 + +* URI + + ```uri + /api/rest/systemManagement/v1/{neType}/license/{neId} + ``` +* Relations + + OMC front-end -> OMC back-end +* Params +* Method + + * POST: distribute to NF + * PUT: active + * PATCH: rollback +* Body + + NA +* Return + + Code: 204 Not content + +## 9 4A接口 + +### 9.1 从账号(user)管理接口 + +#### 9.1.1 查询全部从账号(user)接口 + +* URI + + ```uri + /api/rest/aaaa/v1/security/users + ``` +* Relations + + 4A -> OMC +* Params +* Method + + GET +* Body + + ```json + + ``` +* Return + + ```json + + ``` + +#### 9.1.2 单个从账号(user)接口 + +* URI + + ```uri + /api/rest/aaaa/v1/security/users/{id} + ``` +* Relations + + 4A -> OMC +* Params +* Method + + GET/POST/PUT/DELETE +* Body + + ```json + + ``` +* Return + + ```json + + ``` + +### 9.2 角色(role)管理接口 + +#### 9.2.1 查询全部角色(role)接口 + +* URI + + ```uri + /api/rest/aaaa/v1/security/roles + ``` +* Relations + + 4A -> OMC +* Params +* Method + + GET +* Body + + ```json + + ``` +* Return + + ```json + + ``` + +#### 9.2.2 单个角色(role)接口 + +* URI + + ```uri + /api/rest/aaaa/v1/security/roles/{id} + ``` +* Relations + + 4A -> OMC +* Params +* Method + + GET/POST/PUT/DELETE +* Body + + ```json + + ``` +* Return + + ```json + + ``` + +### 9.3 登录认证接口 + +#### 9.2.1 登录认证 + +* URI + + ```uri + /api/rest/aaaa/v1/security/authentication/token + ``` +* Relations + + 4A -> OMC +* Params +* Method + + GET +* Body + + ```json + + ``` +* Return + + ```json + + ``` diff --git a/docs/06-5GC OMC restful internal intefaces.md b/docs/06-5GC OMC restful internal intefaces.md new file mode 100644 index 0000000..553cf05 --- /dev/null +++ b/docs/06-5GC OMC restful internal intefaces.md @@ -0,0 +1,1023 @@ +## EMS restful interfaces + +--- + +### 1. 状态管理 + +* URI: + + ``` + /api/rest/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/systemState?ne_id=0 + ``` + + 说明: + + ```Tips + ** elementTypeValue=all/smf/amf/.. + ** all: 表示所有配置的NF(ems前端->后端) + ** smf:查询smf网元 + ** 参数ne_id指网元标识,指定ne_id条件表示查询该网元系统状态(ems前端->后端需要带该参数) + ``` +* Method: + + > GET + > +* Return: + + ```json + + "data": [ + { + "AMF_0": { + "error": { + "errorCode": "1", + "errorInfo": "Internal server error, NF connnect refused" + }, + "ipAddress": "192.168.2.188" + } + }, + { + "SMF_0": { + "ipAddress": "192.168.1.232", + "systemState": { + "capability": 10000, + "cpuUsage": { + "nfCpuUsage": 2, + "sysCpuUsage": 52 + }, + "diskSpace": { + "partitionInfo": [ + { + "total": 1920, + "used": 0 + }, + { + "total": 393, + "used": 13 + }, + { + "total": 48700, + "used": 32431 + }, + { + "total": 1965, + "used": 0 + }, + { + "total": 5, + "used": 0 + }, + { + "total": 1965, + "used": 0 + }, + { + "total": 55, + "used": 55 + }, + { + "total": 63, + "used": 63 + }, + { + "total": 91, + "used": 91 + }, + { + "total": 49, + "used": 49 + }, + { + "total": 55, + "used": 55 + }, + { + "total": 73, + "used": 73 + }, + { + "total": 91, + "used": 91 + }, + { + "total": 1475, + "used": 206 + }, + { + "total": 49, + "used": 49 + }, + { + "total": 393, + "used": 13 + }, + { + "total": 393, + "used": 0 + }, + { + "total": 73, + "used": 73 + }, + { + "total": 63, + "used": 63 + } + ], + "partitionNum": 19 + }, + "expiryDate": "2025-02-28", + "memUsage": { + "nfUsedMem": 163992, + "sysMemUsage": 1345, + "totalMem": 4025608 + }, + "serialNum": "13740126", + "version": "1.5.3.2" + } + } + }, + { + "SMF_1": { + "ipAddress": "192.168.1.173", + "systemState": { + "capability": 10000, + "cpuUsage": { + "nfCpuUsage": 0, + "sysCpuUsage": 69 + }, + "diskSpace": { + "partitionInfo": [ + { + "total": 3966, + "used": 0 + }, + { + "total": 797, + "used": 0 + }, + { + "total": 200559, + "used": 5968 + }, + { + "total": 3987, + "used": 0 + }, + { + "total": 5, + "used": 0 + }, + { + "total": 3987, + "used": 0 + }, + { + "total": 797, + "used": 0 + } + ], + "partitionNum": 7 + }, + "expiryDate": "2024-12-31", + "memUsage": { + "nfUsedMem": 212136, + "sysMemUsage": 720, + "totalMem": 8167360 + }, + "serialNum": "13740272", + "version": "1.5.3.3" + } + } + } + ] + } + ``` + +### 2. 数据库管理(内部接口) + +#### 2.1 查询(select) + +* URI: + + ``` + /api/rest/databaseManagement/{apiVersion}/{databaseName}/{tableName}?SQL={SQL}|WHERE={WHERE} + ``` +* Method: + + > GET + > +* Params: + + > 参数关键字大小写敏感 + > + + * WHERE + + > WHERE=id=1 and parent_id=0 + > + + 说明: + + ```Tips + ** 表名为tableName带的表名 + ``` + * SQL + + > SQL=select count(*) from sysmenu&SQL=SELECT * FROM menu + > + + 说明: + + ```Tips + ** 支持多个SQL查询 + ** SQL只能是查询语句 + ** tableName带的表名忽略 + ** 特殊字符需要转义,如"%"需转义为"%25" + ``` +* Return: + + ```json + { + "data": [ + { + "tableName1": [ + { + "column1": value1, + "column2": value2, + "column3": value3, + ... + } + ] + }, + { + "tableName2": [ + { + "column1": value11, + "column2": value12, + "column3": value13, + ... + }, + { + "column1": value21, + "column2": value22, + "column3": value23, + ... + } + ] + } + ] + } + ``` +* Example: + + * WHERE: + + ``` + /api/rest/databaseManagement/v1/omc_db/menu?WHERE=id=1 + ``` + + ```json + { + "data": [ + { + "menu": [ + { + "href": "111", + "icon": "11", + "id": 1, + "parent_id": 0, + "remark": "0", + "title": "test" + } + ] + } + ] + } + ``` + + * SQL: + + ``` + /api/rest/databaseManagement/v1/omc_db/menu?SQL=select count(*) from sysmenu&SQL=SELECT * FROM menu + ``` + + ```json + { + "data": [ + { + "sysmenu": [ + { + "count(*)": 4 + } + ] + }, + { + "menu": [ + { + "href": "111", + "icon": "11", + "id": 1, + "parent_id": 0, + "remark": "0", + "title": "test" + }, + { + "href": "31", + "icon": "313", + "id": 2, + "parent_id": 1, + "remark": "0", + "title": "test1" + } + ] + } + ] + } + ``` + +#### 2.2 增加(insert) + +* URI: + + ``` + /api/rest/databaseManagement/{apiVersion}/{databaseName}/{tableName} + ``` +* Method: + + > POST + > +* Body: + + > 参数关键字大小写敏感 + > + + ```json + { + "menu": [ + { + "id": 3, + "title": "test3", + "icon": "113", + "href": "1113", + "parent_id": 2, + "remark": "0" + } + ] + } + ``` + + 说明: + + ```Tips + ** 支持多条插入数据 + ** 支持多个表插入数据 + ** tableName带的表名忽略 + ``` +* Return: + + ```json + { + "data": { + "affected rows": 1 + } + } + ``` + +#### 2.3 修改(update) + +* URI: + + ``` + /api/rest/databaseManagement/{apiVersion}/{databaseName}/{tablename}?WHERE={where} + ``` +* Method: + + > PUT + > +* Params: + + * WHERE + ```Tips + 参数关键字大小写敏感 + exp: WHERE=id=1 + ``` +* Body: + + ```json + { + "menu": [ + { + "title": "test3", + "icon": "113", + "href": "1113", + } + ] + } + + ``` +* Return: + + ```json + { + "data": [ + { + "tableName1": [ + { + "column1": value1, + "column2": value2, + "column3": value3, + ... + } + ] + }, + { + "tableName2": [ + { + "column1": value11, + "column2": value12, + "column3": value13, + ... + }, + { + "column1": value21, + "column2": value22, + "column3": value23, + ... + } + ] + } + ] + } + ``` + +#### 2.4 删除(delete) +* URI: + + ``` + /api/rest/databaseManagement/{apiVersion}/{databaseName}/{tablename}?WHERE={where} + ``` +* Method: + + DELETE + +* Params: + + * WHERE + ```Tips + 参数关键字大小写敏感 + exp: WHERE=id=1 + ``` +* Body: + + NA + +* Return: + + Code: 200/204 + +### 3. 配置管理 + +#### 3.1 参数配置表 + +* 类型定义(type) + + * string + > filter指定字符串长度,如:"filter": "6~100" , 字符串的长度范围,如果单个数字表示最大长度 + > + * ipv4 + > filter忽略 + > + * ipv6 + > filter忽略 + > + * int + > filter指定整型数的范围,如:"filter": "100~999" + > + * enum + > "filter": '{"0": "http", "1": "https"}' + > + * bool + > "filter": '{"0": "false", "1": "true"}' + > + * regex + > filter为正则表达式 + > +* Example + + ```yaml + UDM: + system: + display: "System" + list: + - name: "serviceIP" + type: "ipv4" + value: "172.16.5.140" + access: "read-write" + filter: '' + display: "Service IP" + comment: "" + - name: "servicePort" + type: "int" + value: "8080" + access: "read-write" + filter: "0~65535" + display: "Service Port" + comment: "0~65535" + subsSmfSelection: + display: "Subs Smf Selection" + array: + - name: "index" + type: "int" + value: "0" + access: "read-write" + filter: '0~15' + display: "Index" + comment: "0~15" + - name: "name" + type: "string" + value: 'def_ambr' + access: "read-write" + filter: '^.{1,32}$' + display: "Name" + comment: "0~32" + - name: "snssai" + type: "string" + value: '1-000001' + access: "read-write" + filter: '^\d{1,3}[A-Fa-f0-9]{6}$' + display: "Snssai" + comment: "" + - name: "dnnList" + type: "int" + value: '0' + access: "read-write" + filter: '0~3' + display: "Dnn List" + comment: "" + array: + - name: "index" + type: "int" + value: "0" + access: "read-write" + filter: '0~15' + display: "index" + comment: "0~15" + - name: "dnn" + type: "string" + value: 'cmnet' + access: "read-write" + filter: '^.{1,32}$' + display: "Dnn" + comment: "0~32" + - name: "defaultDnnInd" + type: "bool" + value: 'true' + access: "read-write" + filter: 'false;true;' + display: "default Dnn Indicator" + comment: "" + ``` + + 完整文件具体请参考 udm_param_config.yaml + +#### 3.2 获取参数 + +* URI + + ``` + /api/rest/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/config/{paraName}?ne_id=0&loc={index0}/{paraName1}/{index1}/... + ``` + + 说明 + + ```Tips + apiVersion: "v1" + elementTypeValue: udm, smf, amf... 网元类型 + udm paraName: system, subsUEAmbr, subsSmfSelection ... + 非array的参数,忽略loc + ``` +* Params + + * loc 多层表的定位信息 + * ne_id 网元标识 (ems前端->后端需要带该参数) +* Method + + > GET + > +* Return + + ``` + /api/rest/systemManagement/v1/elementType/udm/objectType/config/system + ``` + + ```json + { + "data": [ + { + "serviceIP": "172.16.5.140", + "servicePort": "8080", + "...": "..." + } + ] + } + ``` + + ``` + /api/rest/systemManagement/v1/elementType/udm/objectType/config/subsSmfSelection?loc=1/dnnList + ``` + + ```json + { + "data": [ + { + "index": "0", + "dnn": "cmnet", + "...": "..." + }, + { + "index": "1", + "dnn": "ims", + "...": "..." + } + ] + } + ``` + +#### 3.3 配置参数 + +* URI + + ``` + /api/rest/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/config/{paraName}?ne_id=0&loc={index0}/{paraName1}/{index1} + ``` +* Params + + * loc 多层表的定位信息 + * ne_id 网元标识 (ems前端->后端需要带该参数) +* Method + + > POST/PUT/DELETE + + + 说明: + + ```Tips + 单层表不支持POST/DELETE操作 + ``` +* Body + + ```json + { + "serviceIP": "172.16.5.140", + "servicePort": "8080", + "...": "..." + } + ``` + + 说明: + + ```Tips + DELETE操作忽略Body + ``` + +#### 3.4 创建网元 + +* URI + + ``` + /api/rest/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/neInfo + ``` +* Params + + N/A + +* Method + + > POST + +* Body + ```json + { + + } + ``` + +### 4 跟踪管理 + +#### 4.1 订阅管理 + +* 创建订阅 + + * URI + + ``` + /api/rest/traceManagement/{apiVersion}/subscriptions + ``` + * Method + + > POST + > + * Body + + ```json + { + "id": "1", + "filter": "...", + "callbackUrl": "https://x.x.x.x:x/api/rest/traceManagement/v1/events" + } + ``` + * Return + + > {} + > +* 查询订阅 + + * URI + 查询单个订阅: + + ``` + /api/rest/traceManagement/{apiVersion}/subscriptions/{id} + ``` + + 查询所有订阅: + + ```http + /api/rest/traceManagement/{apiVersion}/subscriptions + ``` + * Method + + > GET + > + * Body + + > null + > + * Return + + ```json + { + "data": [ + { + "id": "1", + "filter": "...", + "callbackUrl": "https://x.x.x.x:x/api/rest/traceManagement/v1/events" + } + ] + } + ``` +* 删除订阅 + + * URI + + ``` + /api/rest/traceManagement/{apiVersion}/subscriptions/{id} + ``` + * Method + + > DELETE + > + * Body + + > null + > + +#### 4.2 事件上报 + +* 事件上报 + + * URI + + ``` + /api/rest/traceManagement/{apiVersion}/events + ``` + * Method + + > POST + > + * Body + + ```json + { + "data": [ + { + "id": ["1", "2"], + "key1": "", + "key2": "...", + "content": "content0......" + }, + { + "id": ["1", "3"], + "key1": "", + "key2": "...", + "content": "content1......" + } + ] + } + ``` +### 5 性能管理 + +#### 5.1 任务管理 + +* URI + ``` + /api/rest/performanceManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/measureTask?id={taskId1}&id={taskId2} + ``` +* Method + + POST/PUT/DELETE/PATCH + +* Params + + taskId=1&taskId=2 + + * POST: 增加测量任务,激活任务,不带id参数,id在body + * PUT: 修改测量任务,激活任务,不带id参数,id在body + * DELETE:删除测量任务,不需要带body,带id参数,可带多个 + * PATCH: 暂停测量任务,不需要带body,带id参数,可带多个 + +* Relation NF + + OMC -> NF/NF -> OMC + +* Body + + 下发测量任务的报文结构 + ```json + type MeasureTask struct { + Tasks []struct { + Id int `json:"Id"` + + StartTime string `json:"StartTime"` + EndTime string `json:"EndTime"` + + Schedule struct { + Type string `json:"Type"` // 计划类型:Weekly/Monthly + Days []int `json:"Days"` // Weekly: [0,1,...5,6],0~6表示星期日~星期六, Monthly: [1,2,3,...,30,31]一个月的几天 + Periods []struct { + Start string `json:"Start"` // 零点或者零点加测量粒度的整数倍 00:15:00 + End string `json:"End"` // 零点加测量粒度的整数倍 08:45:00, 16:15:00 + } `json:"Periods"` + } `json:"Schedule"` + + GranulOption string `json:"GranulOption"` // 测量粒度选项:15M/30M/60M/24H + + KPISet []struct { + Code string `json:"Code"` // 统计编码 如:SMFHA01 + KPIs []string `json:"KPIs` // 指标项集合 ["SMF.AttCreatePduSession", "SMF.AttCreatePduSession._Dnn"] + } `json:"KPISet"` + } `json:"Task"` + } + ``` + +* Return + +#### 5.2 测量数据上报 +* URI + ``` + /api/rest/performanceManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/measureReport + ``` +* Method + + POST + +* Body + + 网元返回测量数据的报文结构 + ```json + type MeasureReport struct { + Id int `json:"Id"` + Timestamp string `json:"TimeStamp"` + + Report struct { + Period struct { + StartTime string `json:"StartTime"` + EndTime string `json:"EndTime"` + } `json:"Period"` + + Datas []struct { + Code string `json:"Code"` // 统计编码 如:SMFHA01 + KPIs []struct { + KPIID string `json:"KPIID"` // 指标项, 如: SMF.AttCreatePduSession._Dnn + KPIValues []struct { + Name string `json:"Name"` // 单个的写"Total", 或者指标项有多个测量项,如Dnn的名称写对应的Dnn"cmnet"/"ims" + Value int `json:"Value"` + } `json:"KPIValues"` + } `json:"KPIs"` + } `json:"Datas"` + } `json:"Report"` + } + ``` +#### 5.3 黄金指标上报 +* URI + ``` + /api/rest/performanceManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/kpiReport/{index} + ``` +* Method + + GET +* Body + + ```json + type KpiReport struct { + Timestamp string `json:"TimeStamp"` + Task struct { + Period struct { + StartTime string `json:"StartTime"` + EndTime string `json:"EndTime"` + } `json:"Period"` + NE struct { + NEName string `json:"NEName"` + RmUID string `json:"rmUID"` + NeType string `json:"NeType"` + KPIs []struct { + KPIID string `json:"KPIID"` + Value int `json:"Value"` + Err string `json:"Err"` + } `json:"KPIs"` + } `json:"NE"` + } `json:"Task"` + } + ``` +### 6 故障管理 +#### 6.1 告警上报 +* URI + ``` + /api/rest/faultManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/alarms + ``` +* Method + + POST + +* Relation NF + + NF->OMC + +* Body + + ```json + type Alarm struct { + AlarmSeq int `json:"alarmSeq"` + AlarmId string `json:"alarmId"` + NeId string `json:"neId"` + AlarmCode int `json:"alarmCode"` + AlarmTitle string `json:"alarmTitle"` + EventTime string `json:"eventTime"` + AlarmType string `json:"alarmType"` + OrigSeverity string `json:"origSeverity"` + PVFlag string `json:"pvFlag"` + NeName string `json:"neName"` + NeType string `json:"neType"` + ObjectName string `json:"objectName"` + LocationInfo string `json:"locationInfo"` + Province string `json:"province"` + AlarmStatus int `json:"alarmStatus"` + SpecificProblem string `json:"specificProblem"` + SpecificProblemID string `json:"specificProblemID"` + AddInfo string `json:"addInfo"` + } + ``` + +#### 6.2 获取网元告警 +* URI + ``` + /api/rest/faultManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/alarms + ``` +* Method + + GET + +* Relationship + + OMC->NF + +* Body + + n/a + +* Return + + ```json + type Alarms struct { + Alarms []struct { + AlarmSeq int `json:"alarmSeq"` + AlarmId string `json:"alarmId"` + NeId string `json:"neId"` + AlarmCode int `json:"alarmCode"` + AlarmTitle string `json:"alarmTitle"` + EventTime string `json:"eventTime"` + AlarmType string `json:"alarmType"` + OrigSeverity string `json:"origSeverity"` + PVFlag string `json:"pvFlag"` + NeName string `json:"neName"` + NeType string `json:"neType"` + ObjectName string `json:"objectName"` + LocationInfo string `json:"locationInfo"` + Province string `json:"province"` + AlarmStatus int `json:"alarmStatus"` + SpecificProblem string `json:"specificProblem"` + SpecificProblemID string `json:"specificProblemID"` + AddInfo string `json:"addInfo"` + } `json:"Alarms"` + } + ``` diff --git a/docs/07-5GC OMC Database Diagrams.md b/docs/07-5GC OMC Database Diagrams.md new file mode 100644 index 0000000..692b232 --- /dev/null +++ b/docs/07-5GC OMC Database Diagrams.md @@ -0,0 +1,18 @@ +## EMS Database + +--- + + + +### 1. Relationship of menu, account, account_menu, title_info + + +![1679033737734](image/database/1679033737734.png) + +通过多表联合查询可一次性获取某个账号的目录结果: + +example, acouunt name='manager', lang-key='cn': + +```sql +SELECT m.id, json_unquote(json_extract(t.title_json, '$.en')) as title, m.parent_id, m.sort_id FROM title_info t, menu m WHERE m.id IN (SELECT am.menu_id FROM account_menu am WHERE am.account_id = (SELECT id FROM account WHERE name='manager')) AND m.title_id = t.id ORDER BY m.id +``` diff --git a/docs/image/01-5GCOMC安装指南/1682849935321.png b/docs/image/01-5GCOMC安装指南/1682849935321.png new file mode 100644 index 0000000..72a1361 Binary files /dev/null and b/docs/image/01-5GCOMC安装指南/1682849935321.png differ diff --git a/docs/image/01-5GCOMC安装指南/1682849936184.png b/docs/image/01-5GCOMC安装指南/1682849936184.png new file mode 100644 index 0000000..72a1361 Binary files /dev/null and b/docs/image/01-5GCOMC安装指南/1682849936184.png differ diff --git a/docs/image/04-5GCOMCArchitecturev0.81/1689742028472.png b/docs/image/04-5GCOMCArchitecturev0.81/1689742028472.png new file mode 100644 index 0000000..2e43e69 Binary files /dev/null and b/docs/image/04-5GCOMCArchitecturev0.81/1689742028472.png differ diff --git a/docs/image/04-5GCOMCArchitecturev0.81/1689742238527.png b/docs/image/04-5GCOMCArchitecturev0.81/1689742238527.png new file mode 100644 index 0000000..1ba5e7f Binary files /dev/null and b/docs/image/04-5GCOMCArchitecturev0.81/1689742238527.png differ diff --git a/docs/image/04-5GCOMCArchitecturev0.81/1689742506514.png b/docs/image/04-5GCOMCArchitecturev0.81/1689742506514.png new file mode 100644 index 0000000..6c27581 Binary files /dev/null and b/docs/image/04-5GCOMCArchitecturev0.81/1689742506514.png differ diff --git a/docs/image/04-5GCOMCArchitecturev0.81/1689742719279.png b/docs/image/04-5GCOMCArchitecturev0.81/1689742719279.png new file mode 100644 index 0000000..674b170 Binary files /dev/null and b/docs/image/04-5GCOMCArchitecturev0.81/1689742719279.png differ diff --git a/docs/image/04-5GCOMCArchitecturev0.81/1689742764754.png b/docs/image/04-5GCOMCArchitecturev0.81/1689742764754.png new file mode 100644 index 0000000..86594d3 Binary files /dev/null and b/docs/image/04-5GCOMCArchitecturev0.81/1689742764754.png differ diff --git a/docs/image/EMSarch/1687858921768.png b/docs/image/EMSarch/1687858921768.png new file mode 100644 index 0000000..54a3dd7 Binary files /dev/null and b/docs/image/EMSarch/1687858921768.png differ diff --git a/docs/image/EMSarch/1688182161284.png b/docs/image/EMSarch/1688182161284.png new file mode 100644 index 0000000..5666ae8 Binary files /dev/null and b/docs/image/EMSarch/1688182161284.png differ diff --git a/docs/image/EMSarch/1688202959302.png b/docs/image/EMSarch/1688202959302.png new file mode 100644 index 0000000..5666ae8 Binary files /dev/null and b/docs/image/EMSarch/1688202959302.png differ diff --git a/docs/image/arch/1678264199243.png b/docs/image/arch/1678264199243.png new file mode 100644 index 0000000..e69de29 diff --git a/docs/image/database/1679033737734.png b/docs/image/database/1679033737734.png new file mode 100644 index 0000000..05ca7e4 Binary files /dev/null and b/docs/image/database/1679033737734.png differ diff --git a/docs/mysql install guide.md b/docs/mysql install guide.md new file mode 100644 index 0000000..c9652b8 --- /dev/null +++ b/docs/mysql install guide.md @@ -0,0 +1,11 @@ +# MySQL install guide + +--- + +## 环境准备 + +硬件平台:辉腾arm服务器 + +操作系统:麒麟 + +MySQL:8.0.32 diff --git a/docs/reference/4A管控平台与OMC的资源查询流程图.docx b/docs/reference/4A管控平台与OMC的资源查询流程图.docx new file mode 100644 index 0000000..e48b26f Binary files /dev/null and b/docs/reference/4A管控平台与OMC的资源查询流程图.docx differ diff --git a/docs/release note.txt b/docs/release note.txt new file mode 100644 index 0000000..4c74c2d --- /dev/null +++ b/docs/release note.txt @@ -0,0 +1,120 @@ +2023.05.31 + +1. 中移动北向性能接口:性能数据xml文件 +2. 15分钟性能统计数据的获取/补采接口 +3. 数据库表measure_title的几个指标项带有'\n'问题 +4. OMC Web UI 问题修复: 活动告警/历史告警查询 +5. 性能管理测量任务的创建修改优化, 测量数据的多维度查询 +6. 修改UDM任务激活成功后状态显示未激活的问题 + +2023.06.14 + +1. 中移动北向性能接口:性能数据xml文件分小时目录存储 +2. 中移动北向资源接口:资源配置数据xml文件按天目录存储 +3. 安全管理下的用户管理可以增删改 +4. 告警级别颜色可自定义,告警声音可自定义 +5. 参数配置增加optional(选填或必填),默认为选填 +6. MML增加exec shell命令,可执行linux shell命令 +7. UDM的用户数据MML命令增加export udmuser/export authdat命令,返回“本地UDM数据禁止导出” +8. 导出网元可下载zip的文件 +9. 增加UPF的参数项 +10. 删除网元判断网元状态,如果正常网元删除不成功 + +2023.06.21 + +1. 性能门限产生越限告警 +2. 增加软件管理,支持软件包上传下载和删除 +3. 支持导入网元,网元需要进行ssh密钥的发放 +4. MML命令拆分为系统操作MML和用户数据MML +5. 数据访问控制---安全部分 +6. 完成搜索框的自动检索功能---对应测试用例:7.10 性能测量数据的查询 +7. 完成导出全部、打印全部数据功能 +8. 软件完整性校验 + +2023.06.28 + +1. 增加性能报表 +2. 北向增加告警上报接口,测试需要oss的socket客户端模拟器 +3. 增加性能订阅数据表的定期备份功能 +4. 修正页面的问题:参数配置网元标识未刷新加载 +5. 修正历史告警页面的多余按钮 + + +2023.07.06 + +1. 增加跟踪管理功能项,实现跟踪任务创建/详细信息,网元暂未实现跟踪任务创建/修改/删除 +2. 北向增加黄金指标上报的相关接口 +3. 4A管控实现从账号和角色的相关查询/创建/修改/删除 +4. EMS(OMC后台)可作为一个网元增加至网元管理界面,并实现系统状态监控 +5. 网元管理的网元信息增加了省份,厂商名称,网络标识的参数设置项,并实现把网元标识(rmUID/neUID),网元名称(友好名称,UserLabel),网元虚拟化标识,省份,厂商名称,网络标识下发到网元进行设置,网元暂未实现接收该消息 +6. 性能任务修改开始时间/结束时间的完整性(增加秒) +7. 软件管理页面完成,可实现上传/下载/删除,网元的软件下发/激活/回退,和网元版本信息查询 +8. 修正活动告警/历史告警/数据管理(性能管理)的查询结果的全部数据导出功能,修正活动告警的个性化设置(告警颜色/声音) +9. 修正了性能统计任务在网元不正常情况下无法删除的问题 +10. 修正了性能统计任务在网元不存在(创建性能统计任务后未激活情况,修改了网元的标识导致查找为空)激活提示成功的问题 + +2023.07.25 + +1. 前端告警声音可自定义上传声音文件 +2. 备份管理支持网元备份文件的查看和下载/删除功能 +3. +4. + + +2023.07.29 +1. 自定义性能指标创建,查询,修改和删除 +2. 用户在线状态,用户注销 +3. 告警手动同步bug:有网元状态无法下发后续网元Get请求 +4. 性能采集超时修复bug: 时间格式问题(目前仍遗留任务挂起后激活有告警产生,及恢复告警) +5. OMC ssh mml框架,可通过ssh admin@xx.xx.xx.xx -p 2222进行登录,目前只创建了一个mml命令dsp neInfo:neType=...的脚本 + +2023.07.30 +1. restconf.yaml增加配置项omc: testMode, 为true表示测试模式, 部分操作和检测将被略过, 网元软件的激活和回退操作在testMode=true时不进行实际操作 +2. 用户登录时, 当配置项auth:session=single时一个用户只允许在线一个session, 返回403-2。 +3. Web上设置的注销等待时长将被应用在用户登录会话超时时长 +4. 添加告警前转接口的设置 +5. 修正日志设置、性能报表设置的数据回填 +6. 增加更新超时会话为离线状态 +7. 增加判断是否web的定时刷新操作,定时刷新操作不更新握手时间戳 +8. 系统操作mml分离出ausf网元部分 + +2023.07.31 +1. 修复OMC显示系统状态信息问题 +2. 告警前转增加短信接口, 记录前转日志(web界面查看日志未完成) +3. 登录增加验证码 +4. 自定义性能指标与性能门限进行关联 +5. 上传软件包时版本说明(comment), 填充网元类型和输入的版本号, 如:AMF16.1.1 + + +2023.08.03 +1. nbi_agent问题修改 +2. omc mml 4~10 +3. 前端告警前转, 软件管理 + +2023.08.05 +1. 增加dsp nelink命令,需在表ne_link中构造数据 +2. dsp licenseinfo增加使用和功能开启列表, 可在新增的配置文件testconfig.yaml进行设置输出的数据信息 +2. 增加system_log表,启动定时任务,扫描进程情况,写入system_log +3. omc mml 增加del/atc/dea (删除/激活/去激活),后面两个暂时不可用 +4. 修复跟踪任务下发无task id + +2023.08.06 +1. 修改add/mod measuretask无法成功的问题 +2. 增加日志备份的自动定时任务 +3. 前转和北向日志增加时间搜索条件 +4. 修复OMC MML的界面命令的拼接问题 + +2023.08.07 +1. 操作维护增加dsp nbicm/upg neversion命令(用例:11.1.4/11.1.11) +2. 增加记录mml历史记录文件的功能,只能在配置文件/usr/local/omc/etc/sshsvc.yaml进行配置 (用例:11.1.17) +3. Web界面的OMC MML部分可以运行, 输入排版暂没有对齐 + +2023.08.08 +1. 操作维护增加dsp neconfig命令(用例:11.1.17 配置数据) +2. 增加user,role,permission的映射关系(RBAC), 数据库中增加test1,test2的用户, test1只能做查询操作,test2可做查询和增加/删除/修改类操作(mml命令)(用例:11.1.17 权限) +3. 注意:后续测试用test1,test2用户,用户权限的数据没有完全配置好,admin无权限执行mml命令! + +2023.08.10 +1. 支持4A单点登录sso功能, 注意没有对用户进行认证, 需关闭toke的校验功能 +2. 用户管理,用户组管理 (未完整实现) + diff --git a/docs/tips.txt b/docs/tips.txt new file mode 100644 index 0000000..723cdec --- /dev/null +++ b/docs/tips.txt @@ -0,0 +1,44 @@ +rsync -avz agtuser@192.168.6.188:/home/agtuser/goprojects /home/simon + + +ssh root@192.168.122.229 + +192.168.0.109 + + +防火墙配置 +firewall-cmd --add-service=https --permanent +firewall-cmd --add-service=samba --permanent + +firewall-cmd --add-port=8888/tcp --permanent + +firewall-cmd --add-port=445/tcp --permanent #samba +firewall-cmd --add-port=139/tcp --permanent #samba + +firewall-cmd --reload +firewall-cmd --list-all + +add measuretask:netype=AMF,neids=["SZ_T01"],granuloption=30M,kpiset=[{"Code":"AMFHA01","KPIs":["AMF.AuthReq"]}] + +lst measuredata:id=40,starttime="2023-07-10 09:50:13",endtime="2023-07-10 11:00:00" + + +lst measuredata:id=40,kpiid=UDM.SmfUecmRegReq,starttime="2023-07-10 13:36:01" + +/api/rest/dataManagement/v1/omc_db/param_config?SQL=select+ne_type,ne_id,top_tag,json_extract(param_json,'$.*[*].name')+AS+param_name,JSON_EXTRACT(param_json,'$.*[*].value')+as+param_value+from+param_config + +select+ne_type,ne_id,top_tag,json_extract(param_json,'$.*[*].name')+AS+param_name,JSON_EXTRACT(param_json,'$.*[*].value')+as+param_value+from+param_config + + +license: + +lst license +dep license:srcnetype=AMF,srcneid=SZ_01,dstnetype=SMF,dstneid=SZ_01,number=50 +rel license:number=1000 +ins license:netype=UDM,neid=SZ_01,number=10000 +adj license:netype=UDM,neid=SZ_01,number=-100 +exp license:netype=UDM,neid=SZ_01 +uni license:netype=AMF,neid=SZ_01 + + +java -Dfile.encoding=utf-8 -jar ost-20230807.jar \ No newline at end of file