1
0

128 Commits

Author SHA1 Message Date
TsMask
458d8c9755 fix: 更新ne_info插入语句,修正字段格式并调整注释 2025-10-17 10:27:00 +08:00
TsMask
5a59f6547b fix: 统一脚本shebang为#!/usr/bin/env bash 2025-10-15 14:57:42 +08:00
TsMask
b05211489e fix: 更新ne_info插入语句,添加额外的字段以记录脚本执行时间 2025-09-16 11:50:39 +08:00
TsMask
a546f1783d fix: 在升级过程中停止omc.service以确保正确更新 2025-09-15 17:34:58 +08:00
TsMask
620dfe629f fix: 初始网元license表插入字段变更 2025-08-29 19:26:40 +08:00
TsMask
e07774bc57 fix: 去除set -e导致脚本退出 2025-08-27 17:48:43 +08:00
TsMask
707a0c0e0b feat: 升级前stop omc.service,防止sqlilte文件更新错误 2025-08-18 16:06:37 +08:00
TsMask
2f6ad6cac0 feat: 更新前端版本号 2025-08-15 18:44:03 +08:00
TsMask
9036324202 fix: 在多个脚本中添加set -e以确保错误处理 2025-08-15 11:19:34 +08:00
TsMask
299b87d95b fix: 忽略文件导致无法正常提交内容 2025-08-07 16:05:08 +08:00
TsMask
75c22c4d8e Merge branch 'main-v2' of http://192.168.2.166:3180/OMC/build.ems into main-v2 2025-08-07 16:03:14 +08:00
TsMask
4aa0c545a1 style: 更新默认分支和使用说明 2025-08-07 16:03:11 +08:00
zhangsz
f6203348bd update .gitignore 2025-08-01 15:49:06 +08:00
TsMask
1aa84000fe fix: nginx访问地址404补充/ 2025-07-22 18:54:42 +08:00
TsMask
f925645b88 feat: 将sshsvc移除 2025-07-16 15:46:20 +08:00
TsMask
6ab25532e5 fix: 初始网元脚本local ssh地址变更ssh记录 2025-06-11 18:35:47 +08:00
TsMask
4c2bab63f2 feat: 初始网元脚本支持多组 2025-06-07 14:18:50 +08:00
TsMask
b7a3aca364 feat: 将nginx配置文件分开为HTTP和HTTPS服务,默认单个负载均衡 2025-06-05 20:05:48 +08:00
TsMask
1f11bf2bbc fix: docker安装配置文件注释相关修改 2025-05-30 19:25:16 +08:00
TsMask
5518d0a8bf fix: 添加执行脚本服务的输出日志文件 2025-05-29 19:40:53 +08:00
TsMask
e986487579 feat: 添加omc执行脚本的systemd服务 2025-05-29 19:32:01 +08:00
TsMask
551dfb3587 fix: 更新构建脚本以生成MD5和SHA256文件 2025-05-23 21:05:44 +08:00
TsMask
d103c3632c fix: 升级配置目录放置 2025-05-22 18:35:49 +08:00
TsMask
6e769c468d feat: 添加对alpine3.20的支持并更新相关Dockerfile和脚本 2025-05-21 16:14:52 +08:00
TsMask
e279b75c49 fix: 更新数据库配置设置 2025-05-21 14:23:58 +08:00
TsMask
2f5031cbd4 fix: 更新脚本以支持远程数据库配置和修复文件路径 2025-05-21 10:20:02 +08:00
TsMask
46bc90c2e4 fix: 更新Docker构建脚本 2025-05-20 18:47:08 +08:00
TsMask
ac23c3a9f1 fix: 更新Docker构建脚本 2025-05-19 19:00:59 +08:00
TsMask
ccad67ca7a fix: 更新Docker构建脚本 2025-05-16 17:28:57 +08:00
TsMask
0fe95af9c3 fix: 更新构建脚本中的分支和版本信息 2025-05-16 14:29:38 +08:00
TsMask
952e55140b fix: 更新Docker构建脚本,调整平台参数 2025-05-16 14:29:16 +08:00
TsMask
b165562c2a fix: 打包前还原变更 2025-05-16 11:03:30 +08:00
TsMask
ffe9c4c498 fix: 更新Docker构建脚本和Dockerfile 2025-05-15 21:41:07 +08:00
TsMask
16189c51fa fix: Docker打包脚本 2025-05-15 16:08:19 +08:00
TsMask
0f7ff2aca7 fix: Docker打包脚本 2025-05-15 15:55:57 +08:00
TsMask
04eb36e899 feat: 添加Docker构建和管理脚本,优化构建流程 2025-05-15 15:19:27 +08:00
TsMask
7891d268cb feat: 添加Docker构建 2025-05-15 14:40:57 +08:00
TsMask
bbbd5471c7 fix: 更新rpm打包逻辑以支持麒麟系统的特殊标签 2025-05-12 10:24:56 +08:00
TsMask
83c7603f91 feat: 打包文件名称使用系统ID加版本号 2025-05-09 20:45:30 +08:00
TsMask
1c96e28f38 feat: 初始网元授权表字段添加用户容量 2025-05-09 14:25:24 +08:00
TsMask
8c94cf6bc0 fix: 升级时前端config.js覆盖问题 2025-04-30 19:08:04 +08:00
TsMask
1da05f7721 fix: 更新OMC描述信息 2025-04-29 20:46:41 +08:00
TsMask
94481d36cd feat: 更新omc和sshsvc服务配置,增加Wants依赖并调整RestartSec时间 2025-04-27 17:27:44 +08:00
TsMask
86c3a87b35 feat: 添加默认读取的para5G.yaml配置文件 2025-04-27 17:27:29 +08:00
TsMask
096989ad15 feat: 添加www.omc.net证书和私钥,并更新nginx配置以使用新证书 2025-04-27 17:27:11 +08:00
TsMask
9ee596f01d fix: 优化omcd脚本,增加服务存在性检查 2025-04-21 16:27:49 +08:00
TsMask
38f6652301 feat: 添加OMC服务控制脚本并移除过时的脚本文件 2025-04-21 16:09:21 +08:00
TsMask
fb021f4605 fix: 更新Golang版本要求至1.24.2 2025-04-19 17:18:51 +08:00
TsMask
04a5f9052e fix: deb更新脚本注释为英文 2025-04-19 16:47:37 +08:00
TsMask
7cac1e1249 fix: 优化setup.sh和omc.spec脚本 2025-04-19 15:53:24 +08:00
TsMask
23a51956ca fix: rpm保留vendor避免卸载错误,调试 2025-04-19 12:21:22 +08:00
TsMask
471811c1ca fix: rpm卸载错误信息 2025-04-19 12:08:50 +08:00
TsMask
80fb41ea51 fix: 根据安装模式去除其余数据 2025-04-18 19:59:44 +08:00
TsMask
4a0a341c4e fix: rpm注释掉卸载脚本文件删除命令 2025-04-18 19:58:52 +08:00
TsMask
ab2026523a fix: 修正sshsvc.service路径 2025-04-18 19:58:29 +08:00
TsMask
29d1c41973 fix: 更新nginx配置,修改server_name为omc.http和omc.https 2025-04-18 14:44:03 +08:00
TsMask
92e1d20e9f fix: 更新rpm打包前脚本,添加对wiregasm.wasm文件的权限设置 2025-04-11 18:44:43 +08:00
TsMask
1f96e09a18 fix: 修复检查MySQL和MariaDB安装的逻辑,确保两者都未安装时才输出错误 2025-04-11 16:17:46 +08:00
TsMask
e5c496d0bb fix: 更新nginx配置80端口https修改为http 2025-04-01 20:10:10 +08:00
TsMask
6fdc7738db sql: 新增脚本link_ne.sh,初始网元信息SQL语句 2025-04-01 18:20:44 +08:00
TsMask
79b1eb8364 ref: 更新nginx配置,调整监听端口和SSL设置 2025-04-01 18:20:14 +08:00
TsMask
874707cd00 fix: 将配置中的 "standard" 修改为 "std" 2025-03-20 19:41:19 +08:00
TsMask
e363529519 ref: 打包脚本调整 2025-03-20 18:38:19 +08:00
TsMask
5160e85804 fix: rpm打包spec 2025-03-20 16:16:49 +08:00
TsMask
0aeb0673ee ref: 打包脚本调整支持切换分支 2025-03-20 16:16:30 +08:00
TsMask
0f1aae7c9a ref: 打包脚本调整 2025-03-20 15:30:31 +08:00
TsMask
f35c535a77 ref: 打包脚本调整 2025-03-20 10:13:04 +08:00
TsMask
3655fb999a ref: 打包脚本调整 2025-03-19 21:03:30 +08:00
TsMask
6c0e636f3c feat: 新增pkg打包脚本 2025-03-19 20:55:53 +08:00
TsMask
96f56939e3 ref: 构建工具重构 2025-03-19 20:26:53 +08:00
TsMask
691bb89829 ref: 构建工具重构 2025-03-19 20:08:16 +08:00
TsMask
3a9b4375f4 ref: 构建工具重构 2025-03-19 19:38:34 +08:00
TsMask
b2f867b86c ref: 构建工具重构 2025-03-19 17:21:47 +08:00
TsMask
f2e43b0fc4 chore: 更新版本号 2.2503.2 2025-03-17 16:10:55 +08:00
TsMask
6e4f2c7773 chore: 更新版本号 2.2503.1 2025-03-08 11:10:29 +08:00
TsMask
53e5717400 fix: badeb 中文字符串替换 2025-03-04 16:13:07 +08:00
TsMask
ca6b277c88 fix: badeb复制en_brand和en_icon.png文件 2025-03-03 20:59:17 +08:00
TsMask
edc4ce7d48 fix: badeb复制en_brand和en_icon.png文件 2025-03-03 20:52:42 +08:00
TsMask
ab59bd6869 fix: badeb复制en_brand和en_icon.png文件 2025-03-03 20:49:16 +08:00
TsMask
8c115a418f fix: badeb类型ba.d目录替换omc.d 2025-03-03 20:41:19 +08:00
TsMask
c0c420dd4b chore: 更新版本号 2.2502.4 2025-02-28 22:09:46 +08:00
TsMask
6745c5e196 fix: badeb移除更多中文字符 2025-02-28 21:52:36 +08:00
TsMask
2bfc7887e3 feat: sqlite检查文件存在不覆盖 2025-02-28 21:40:53 +08:00
TsMask
645f223a2a fix: badeb移除更多中文字符 2025-02-28 21:38:33 +08:00
TsMask
66d3eaf79c feat: 添加kylin打包rpm 2025-02-24 16:35:06 +08:00
TsMask
9a41cbd736 feat: 添加anolis打包rpm 2025-02-24 16:28:19 +08:00
TsMask
f4c79abf83 fix: 自定义数据sql更新 2025-02-24 12:01:30 +08:00
TsMask
542c9721ef fix: 自定义数据sql更新 2025-02-24 11:51:13 +08:00
TsMask
e42d35c5e0 chore: 更新版本号 2.2502.3 2025-02-21 21:11:29 +08:00
zhangsz
667f6b1987 fix: ... 2025-02-21 19:39:40 +08:00
zhangsz
6adf76b589 fix: build arm /amd 2025-02-21 19:38:51 +08:00
zhangsz
49f0ba4a7a fix: ... 2025-02-20 21:20:04 +08:00
zhangsz
27826e4523 fix: ... 2025-02-20 21:16:25 +08:00
zhangsz
1316629dc8 fix:... 2025-02-20 21:06:47 +08:00
zhangsz
82a0d32f15 fix: git ignore 2025-02-20 20:42:35 +08:00
zhangsz
83ce21d2c3 fix: ... 2025-02-20 20:39:35 +08:00
zhangsz
1efc851b39 fix: support openEuler build 2025-02-20 19:50:18 +08:00
TsMask
d9c16a616c chore: 更新版本号 2.2502.2 2025-02-14 19:41:46 +08:00
TsMask
a2800bed0d chore: 更新版本号 2.2502.1 2025-02-08 19:47:04 +08:00
TsMask
cf97351fc9 chore: 更新版本号 2.2501.4 2025-01-24 20:42:17 +08:00
TsMask
251284aa38 chore: 更新版本号 2.2501.3 2025-01-17 18:43:50 +08:00
TsMask
1fe4eddd33 del: 移除程序打包service错误 2025-01-11 11:37:40 +08:00
TsMask
6211a88f2e del: 移除captrace/data2html/crontask程序 2025-01-11 10:17:20 +08:00
TsMask
b73cd05af8 chore: 更新版本号 2.2501.2 2025-01-10 19:41:54 +08:00
TsMask
16d20fcad4 chore: 更新版本号 2.2501.1 2025-01-03 21:51:22 +08:00
TsMask
9f1a097e2a chore: 更新版本号 2.2412.4 2024-12-28 10:56:29 +08:00
TsMask
cfa0825e22 chore: 更新版本号 2.2412.3 2024-12-20 18:55:56 +08:00
TsMask
5bc958e911 chore: 更新版本号 2.2412.2 2024-12-13 21:23:58 +08:00
TsMask
e636f76506 chore: 更新版本号 2.2412.1 2024-12-09 09:58:32 +08:00
TsMask
1ca15477ca chore: 更新版本号 2.2411.4 2024-11-30 17:14:23 +08:00
TsMask
7ce96a7178 chore: 更新版本号 2.2411.3 2024-11-23 16:38:37 +08:00
TsMask
639107ba3d chore: 更新版本号 2.2411.2 2024-11-15 18:17:41 +08:00
dd0d67c0ea update spec for ky10 arm build 2024-11-12 09:24:50 +08:00
343e32735d update spec for build 2024-11-08 19:39:40 +08:00
37477ad9f1 update spec for build 2024-11-08 19:25:56 +08:00
1fb64561c4 update spec for build 2024-11-08 19:15:39 +08:00
abb2a8a33d update spec for build 2024-11-08 19:11:31 +08:00
TsMask
1dc143c062 chore: 更新版本号 2.2411.1 2024-11-08 17:56:57 +08:00
ff7973194f update makepkg.sh 2024-11-07 16:40:44 +08:00
c9277f1123 shell to sed fe src/hooks 2024-11-07 15:16:15 +08:00
b8c1740875 update make package shell 2024-11-07 14:57:42 +08:00
121cbea72e update make package sh 2024-11-07 14:46:21 +08:00
3e08ef0cc4 update build package shell script 2024-11-07 14:37:00 +08:00
38dabd180d support customized images and locales for FE 2024-11-07 11:47:18 +08:00
cd6578f57c update npm install --force 2024-11-05 18:02:49 +08:00
TsMask
f403456185 chore: 更新版本号 2.2410.4 2024-11-02 15:35:36 +08:00
dbded5635f update git ignore list 2024-11-01 17:29:25 +08:00
44fad7ae82 Optimize the packaging process 2024-11-01 17:24:37 +08:00
250 changed files with 2157 additions and 130773 deletions

16
.gitignore vendored
View File

@@ -8,18 +8,14 @@
# Local History for Visual Studio Code
.history/
# Run temp file and dir
docs/temp/
.idea/
# Built Visual Studio Code Extensions
*.vsix
*.log
*.log
*.bak
*.exe
# build and release package
build/
# !build/usr/local/omc/etc/db
debbuild/
!debbuild/22.04/DEBIAN/
!debbuild/DEBIAN/
release/
# Build Output
tmp/*

View File

@@ -4,23 +4,34 @@
OS: Ubuntu 18.04 / 22.04 (Recommendation)
Arch: amd64
Golang: go1.22.1 linux/amd64
Golang: go1.24.2 (or above)
Database: 10.6.16-MariaDB, Redis server v=5.0.5 (or above)
node.js: v18.16.0 (or above)
node.js: v20.18.0 (or above)
## Build Guide
### Pull Code
`pwd` default in `/root`
```bash
git clone https://xxx@bitbucket.org/bluearcuscom/ems.git omc.git
cd omc.git
git pull
cd fe.ems.vue3
npm install
npm run build
cd ../build.ems
./build.sh deb
git clone https://xxx@git/ems.git omc.git
cd omc.git && ls
# be.ems build.ems fe.ems.vue3
cp build.ems/pkg-* .
```
### Build System Pageage Manager
Modify the information in the script as appropriate
```bash
# Universal
bash pkg.sh --web --api -v 2.2508.1
# RemoveChinese
bash pkg-remove-chinese.sh --web --api -v 2.2508.1
# Docker
bash pkg-docker.sh -v 2.2508.1
```

Binary file not shown.

164
build-docker.sh Normal file
View File

@@ -0,0 +1,164 @@
#!/usr/bin/env bash
set -e
# Check if Docker is installed
if command -v docker &> /dev/null; then
echo $(docker --version)
else
echo "Docker is not installed"
exit 1
fi
# Default Version
VERSION="1.0.0"
# Default Platform
PLATFORM="amd64"
# Default System
SYSTEM="ubuntu22.04"
# usage
usage() {
echo "Usage: bash $0 [OPTION]"
echo
echo "Build Software Package OPTION:"
echo " -v, --version Specify the version"
echo " -p, --platform Specify the platform architecture (amd64,arm64)"
echo " -s, --system Specify the system image (ubuntu22.04,alpine3.20)"
echo " -h Display this help message"
echo
exit 1
}
# Read command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
-v|--version) VERSION="$2"; shift 2 ;; # Processing the version after -v
-p|--platform) PLATFORM="$2"; shift 2 ;; # Processing the platform after -p
-s|--system) SYSTEM="$2"; shift 2 ;; # Processing the system after -s
*) usage ;;
esac
done
# output result
echo "Version: $VERSION"
# =================== Compile System Information
# Determine if -p is passed in
if [ -n "$PLATFORM" ]; then
case $PLATFORM in
amd64) ;;
arm64) ;;
*)
echo "Error: platform be: $PLATFORM"
echo "can only be amd64/arm64"
exit 1
;;
esac
fi
echo "Platform: $PLATFORM"
# Determine if -s is passed in
if [ -n "$SYSTEM" ]; then
case $SYSTEM in
ubuntu22.04) ;;
alpine3.20) ;;
*)
echo "unknown system image: $SYSTEM"
exit 1
;;
esac
fi
echo "System: $SYSTEM"
# =================== Compile Variable Information
# Script Path
RootDir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# Compile Linux System Directory
BuildLinuxDir=${RootDir}/linux
# Compile Package Management Directory
BuildPackagelDir=${RootDir}/pkg
# Compile the build directory
BuildDir=${RootDir}/tmp
# Release Package directory
ReleaseDir=${RootDir}/release/docker/${PLATFORM}
# Release Package name file
ReleaseFileName=omc-r${VERSION}-docker-${SYSTEM}-${PLATFORM}
# =================== file processing
# Apply file handling
app() {
cd ${BuildDir}
# Database scripts within common are rebuild scripts
modeList="std lite"
for v in ${modeList}; do
# . /Located in the temporary directory
path=./linux/usr/local/etc/omc/database/${v}
cp -rf $path/common/* $path/install/
cp -rf $path/common/* $path/upgrade/
rm -rf $path/common
done
}
# =================== compile
docker_build() {
cd ${BuildDir}
# Replacement Tags {version} {arch}
sed -i "s/{version}/${VERSION}/g" ./${ReleaseFileName}/omc-docker.sh
sed -i "s/{arch}/${PLATFORM}/g" ./${ReleaseFileName}/omc-docker.sh
sed -i "s/{system}/${SYSTEM}/g" ./${ReleaseFileName}/omc-docker.sh
# check docker image
if ! docker images | grep -q "mariadb-$PLATFORM\s*10.6.21"; then
docker pull --platform linux/${PLATFORM} mariadb:10.6.21
docker tag mariadb:10.6.21 mariadb-$PLATFORM:10.6.21
fi
if [ ! -f ${BuildDir}/$ReleaseFileName/tar/mariadb_10.6.21_$PLATFORM.tar ]; then
docker save mariadb-$PLATFORM:10.6.21 -o ${BuildDir}/${ReleaseFileName}/tar/mariadb_10.6.21_$PLATFORM.tar
fi
if ! docker images | grep -q "keydb-$PLATFORM\s*6.3.4"; then
docker pull --platform linux/${PLATFORM} bitnami/keydb:6.3.4
docker tag bitnami/keydb:6.3.4 keydb-$PLATFORM:6.3.4
fi
if [ ! -f ${BuildDir}/$ReleaseFileName/tar/keydb_6.3.4_$PLATFORM.tar ]; then
docker save keydb-$PLATFORM:6.3.4 -o ${BuildDir}/${ReleaseFileName}/tar/keydb_6.3.4_$PLATFORM.tar
fi
# build omc
docker build --platform linux/${PLATFORM} --build-arg TARGETARCH=${PLATFORM} --build-arg VERSION=${VERSION} -t omc:${VERSION}-${SYSTEM}-${PLATFORM} .
docker save omc:${VERSION}-${SYSTEM}-${PLATFORM} -o ${BuildDir}/${ReleaseFileName}/tar/omc_${VERSION}-${SYSTEM}-${PLATFORM}.tar
# tar package
filename=${ReleaseFileName}.tar.gz
output=${ReleaseDir}/${filename}
tar -czf ${output} ./${ReleaseFileName}
echo "build success => ${output}"
# Generate HAX file
cd ${ReleaseDir}
md5sum ${filename} > ${filename}.md5
echo "md5 => $(cat ${filename}.md5)"
sha256sum ${filename} > ${filename}.sha256
echo "sha256 => $(cat ${filename}.sha256)"
}
# =================== building
echo
echo "building omc..."
mkdir -p ${BuildDir}/${ReleaseFileName}/tar
cp -rf ${BuildLinuxDir} ${BuildDir}
cp -rf ${BuildPackagelDir}/docker/linux ${BuildDir}
cp -rf ${BuildPackagelDir}/docker/tar/* ${BuildDir}/${ReleaseFileName}
cp -rf ${BuildPackagelDir}/docker/Dockerfile.${SYSTEM} ${BuildDir}/Dockerfile
app
docker_build
# bash build-docker.sh --version 2.2505.2 --platform amd64 --system ubuntu22.04
# bash build-docker.sh --version 2.2505.2 --platform amd64 --system alpine3.20

510
build.sh
View File

@@ -1,336 +1,188 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
# Default Version
VERSION="1.0.0"
# usage
usage() {
echo "Usage: $0 [OPTION] deb|badeb|rpm"
echo
echo "Build omc package, option as follow:"
echo " deb|badeb|rpm, deb: ubuntu|debian package build by dpkg"
echo " badeb: ubuntu|debian package build by dpkg"
echo " rpm: centos/redhat package, build by rpmbuild"
echo " -r, =build root directory build root directory, default directory is $HOME/omc.git"
echo " -d dump SQL from database"
echo
echo "Usage: bash $0 [OPTION]"
echo
echo "Build Software Package OPTION:"
echo " -v Specify the version"
echo " -h Display this help message"
echo
exit 1
}
# Read command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
-v) VERSION="$2"; shift 2 ;; # Processing the version after -v
*) usage ;;
esac
done
# output result
echo "Version: $VERSION"
# =================== Compile System Information
# package manager
get_manager() {
if command -v rpm &> /dev/null; then
echo "rpm"
elif command -v dpkg &> /dev/null; then
echo "deb"
else
echo "unknown manager"
cat /etc/os-release
exit 1
fi
}
# Get the package manager of the current system
PACKAGE_MANAGER=$(get_manager)
echo "Package Manager: $PACKAGE_MANAGER"
# System Architecture
get_arch() {
ARCH_UNAME=$(uname -m)
case $ARCH_UNAME in
x86_64) echo "amd64" ;;
aarch64) echo "arm64" ;;
i386|i686) echo "i386" ;;
*)
echo "unknown architecture: $ARCH_UNAME"
exit 1
;;
esac
}
# Get the architecture of the current system
PACKAGE_ARCH=$(get_arch)
echo "Architecture: $PACKAGE_ARCH"
# Operating System Name Version
get_os_name_version() {
if [ -f /etc/os-release ]; then
. /etc/os-release
# 检查 $ID 是否为空
if [ -z "$ID" ]; then
echo "ID is not defined in /etc/os-release"
exit 1
fi
echo "$ID$VERSION_ID"
else
echo "unknown ID: /etc/os-release not found"
exit 1
fi
}
# Get the current operating system name version
OS_NAME=$(get_os_name_version)
echo "OS Version: $OS_NAME"
# =================== Compile Variable Information
# Compile Date
Date=`date +%Y%m%d`
# Script Path
RootDir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# Compile Linux System Directory
BuildLinuxDir=${RootDir}/linux
# Compile Package Management Directory
BuildPackagelDir=${RootDir}/pkg
# Compile the build directory
BuildDir=${RootDir}/tmp
# Release Package directory
ReleaseDir=${RootDir}/release/${PACKAGE_MANAGER}/${PACKAGE_ARCH}
# Release Package name file
ReleaseFileName=omc-r${VERSION}-${Date}-${OS_NAME}-${PACKAGE_ARCH}.${PACKAGE_MANAGER}
# =================== file processing
# Apply file handling . /Located in the temporary directory
app() {
# Database scripts within common are rebuild scripts
modeList="std lite"
for v in ${modeList}; do
path=./usr/local/etc/omc/database/${v}
cp -rf $path/common/* $path/install/
cp -rf $path/common/* $path/upgrade/
rm -rf $path/common
done
}
pkgtype=""
new_args=()
# Traverse all parameters
for arg in "$@"; do
if [[ "$arg" == "deb" || "$arg" == "badeb" || "$arg" == "rpm" ]]; then
pkgtype=$arg
else
new_args+=("$arg") # Add non pkgtype parameters to a new parameter list
fi
done
if [ -z "$pkgtype" ]; then
usage
exit 1
# =================== system package manager
# deb package manager
deb() {
cd ${BuildDir}
# Replacement Tags {version} {arch}
sed -i "s/{arch}/${PACKAGE_ARCH}/g" ./DEBIAN/control
sed -i "s/{version}/${VERSION}/g" ./DEBIAN/control
sed -i "s/{date}/${Date}/g" ./DEBIAN/control
# Packaging deb
chmod 755 -R ${BuildDir}
dpkg -b ${BuildDir} ${ReleaseDir}/${ReleaseFileName}
echo "build success => ${ReleaseDir}/${ReleaseFileName}"
# Generate HAX file
cd ${ReleaseDir}
md5sum ${ReleaseFileName} > ${ReleaseFileName}.md5
echo "md5 => $(cat ${ReleaseFileName}.md5)"
sha256sum ${ReleaseFileName} > ${ReleaseFileName}.sha256
echo "sha256 => $(cat ${ReleaseFileName}.sha256)"
}
# rpm package manager
rpm() {
cd ${BuildDir}
ARCH_UNAME=$(uname -m)
# Replacement Tags {version} {arch} {date}
sed -i "s/{version}/${VERSION}/g" ./SPECS/omc.spec
sed -i "s/{arch}/${ARCH_UNAME}/g" ./SPECS/omc.spec
sed -i "s/{date}/${Date}/g" ./SPECS/omc.spec
# Packaging rpm
chmod 755 -R ${BuildDir}
rpmbuild -bb -D "_topdir ${BuildDir}" ${BuildDir}/SPECS/omc.spec
# Moving package to the distribution directory
if [[ "$OS_NAME" = "kylinV10" ]]; then # kylin system has ky10 tags
mv ${BuildDir}/RPMS/${ARCH_UNAME}/omc-${VERSION}-${Date}.ky10.${ARCH_UNAME}.rpm ${ReleaseDir}/${ReleaseFileName}
else
mv ${BuildDir}/RPMS/${ARCH_UNAME}/omc-${VERSION}-${Date}.${ARCH_UNAME}.rpm ${ReleaseDir}/${ReleaseFileName}
fi
rm -rf ${BuildDir}/RPMS
echo "build success => ${ReleaseDir}/${ReleaseFileName}"
# Generate HAX file
cd ${ReleaseDir}
md5sum ${ReleaseFileName} > ${ReleaseFileName}.md5
echo "md5 => $(cat ${ReleaseFileName}.md5)"
sha256sum ${ReleaseFileName} > ${ReleaseFileName}.sha256
echo "sha256 => $(cat ${ReleaseFileName}.sha256)"
}
# =================== building
echo
echo "building omc..."
rm -rf ${BuildDir} && mkdir -p ${BuildDir}
cp -rf ${BuildPackagelDir}/${PACKAGE_MANAGER}/* ${BuildDir}
if [[ $PACKAGE_MANAGER = "deb" ]]; then
cp -rf ${BuildLinuxDir}/* ${BuildDir}
cd ${BuildDir}
app
deb
elif [[ $PACKAGE_MANAGER = "rpm" ]]; then
cp -rf ${BuildLinuxDir}/* ${BuildDir}/BUILD
cd ${BuildDir}/BUILD
app
rpm
else
echo "unknown runing: $PACKAGE_MANAGER"
exit 1
fi
# Use a new parameter list
set -- "${new_args[@]}"
GitLocalRoot=${HOME}/omc.git
while getopts "r:d" option; do
case $option in
r)
GitLocalRoot=$OPTARG
;;
d)
dumpdb="yes"
;;
\?)
echo "Invalid option: -$OPTARG" >&2
usage
exit 2
;;
esac
done
if [ ! -d ${GitLocalRoot} ]; then
echo "Not exist directory: ${GitLocalRoot}"
exit 3
fi
ProjectL=omc
ProjectU=OMC
PROJECT=${ProjectL}
VERSION=2.2410.2
RelDate=`date +%Y%m%d`
RelVer=${VERSION}-${RelDate}-mt
Ky10Arch=ky10.aarch64
RpmPkgName=${ProjectL}-${RelVer}.ky10.aarch64.rpm
RpmPkgRename=${ProjectL}-r${RelVer}-ky10.rpm
DebPkgName=${ProjectL}-r${RelVer}-ub*.deb
EmsBEDir=${GitLocalRoot}/be.ems
EmsBuildRoot=${GitLocalRoot}/build.ems
RpmArch=`arch`
RpmsDir=${EmsBuildRoot}/rpmbuild/RPMS/
ReleaseDir=${EmsBuildRoot}/release
DumpToolDir=${EmsBEDir}/tools/misc
ProjectTag=""
BuildDir=${EmsBuildRoot}/build
CustomizedDir=${EmsBuildRoot}/customized
BuildOMCDir=${BuildDir}/usr/local/omc
BuildOMCBinDir=${BuildOMCDir}/bin
BuildOMCEtcDir=${BuildOMCDir}/etc
BuildLibDir=${BuildDir}/lib
BuildLibSystemDir=${BuildLibDir}/systemd/system
DebBuildDir=${EmsBuildRoot}/debbuild
DebBuildOMCDir=${EmsBuildRoot}/debbuild/usr/local/omc
DebFEBuildDir=${EmsBuildRoot}/debbuild/usr/local/omc/htdocs
DebBuild2204Dir=${EmsBuildRoot}/debbuild/22.04
DebBuild2204OMCDir=${EmsBuildRoot}/debbuild/22.04/usr/local/omc
DebFEBuild2204Dir=${EmsBuildRoot}/debbuild/22.04/usr/local/omc/htdocs
RpmBuildDir=${EmsBuildRoot}/rpmbuild
RpmFEBuildDir=${RpmBuildDir}/BUILD/usr/local/omc/htdocs
OmcInstallDir=/usr/local/omc
ConfigEtcDir=${EmsBEDir}/config/etc
ConfigSystemdDir=${EmsBEDir}/config/systemd
EmsFEDir=${GitLocalRoot}/fe.ems
EmsFEVue3Dir=${GitLocalRoot}/fe.ems.vue3/dist
LibDir=${EmsBEDir}/lib
RESTAGENT=restagent
CRONTASK=crontask
SshSvcBin=sshsvc
CapTraceBin=captrace
Data2htmlBin=data2html
NBI_ALARM=nbi_alarm
NBI_AGENT=nbi_agent
AAAA_AGENT=4a_agent
RestagentDir=${EmsBEDir}/${RESTAGENT}
CrontaskDir=${EmsBEDir}/${CRONTASK}
SshSvcDir=${EmsBEDir}/${SshSvcBin}
CapTraceDir=${EmsBEDir}/${CapTraceBin}
Data2htmlDir=${EmsBEDir}/${Data2htmlBin}
DBSQLSrcDir=${EmsBEDir}/database
MiscDir=${EmsBEDir}/misc
FrontBuildDir=${BuildOMCDir}/htdocs
FrontSrcDir=${EmsBEDir}/front
CrontaskSize=27788951
RestagentSize=29525312
BinWriterDir=${HOME}/bin
if [[ ${RpmArch} =~ "x86_64" ]];then
RelArch=amd64
elif [[ ${RpmArch} =~ "aarch64" ]];then
RelArch=arm64
fi
case "${pkgtype}" in
rpm)
ReleasePkgDir=${ReleaseDir}/rpms/${RelArch}
ProcList="restagent crontask sshsvc captrace data2html"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
echo "Make $procName ..."
make
done
cd $EmsBEDir
# make rpm
# clear build cache
rm -rf ${FrontBuildDir}/front/*
rm -rf ${RpmFEBuildDir}/front/*
rm -rf ${RpmBuildDir}/BUILD/usr/local/omc/etc/db/*
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
cp -rf ${CrontaskDir}/${CRONTASK} ${BuildOMCBinDir}
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
cp -rf ${CapTraceDir}/${CapTraceBin} ${BuildOMCBinDir}
cp -rf ${Data2htmlDir}/${Data2htmlBin} ${BuildOMCBinDir}
# ${BinWriterDir}/binWriter ${BuildOMCBinDir}/${RESTAGENT} ${RestagentSize}
# ${BinWriterDir}/binWriter ${BuildOMCBinDir}/${CRONTASK} ${CrontaskSize}
# cp -rf ${MiscDir}/ne-hosts ${BuildOMCBinDir}
# cp -rf ./nbi/${NBI_ALARM}/bin/${NBI_ALARM} ${BinDir2}
# cp -rf ./nbi/${NBI_AGENT}/bin/${NBI_AGENT} ${BinDir2}
# cp -rf ./${4A_AGENT}/bin/${4A_AGENT} ${BinDir2}
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
# rm -rf ${BinDir2}/ne-hosts
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgvue3
#Get SQL from database, overwrite from git
if [ "$dumpdb" = "yes" ]; then
cd ${DumpToolDir}
chmod +x ${DumpToolDir}/dumpsql.sh
${DumpToolDir}/dumpsql.sh
fi
cp -rf ${ConfigSystemdDir}/* ${BuildLibSystemDir}
#unzip ${FrontSrcDir}/front.zip -d ${FrontBuildDir} >/dev/null
mkdir -p ${FrontBuildDir}/front
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
chmod 755 ${BuildOMCBinDir}/*
# chmod 755 ${BinDir2}/*
cp -rf ${BuildDir}/* ${RpmBuildDir}/BUILD/
#cp -rf ${BuildDir}/nginx ${RpmBuildDir}/BUILD/etc/
#cp -rf ${BuildDir}/systemd ${RpmBuildDir}/BUILD/lib/
cd ${RpmBuildDir}
rpmbuild -bb -D "_topdir ${RpmBuildDir}" ${RpmBuildDir}/SPECS/omc.spec
mv -f $RpmsDir/$RpmArch/$RpmPkgName ${ReleasePkgDir}/$RpmPkgRename
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
# rpm --addsign *.rpm
md5sum $RpmPkgRename >omc-md5sum.txt
;;
deb)
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
ProcList="restagent crontask sshsvc captrace data2html"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
echo "Make $procName ..."
make
done
VersionID=`grep VERSION_ID /etc/os-release`
if [[ ${VersionID} =~ 'VERSION_ID="22.04"' ]]; then
DebBuildDir=${DebBuild2204Dir}
DebBuildOMCDir=${DebBuild2204OMCDir}
DebFEBuildDir=${DebFEBuild2204Dir}
#DebPkgFile=${PROJECT}-${VERSION}-22.04-${Release).${PLATFORM).deb
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub22.deb
if [ ! $ProjectTag = "" ]; then
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub22-${ProjectTag}.deb
fi
elif [[ ${VersionID} =~ 'VERSION_ID="18.04"' ]]; then
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub18.deb
if [ ! $ProjectTag = "" ]; then
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub18-${ProjectTag}.deb
fi
else
echo "Invalid OS release: ${VersionID}"
exit 1
fi
cd ${EmsBEDir}
#make deb
# clear build cache
rm -rf ${FrontBuildDir}/front/*
rm -rf ${DebFEBuildDir}/front/*
rm -rf ${DebBuildDir}/usr/local/omc/etc/db/*
rm -rf ${DebBuildOMCDir}/static/*
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
cp -rf ${CrontaskDir}/${CRONTASK} ${BuildOMCBinDir}
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
cp -rf ${CapTraceDir}/${CapTraceBin} ${BuildOMCBinDir}
cp -rf ${Data2htmlDir}/${Data2htmlBin} ${BuildOMCBinDir}
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgvue3
#Get SQL from database, overwrite from git
if [ "${dumpdb}" = "yes" ]; then
cd ${DumpToolDir}
chmod +x ${DumpToolDir}/dumpsql.sh
${DumpToolDir}/dumpsql.sh
fi
cp -rf ${ConfigSystemdDir}/* ${BuildLibSystemDir}
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
chmod 755 ${BuildOMCBinDir}/*
chmod 755 ${DebBuildDir}/DEBIAN/preinst
chmod 755 ${DebBuildDir}/DEBIAN/postinst
chmod 755 ${DebBuildDir}/DEBIAN/postrm
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/agt.d ${DebBuildOMCDir}/static
cp -rf ${CustomizedDir}/omc.d ${DebBuildOMCDir}/static
#cp -rf ${BuildDir}/nginx/* ${DebBuildDir}/etc/nginx/conf.d
#cp -rf ${BuildDir}/systemd/*.service ${DebBuildDir}/lib/systemd/system/
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: omcuser/g' ${DebBuildDir}/usr/local/omc/etc/default/restconf.yaml
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
# rpm --addsign *.rpm
md5sum ${DebPkgName} >omc-md5sum.txt
;;
badeb)
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
ProcList="restagent crontask sshsvc captrace data2html"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
echo "Make $procName ..."
make
done
VersionID=`grep VERSION_ID /etc/os-release`
if [[ ${VersionID} =~ 'VERSION_ID="22.04"' ]]; then
DebBuildDir=${DebBuild2204Dir}
DebBuildOMCDir=${DebBuild2204OMCDir}
DebFEBuildDir=${DebFEBuild2204Dir}
#DebPkgFile=${PROJECT}-${VERSION}-22.04-${Release).${PLATFORM).deb
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub22-ba.deb
elif [[ ${VersionID} =~ 'VERSION_ID="18.04"' ]]; then
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub18-ba.deb
else
echo "Invalid OS release: ${VersionID}"
exit 1
fi
cd ${EmsBEDir}
#make deb
# clear build cache
rm -rf ${FrontBuildDir}/front/*
rm -rf ${DebFEBuildDir}/front/*
rm -rf ${DebBuildDir}/usr/local/omc/etc/db/*
rm -rf ${DebBuildOMCDir}/static/*
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
cp -rf ${CrontaskDir}/${CRONTASK} ${BuildOMCBinDir}
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
cp -rf ${CapTraceDir}/${CapTraceBin} ${BuildOMCBinDir}
cp -rf ${Data2htmlDir}/${Data2htmlBin} ${BuildOMCBinDir}
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgvue3
#Get SQL from database, overwrite from git
if [ "${dumpdb}" = "yes" ]; then
cd ${DumpToolDir}
chmod +x ${DumpToolDir}/dumpsql.sh
${DumpToolDir}/dumpsql.sh
fi
cp -rf ${ConfigSystemdDir}/* ${BuildLibSystemDir}
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
chmod 755 ${BuildOMCBinDir}/*
chmod 755 ${DebBuildDir}/DEBIAN/preinst
chmod 755 ${DebBuildDir}/DEBIAN/postinst
chmod 755 ${DebBuildDir}/DEBIAN/postrm
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/ba.d ${DebBuildOMCDir}/static
# replace Chinese character
find "${DebBuildOMCDir}/etc/db" -type f -name '*.sql' -exec sed -i 's/[一-龥]//g' {} +
echo "Replace all chinese character."
chmod +x ${DebBuildDir}/usr/local/omc/bin
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: omcuser/g' ${DebBuildDir}/usr/local/omc/etc/default/restconf.yaml
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
md5sum ${DebPkgName} >omc-md5sum.txt
;;
*)
usage
exit 4
;;
esac
# bash build.sh -v 2.2505.2

View File

@@ -1,71 +0,0 @@
server {
listen 44080;
listen 44443;
listen [::]:44080;
listen [::]:44443;
server_name localhost;
client_max_body_size 100M;
keepalive_timeout 180s;
#access_log /var/log/nginx/host.access.log main;
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
# ssl_verify_client on;
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_session_timeout 5m;
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
# ssl_prefer_server_ciphers on;
# OMC
location / {
root /usr/local/omc/htdocs/front;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /omc-api/ {
proxy_pass http://127.0.0.1:33030/;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
location /api/rest/ {
proxy_pass http://127.0.0.1:33030/api/rest/;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@@ -1,38 +0,0 @@
-----BEGIN OPENSSH PRIVATE KEY-----
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
-----END OPENSSH PRIVATE KEY-----

View File

@@ -1 +0,0 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCjzE0MHy0P2sQmG1OKvArwLEzR77BwxPp+4N9NKBz8lEyNch4zoHvoLDaUJKPBMwTrScZnxhvRJNde6hz5Z0QVxZolVKV95fMfgb9YICzDfPF3Bphae5q/PBYUJNfrC9SAjQeHV4CCO6xk6LV8O/Nfw8uaXwtuN3yfpUWd5mRWKMc3GHV4vxerfKoIQZN6etLhIEYibAhCJ21P0uoWzZl7ceLmkG+6qrRSbyC0bCnrN3+wjN4bwtflrEFJk3XQGuRbVsYLzux+mMm9p22+CLPRl/FUPF3x4/wKCsqr7JDSxx80HSPhk4g/1nCTpDR9hAfF6A9ww2va/k8jMeYPBO8Owe7erLEZzvg5WQAR3Wj05eJpJD99BeC91S5KW6AFQDfDHxWWprSibd/Jj9dtct2pK2ZxW0ph9OJ49ftRhzT1iVi4UnJwnG5/qLfwl6Tnx+qnQ1If/9lY/99erCTATzFTMSImKrRz7CnuPlcw8WkzCYpWKKe0kJLkL2cRD5Qi4yk= simon@simonzhangsz

View File

@@ -1,38 +0,0 @@
-----BEGIN OPENSSH PRIVATE KEY-----
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
-----END OPENSSH PRIVATE KEY-----

View File

@@ -1,49 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
AmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
AmfGuamiList: ""
SnssaiList: ""
MaxUser: ""
RelativeCapacity: ""
MaxGnbNum: ""
EpRpDynN8Amf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN11Amf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN12Amf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,48 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
SmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
MaxPduSessions: ""
MaxQfi: ""
UpfList: ""
AddrPool:
Id: ""
UserLabel: ""
AddrType: "Static"
IpVersion: ""
AddrSegList: ""
EpRpDynN7Smf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN10Smf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,39 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
UdmFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
UdrFunction:
Id: ""
UserLabel: ""
AddrType: "Static"
IpVersion: ""
AddrSegList: ""
AusfFunction:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,141 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
InventoryUnitRack:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
MaxPduSessions: ""
MaxQfi: ""
UpfList: ""
InventoryUnitShelf:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
RackPosition: ""
InventoryUnitPack:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
PortsInformation: ""
PackPosition: ""
SlotsOccupied: ""
InventoryUnitHost:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
HostPosition: ""
NumberOfCpu: ""
MemSize: ""
HardDiskSize: ""
InventoryUnitAccessory:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
AccessoryPosition: ""
AccessoryType: ""
AddtionalInformation: ""
UpfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
MaxQosFlows: ""
MaxThroughput: ""
EpRpDynN9Upf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN3Upf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
AmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
UdrFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
AusfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,182 +0,0 @@
select count(*) from kpi_report_upf
CREATE VIEW kpi_report_all AS
SELECT * FROM kpi_report_udm
UNION ALL
SELECT * FROM kpi_report_amf
UNION ALL
SELECT * FROM kpi_report_upf;
select DISTINCT(ne_type) from kpi_title
SELECT DISTINCT LOWER(ne_type) FROM kpi_title
SELECT JSON_EXTRACT(kpi_values, CONCAT('$[', @path, '].', @key_to_search)) AS value FROM kpi_report_upf where `date`="2024-04-26";
SELECT JSON_EXTRACT(JSON_CONTAINS(kpi_values, '{"kpi_id": "UPF.01"}') FROM kpi_report_upf where `date`="2024-04-26";
SELECT
JSON_EXTRACT(kpi_values, CONCAT('$[', JSON_UNQUOTE(JSON_SEARCH(kpi_values, 'kpi_id', 'UPF.01')), '].value')) AS value_UPF01,
JSON_EXTRACT(kpi_values, CONCAT('$[', JSON_UNQUOTE(JSON_SEARCH(kpi_values, 'kpi_id', 'UPF.03')), '].value')) AS value_UPF03
FROM
kpi_report_upf
WHERE
JSON_SEARCH(kpi_values, 'kpi_id', 'UPF.01') IS NOT NULL
AND JSON_SEARCH(kpi_values, 'kpi_id', 'UPF.03') IS NOT NULL;
SELECT
JSON_EXTRACT(kpi_values, CONCAT('$[', JSON_UNQUOTE(JSON_SEARCH(kpi_values, 'all', 'UPF.01')), '].value')) AS value_UPF01
FROM
kpi_report_upf
WHERE
JSON_CONTAINS(kpi_values, '{"kpi_id": "UPF.01"}');
SELECT
COALESCE(JSON_EXTRACT(kpi_values, CONCAT('$[', JSON_UNQUOTE(JSON_SEARCH(kpi_values, 'all', 'UPF.01')), '].value')), 0) AS value_UPF01
FROM
kpi_report_upf
WHERE
JSON_CONTAINS(kpi_values, '{"kpi_id": "UPF.01"}');
SELECT
CONCAT(
DATE_FORMAT( gk.start_time, '%H:' ),
LPAD( FLOOR( MINUTE ( gk.start_time ) / 15 ) * 15, 2, '0' )
) AS timeGroup,
min( CASE WHEN gk.INDEX != '' THEN gk.INDEX ELSE 0 END ) AS startIndex,
min( CASE WHEN gk.ne_name != '' THEN gk.ne_name ELSE 0 END ) AS neName,
sum( CASE WHEN JSON_CONTAINS(kpi_values,JSON_OBJECT('kpi_id', "UPF.01")) THEN gk.kpi_values->'$[*].value ELSE 0 END ) AS 'UPF.01',
sum( CASE WHEN JSON_CONTAINS(kpi_values,JSON_OBJECT('kpi_id', "UPF.02")) THEN gk.kpi_values->'$[*].value ELSE 0 END ) AS 'UPF.02',
sum( CASE WHEN gk.kpi_id = 'UPF.03' THEN gk.VALUE ELSE 0 END ) AS 'UPF.03',
sum( CASE WHEN gk.kpi_id = 'UPF.04' THEN gk.VALUE ELSE 0 END ) AS 'UPF.04',
sum( CASE WHEN gk.kpi_id = 'UPF.05' THEN gk.VALUE ELSE 0 END ) AS 'UPF.05',
sum( CASE WHEN gk.kpi_id = 'UPF.06' THEN gk.VALUE ELSE 0 END ) AS 'UPF.06',
sum( CASE WHEN gk.kpi_id = 'UPF.07' THEN gk.VALUE ELSE 0 END ) AS 'UPF.07',
sum( CASE WHEN gk.kpi_id = 'UPF.08' THEN gk.VALUE ELSE 0 END ) AS 'UPF.08',
sum( CASE WHEN gk.kpi_id = 'UPF.09' THEN gk.VALUE ELSE 0 END ) AS 'UPF.09',
sum( CASE WHEN gk.kpi_id = 'UPF.10' THEN gk.VALUE ELSE 0 END ) AS 'UPF.10',
sum( CASE WHEN gk.kpi_id = 'UPF.14' THEN gk.VALUE ELSE 0 END ) AS 'UPF.14',
sum( CASE WHEN gk.kpi_id = 'UPF.11' THEN gk.VALUE ELSE 0 END ) AS 'UPF.11',
sum( CASE WHEN gk.kpi_id = 'UPF.12' THEN gk.VALUE ELSE 0 END ) AS 'UPF.12',
sum( CASE WHEN gk.kpi_id = 'UPF.13' THEN gk.VALUE ELSE 0 END ) AS 'UPF.13',
sum( CASE WHEN gk.kpi_id = 'UPF.15' THEN gk.VALUE ELSE 0 END ) AS 'UPF.15'
FROM
kpi_report_upf gk
WHERE
gk.rm_uid = '4400HX1UPF001'
AND gk.date = "2024-04-26"
AND gk.start_time >= '00:00:00'
AND gk.start_time <= '23:59:59'
GROUP BY
timeGroup
ORDER BY
timeGroup DESC
SELECT
CONCAT(
DATE_FORMAT( gk.start_time, '%H:' ),
LPAD( FLOOR( MINUTE ( gk.start_time ) / 15 ) * 15, 2, '0' )
) AS timeGroup,
min( CASE WHEN gk.INDEX != '' THEN gk.INDEX ELSE 0 END ) AS startIndex,
min( CASE WHEN gk.ne_name != '' THEN gk.ne_name ELSE 0 END ) AS neName,
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[0].kpi_id') = "UPF.01" THEN JSON_EXTRACT(gk.kpi_values, '$[0].value') ELSE 0 END) AS 'UPF.01',
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[1].kpi_id') = "UPF.02" THEN JSON_EXTRACT(gk.kpi_values, '$[1].value') ELSE 0 END) AS 'UPF.02',
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[2].kpi_id') = "UPF.03" THEN JSON_EXTRACT(gk.kpi_values, '$[2].value') ELSE 0 END) AS 'UPF.03'
FROM
kpi_report_upf gk
WHERE
gk.rm_uid = '4400HX1UPF001'
AND gk.date = "2024-05-08"
AND gk.start_time >= '10:55:00'
AND gk.start_time <= '23:59:59'
GROUP BY
timeGroup
ORDER BY
timeGroup DESC
SELECT
CONCAT(
DATE_FORMAT( gk.start_time, '%H:' ),
LPAD( FLOOR( MINUTE ( gk.start_time ) / 15 ) * 15, 2, '0' )
) AS timeGroup,
min( CASE WHEN gk.INDEX != '' THEN gk.INDEX ELSE 0 END ) AS startIndex,
min( CASE WHEN gk.ne_name != '' THEN gk.ne_name ELSE 0 END ) AS neName,
SUM(JSON_EXTRACT(gk.kpi_values, '$[0].`UPF.01`')) AS 'UPF.01',
SUM(JSON_EXTRACT(gk.kpi_values, '$[1].`UPF.02`')) AS 'UPF.02',
SUM(JSON_EXTRACT(gk.kpi_values, '$[2].`UPF.03`')) AS 'UPF.03'
FROM
kpi_report_upf gk
WHERE
gk.rm_uid = '4400HX1UPF001'
AND gk.date = "2024-05-08"
AND gk.start_time >= '10:53:00'
AND gk.start_time <= '10:59:59'
GROUP BY
timeGroup
ORDER BY
timeGroup DESC
SELECT
min( CASE WHEN gk.INDEX != '' THEN gk.INDEX ELSE 0 END ) AS startIndex,
min( CASE WHEN gk.ne_name != '' THEN gk.ne_name ELSE 0 END ) AS neName,
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[*].kpi_id') = 'UPF.01' THEN JSON_EXTRACT(gk.kpi_values, '$[*].value') ELSE 0 END) AS 'UPF.01',
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[*].kpi_id') = 'UPF.02' THEN JSON_EXTRACT(gk.kpi_values, '$[*].value') ELSE 0 END) AS 'UPF.02',
SUM(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[*].kpi_id') = 'UPF.03' THEN JSON_EXTRACT(gk.kpi_values, '$[*].value') ELSE 0 END) AS 'UPF.03'
FROM
kpi_report_upf gk
WHERE
gk.rm_uid = '4400HX1UPF001'
AND gk.date = "2024-05-03"
AND gk.start_time >= '00:00:00'
AND gk.start_time <= '23:59:59'
SELECT
CONCAT( DATE_FORMAT(CONCAT(gk.`date`, " ", gk.start_time), '%Y-%m-%d %H:'), LPAD(FLOOR(MINUTE(gk.start_time) / 15) * 15, 2, '0') ) AS timeGroup,
min(CASE WHEN gk.index != '' THEN gk.index ELSE 0 END) AS startIndex,
min(CASE WHEN gk.ne_type != '' THEN gk.ne_type ELSE 0 END) AS neType,
min(CASE WHEN gk.ne_name != '' THEN gk.ne_name ELSE 0 END) AS neName,
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[0].kpi_id') = 'UPF.01' THEN JSON_EXTRACT(gk.kpi_values, '$[0].value') ELSE 0 END) AS 'UPF.01',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[1].kpi_id') = 'UPF.02' THEN JSON_EXTRACT(gk.kpi_values, '$[1].value') ELSE 0 END) AS 'UPF.02',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[2].kpi_id') = 'UPF.03' THEN JSON_EXTRACT(gk.kpi_values, '$[2].value') ELSE 0 END) AS 'UPF.03',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[3].kpi_id') = 'UPF.04' THEN JSON_EXTRACT(gk.kpi_values, '$[3].value') ELSE 0 END) AS 'UPF.04',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[4].kpi_id') = 'UPF.05' THEN JSON_EXTRACT(gk.kpi_values, '$[4].value') ELSE 0 END) AS 'UPF.05',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[5].kpi_id') = 'UPF.06' THEN JSON_EXTRACT(gk.kpi_values, '$[5].value') ELSE 0 END) AS 'UPF.06',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[6].kpi_id') = 'UPF.07' THEN JSON_EXTRACT(gk.kpi_values, '$[6].value') ELSE 0 END) AS 'UPF.07',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[7].kpi_id') = 'UPF.08' THEN JSON_EXTRACT(gk.kpi_values, '$[7].value') ELSE 0 END) AS 'UPF.08',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[8].kpi_id') = 'UPF.09' THEN JSON_EXTRACT(gk.kpi_values, '$[8].value') ELSE 0 END) AS 'UPF.09',
sum(CASE WHEN JSON_EXTRACT(gk.kpi_values, '$[9].kpi_id') = 'UPF.10' THEN JSON_EXTRACT(gk.kpi_values, '$[9].value') ELSE 0 END) AS 'UPF.10'
FROM kpi_report_upf gk
where gk.rm_uid = '4400HX1UPF001' and gk.ne_type = 'UPF' and CONCAT(gk.`date`, " ", gk.start_time) >= '2024-05-08 10:00:00' and CONCAT(gk.`date`, " ", gk.start_time) <= '2024-05-08 23:59:59'
GROUP BY timeGroup order by timeGroup desc
DELETE t1
FROM ne_state t1
JOIN (
SELECT `timestamp`
FROM ne_state where ne_type='upf'
ORDER BY id DESC
LIMIT 999999 OFFSET 3
) t2 ON t1.`timestamp` = t2.`timestamp` and ne_type='upf';
select count(1) from ne_state where ne_type='upf'
CREATE TABLE IF NOT EXISTS kpi_report_test AS SELECT * FROM kpi_report WHERE 1=0;ALTER TABLE kpi_report_test MODIFY COLUMN `id` int(11) NOT NULL AUTO_INCREMENT FIRST,ADD PRIMARY KEY IF NOT EXISTS (`id`);
ALTER TABLE kpi_report_ims MODIFY COLUMN `id` int(11) NOT NULL AUTO_INCREMENT FIRST,ADD PRIMARY KEY IF NOT EXISTS (`id`)
SELECT * FROM kpi_report WHERE 1=0

View File

@@ -1,71 +0,0 @@
server {
listen 44080;
listen 44443;
listen [::]:44080;
listen [::]:44443;
server_name localhost;
client_max_body_size 100M;
keepalive_timeout 180s;
#access_log /var/log/nginx/host.access.log main;
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
# ssl_verify_client on;
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_session_timeout 5m;
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
# ssl_prefer_server_ciphers on;
# OMC
location / {
root /usr/local/omc/htdocs/front;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /omc-api/ {
proxy_pass http://127.0.0.1:33030/;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
location /api/rest/ {
proxy_pass http://127.0.0.1:33030/api/rest/;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="DataFile">
<xs:complexType>
<xs:sequence>
<xs:element name="FileHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="TimeStamp" type="xs:dateTime"/>
<xs:element name="TimeZone" type="xs:string"/>
<xs:element name="VendorName" type="xs:string" minOccurs="0"/>
<xs:element name="ElementType" type="xs:string" minOccurs="0"/>
<xs:element name="CmVersion" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Objects" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ObjectType" type="xs:string"/>
<!--该字段必选-->
<xs:element name="FieldName">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="N">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FieldValue">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Object">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="V">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="rmUID" type="xs:string" use="required"/>
<xs:attribute name="Dn" type="xs:string"/>
<!-- //无线、核心网专业该字段必选传输、IP专业、业务系统无该字段-->
<xs:attribute name="UserLabel" type="xs:string"/>
<!-- //无线、核心网专业该字段必选传输、IP专业、业务系统无该字段-->
<xs:attribute name="PVFlag" type="xs:string" use="required"/>
<!-- //必须-->
<xs:attribute name="VMID" type="xs:string"/>
<!-- //VNF网络或VNF和PNF混合组网虚拟网元必选物理网元无该字段-->
<xs:attribute name="VNFInstanceID" type="xs:string"/>
<!-- //VNF网络或VNF和PNF混合组网虚拟网元必选物理网元无该字段-->
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -1,221 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- This XSLT will convert a PDML file, saved by Wireshark, into
HTML. The HTML page should look similar to Wireshark. See
https://gitlab.com/wireshark/wireshark/-/wikis/PDML for information
on how to generate such a HTML file from PDML.
For questions contact Dirk Jagdmann (doj@cubic.org).
Version: 2010-06-09
Wireshark - Network traffic analyzer
By Gerald Combs <gerald@wireshark.org>
Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
-->
<!-- set parameters of the HTML output -->
<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="no" standalone="yes" indent="yes"/>
<!-- this matches the "field" tag -->
<xsl:template match="field">
&#160;&#160;&#160; <!-- indent with 3 non-breaking spaces -->
<!-- output either the "showname" or "show" attribute -->
<xsl:choose>
<xsl:when test="string-length(@showname)>0">
<xsl:value-of select="@showname"/><br/>
</xsl:when>
<xsl:otherwise>
<!--<xsl:value-of select="@name"/>:--> <xsl:value-of select="@show"/><br/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
</xsl:template>
<!-- this matches the "packet" tag -->
<xsl:template match="packet">
<!-- declare some variables for later use -->
<xsl:variable name="frame_num" select="proto[@name='frame']/field[@name='frame.number']/@show"/>
<xsl:variable name="frame_id" select="concat('f',$frame_num)"/>
<xsl:variable name="frame_c" select="concat($frame_id,'c')"/>
<!-- the "title" bar of the frame -->
<div width="100%" id="{$frame_id}">
<a href="javascript:toggle_node('{$frame_c}')">&#8658;</a> <!-- #8658 is a "rArr" (double right arrow) character -->
Frame <xsl:value-of select="$frame_num"/>:
<xsl:for-each select="proto[@name!='geninfo']">
<xsl:value-of select="@name"/>,
</xsl:for-each>
<small><a href="javascript:hide_node('{$frame_id}')">[X]</a></small>
</div>
<!-- the frame contents are stored in a div, so we can toggle it -->
<div width="100%" id="{$frame_c}" style="display:none">
<!-- loop through all proto tags, but skip the "geninfo" one -->
<xsl:for-each select="proto[@name!='geninfo']">
<xsl:variable name="proto" select="concat($frame_id,@name,count(preceding-sibling::proto)+1)"/>
<!-- the "title" bar of the proto -->
<div width="100%" style="background-color:#e5e5e5; margin-bottom: 2px">
&#160;<a href="javascript:toggle_node('{$proto}')">&#8658;</a>&#160;<xsl:value-of select="@showname"/>
<!-- print "proto" details inside another div -->
<div width="100%" id="{$proto}" style="display:none">
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
</div>
</div>
</xsl:for-each>
</div>
<!-- use the javascript function set_node_color() to set the color
of the frame title bar. Defer colorization until the full page has
been loaded. If the browser would support the XPath function
replace() we could simply set the class attribute of the title bar div,
but for now we're stuck with class names from Wireshark's colorfilters
that contain spaces and we can't handle them in CSS. -->
<script type="text/javascript">
dojo.addOnLoad(function(){
set_node_color(
'<xsl:value-of select="$frame_id"/>',
'<xsl:value-of select="proto[@name='frame']/field[@name='frame.coloring_rule.name']/@show"/>'
);
});
</script>
</xsl:template>
<xsl:template match="pdml">
Capture Filename: <b><xsl:value-of select="@capture_file"/></b>
PDML created: <b><xsl:value-of select="@time"/></b>
<tt>
<xsl:apply-templates/> <!-- we expect to match the "packet" nodes -->
</tt>
</xsl:template>
<!-- this block matches the start of the PDML file -->
<xsl:template match="/">
<html>
<head>
<title>poor man's Wireshark</title>
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" type="text/javascript"></script>
<script type="text/javascript">
function set_node(node, str)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
node.style.display = str;
}
function toggle_node(node)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
set_node(node, (node.style.display != 'none') ? 'none' : 'block');
}
function hide_node(node)
{
set_node(node, 'none');
}
// this function was generated by colorfilters2js.pl
function set_node_color(node,colorname)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
var fg;
var bg;
if(colorname == 'Bad TCP') {
bg='#000000';
fg='#ff5f5f';
}
if(colorname == 'HSRP State Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'Spanning Tree Topology Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'OSPF State Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'ICMP errors') {
bg='#000000';
fg='#00ff0e';
}
if(colorname == 'ARP') {
bg='#d6e8ff';
fg='#000000';
}
if(colorname == 'ICMP') {
bg='#c2c2ff';
fg='#000000';
}
if(colorname == 'TCP RST') {
bg='#900000';
fg='#fff680';
}
if(colorname == 'TTL low or unexpected') {
bg='#900000';
fg='#ffffff';
}
if(colorname == 'Checksum Errors') {
bg='#000000';
fg='#ff5f5f';
}
if(colorname == 'SMB') {
bg='#fffa99';
fg='#000000';
}
if(colorname == 'HTTP') {
bg='#8dff7f';
fg='#000000';
}
if(colorname == 'IPX') {
bg='#ffe3e5';
fg='#000000';
}
if(colorname == 'DCERPC') {
bg='#c797ff';
fg='#000000';
}
if(colorname == 'Routing') {
bg='#fff3d6';
fg='#000000';
}
if(colorname == 'TCP SYN/FIN') {
bg='#a0a0a0';
fg='#000000';
}
if(colorname == 'TCP') {
bg='#e7e6ff';
fg='#000000';
}
if(colorname == 'UDP') {
bg='#70e0ff';
fg='#000000';
}
if(colorname == 'Broadcast') {
bg='#ffffff';
fg='#808080';
}
if(fg.length > 0)
node.style.color = fg;
if(bg.length > 0)
node.style.background = bg;
}
</script>
</head>
<body>
<xsl:apply-templates/> <!-- we expect to match the "pdml" node -->
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="PmFile">
<xs:complexType>
<xs:sequence>
<xs:element name="FileHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="TimeStamp" type="xs:dateTime" />
<xs:element name="TimeZone" type="xs:string" />
<xs:element name="Period" type="xs:integer" />
<xs:element name="VendorName" type="xs:string" />
<xs:element name="ElementType" type="xs:string" />
<xs:element name="PmVersion" type="xs:string" />
<xs:element name="StartTime" type="xs:dateTime" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Measurements" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ObjectType" type="xs:string" />
<xs:element name="PmName">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="N">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PmData">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Object">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="V">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="CV">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="SN" type="xs:string" />
<xs:element name="SV" type="xs:string" />
</xs:sequence>
<xs:attribute name="i" type="xs:integer"
use="required" />
</xs:complexType>
</xs:element>
</xs:choice>
<xs:attribute name="rmUID" type="xs:string" use="required" />
<xs:attribute name="Dn" type="xs:string" use="required" />
<xs:attribute name="UserLabel" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -1,20 +0,0 @@
SET FOREIGN_KEY_CHECKS = 0;
--
REPLACE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', 'https://www.agrandtech.com', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark');
REPLACE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark');
REPLACE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark');
REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'true', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark');
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'AGrand EMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 千通科技', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'AGrand EMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 AGrandTech', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);
UPDATE `sys_menu` SET `status` = '1' WHERE `menu_id` = 2122;
SET FOREIGN_KEY_CHECKS = 1;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -1,20 +0,0 @@
SET FOREIGN_KEY_CHECKS = 0;
--
REPLACE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', 'https://www.bluearcus.com', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark');
REPLACE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark');
REPLACE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark');
REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'false', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark');
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'BlueArcus EMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 BlueArcus', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'BlueArcus EMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 BlueArcus', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);
UPDATE `sys_menu` SET `status` = '0' WHERE `menu_id` = 2122;
SET FOREIGN_KEY_CHECKS = 1;

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -1,20 +0,0 @@
SET FOREIGN_KEY_CHECKS = 0;
--
REPLACE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', '#', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark');
REPLACE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark');
REPLACE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark');
REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'true', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark');
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'OMC', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'OMC', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);
UPDATE `sys_menu` SET `status` = '1' WHERE `menu_id` = 2122;
SET FOREIGN_KEY_CHECKS = 1;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -1,8 +0,0 @@
Package: OMC
Version: 2.2410.2-YYYYMMDD-mt
Section: AGrandTech
Prioritt: optional
Architecture: amd64
Maintainer: Simon Zhangsz
Depends:
Description: OMC

View File

@@ -1,168 +0,0 @@
# !/bin/bash
OMCRootDir=/usr/local/omc
SystemdRootDir=/lib/systemd/system
OMCEtcDir=${OMCRootDir}/etc
FERootDir=${OMCRootDir}/htdocs/front
X86Lib64Dir=/lib/x86_64-linux-gnu
OMCBinDir=${OMCRootDir}/bin
OMCStaticDir=${OMCRootDir}/static
UsrLocalBinDir=/usr/local/bin
OMCDaemon=omcd
NginxEtcDir=/etc/nginx
NginxConfDir=${NginxEtcDir}/conf.d
CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml omc.conf"
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
echo ""
echo "* To start/stop/restart/status omc service, please run:"
echo " sudo systemctl start/stop/restart/status restagent.service"
echo " sudo systemctl start/stop/restart/status crontask.service"
echo " sudo systemctl start/stop/restart/status sshsvc.service"
echo " sudo systemctl start/stop/restart/status captrace.service"
echo " or run: "
echo " sudo /usr/local/omc/bin/omcsvc.sh start/stop/restart/status"
echo ""
cd ${X86Lib64Dir}
chmod +rx libwireshark.so.15.0.12
if [ ! -e libwireshark.so.15 ]; then ln -s libwireshark.so.15.0.12 libwireshark.so.15; fi
if [ ! -e libwireshark.so ]; then ln -s libwireshark.so.15.0.12 libwireshark.so; fi
chmod +rx libwiretap.so.12.0.12
if [ ! -e libwiretap.so.12 ]; then ln -s libwiretap.so.12.0.12 libwiretap.so.12; fi
if [ ! -e libwiretap.so ]; then ln -s libwiretap.so.12.0.12 libwiretap.so; fi
chmod +rx libwsutil.so.13.1.0
if [ ! -e libwsutil.so.13 ]; then ln -s libwsutil.so.13.1.0 libwsutil.so.13; fi
if [ ! -e libwsutil.so ]; then ln -s libwsutil.so.13.1.0 libwsutil.so; fi
cd ${UsrLocalBinDir}
if [ ! -e ${OMCDaemon} ]; then ln -s ${OMCBinDir}/omcsvc.sh ${OMCDaemon}; fi
chmod +rx ${OMCRootDir}/bin/*
chmod +rx ${OMCRootDir}/*
chmod +rx ${UsrLocalBinDir}/*
chmod -R 755 ${OMCRootDir}/htdocs/front
for CFile in ${CFileList}; do
if [ ! -e "${OMCEtcDir}/${CFile}" ]; then
cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}
else
# mv -f ${OMCEtcDir}/${CFile} ${OMCEtcDir}/${CFile}.bak
# cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}
if [ -e "${OMCBinDir}/upgconf.sh" ]; then
${OMCBinDir}/upgconf.sh
fi
fi
done
# # Install redis db if not exist /usr/local/db
# if [ ! -e "${RedisRootDir}/bin/kvdb-server" ]; then
# # if [ ! -e "${RedisRootDir}" ]; then
# # mkdir -p ${RedisRootDir}
# # fi
# # stop old adb service
# if [ -e "${RedisOldRootDir}/bin/redis-server" ] && [ -e "${SystemdRootDir}/adb.service" ]; then
# systemctl stop adb.service
# systemctl disable adb.service
# fi
# # stop adb service
# if [ -e "${UsrLocalBinDir}/adb-server" ] && [ -e "${SystemdRootDir}/adb.service" ]; then
# systemctl stop adb.service
# systemctl disable adb.service
# fi
# cp -rf ${DependsRootDir}/kvdb/* /
# chmod +rx ${RedisRootDir}/bin/kvdb*
# if [ ! -e "${RedisConfDir}/kvdb.conf" ]; then
# cp ${RedisConfDir}/default/kvdb.conf ${RedisConfDir}
# fi
# sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/kvdb.conf
# LINE="masterauth helloearth"
# FILE="${RedisConfDir}/kvdb.conf"
# # 检查文件中是否存在该行
# if ! grep -qxF "$LINE" "$FILE"; then
# # 如果不存在,将其添加到文件末尾
# echo "$LINE" >> "$FILE"
# fi
# # copy the old adb dump.rdb
# if [ -e "${RedisOldRootDir}/bin/conf/dump.rdb" ] && [ ! -e "${RedisRootDir}/etc/kvdb/dump.rdb" ]; then
# cp -f ${RedisOldRootDir}/bin/conf/dump.rdb ${RedisRootDir}/etc/kvdb/;
# mv -f ${RedisRootDir}/db ${RedisRootDir}/adb.old
# fi
# # copy the adb dump.rdb
# if [ -e "${RedisRootDir}/etc/adb/dump.rdb" ] && [ ! -e "${RedisRootDir}/etc/kvdb/dump.rdb" ]; then
# cp -f ${RedisRootDir}/etc/adb/dump.rdb ${RedisRootDir}/etc/kvdb/;
# mv -f ${RedisRootDir}/etc/adb ${RedisRootDir}/etc/adb.old
# fi
# # cp -f ${DependsRootDir}/systemd/kvdb.service ${SystemdRootDir}
# else
# if [ ! -e "${RedisConfDir}/kvdb.conf" ]; then
# cp ${RedisConfDir}/default/kvdb.conf ${RedisConfDir}
# fi
# sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/kvdb.conf
# LINE="masterauth helloearth"
# FILE="${RedisConfDir}/kvdb.conf"
# # 检查文件中是否存在该行
# if ! grep -qxF "$LINE" "$FILE"; then
# # 如果不存在,将其添加到文件末尾
# echo "$LINE" >> "$FILE"
# fi
# fi
if [ ! -e "${FERootDir}/config.js" ]; then
cp ${FERootDir}/default/config.js ${FERootDir};
fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
if ! id -u omc >/dev/null 2>&1 ; then
useradd -d /opt/omc -m -s /bin/bash -pomc123 omc;
mkdir -p /opt/omc/ftp
else
echo "user omc exist";
fi
if [ ! -e "${NginxConfDir}/omc.conf" ]; then
mkdir -p ${NginxConfDir}
cp -f ${OMCEtcDir}/nginx/omc.conf ${NginxConfDir};
fi
systemctl daemon-reload
# disable auto upgrade
systemctl disable --now unattended-upgrades
systemctl enable restagent.service
systemctl enable crontask.service
systemctl enable sshsvc.service
systemctl enable captrace.service
systemctl daemon-reload
# read environment parameter and to do
if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
echo "M parameter: $M_PARAM"
if [ -n "$C_PARAM" ]; then
echo "C parameter: $C_PARAM"
${OMCRootDir}/bin/setomc.sh -m $M_PARAM -c $C_PARAM
else
${OMCRootDir}/bin/setomc.sh -m $M_PARAM
fi
# exit while failed to run setomc.sh
if [ $? -ne 0 ]; then
echo "setomc.sh execution failed. Exiting."
exit 1
fi
fi
echo -n "Starting OMC service ... "
systemctl start crontask.service
systemctl start sshsvc.service
systemctl start captrace.service
systemctl start restagent.service
echo "done"

View File

@@ -1,31 +0,0 @@
# !/bin/bash
X86Lib64Dir=/lib/x86_64-linux-gnu
rm -rf ${X86Lib64Dir}/libwireshark.so.15
rm -rf ${X86Lib64Dir}/libwireshark.so
rm -rf ${X86Lib64Dir}/libwiretap.so.12
rm -rf ${X86Lib64Dir}/libwiretap.so
rm -rf ${X86Lib64Dir}/libwsutil.so.13
rm -rf ${X86Lib64Dir}/libwsutil.so
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
rm -f /usr/local/bin/omcd
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
systemctl disable restagent.service
systemctl disable crontask.service
systemctl disable sshsvc.service
systemctl disable captrace.service
systemctl daemon-reload

View File

@@ -1,19 +0,0 @@
# !/bin/bash
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
FERootDir=/usr/local/omc/htdocs/front
# apt-get install zip
# clear front-end old hash js files
rm -rf ${FERootDir}/assets
rm -rf ${FERootDir}/js
rm -rf ${FERootDir}/index.*.js

View File

@@ -1,71 +0,0 @@
server {
listen 44080;
listen 44443;
listen [::]:44080;
listen [::]:44443;
server_name localhost;
client_max_body_size 100M;
keepalive_timeout 180s;
#access_log /var/log/nginx/host.access.log main;
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
# ssl_verify_client on;
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_session_timeout 5m;
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
# ssl_prefer_server_ciphers on;
# OMC
location / {
root /usr/local/omc/htdocs/front;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /omc-api/ {
proxy_pass http://127.0.0.1:33030/;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
location /api/rest/ {
proxy_pass http://127.0.0.1:33030/api/rest/;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,49 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
AmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
AmfGuamiList: ""
SnssaiList: ""
MaxUser: ""
RelativeCapacity: ""
MaxGnbNum: ""
EpRpDynN8Amf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN11Amf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN12Amf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,48 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
SmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
MaxPduSessions: ""
MaxQfi: ""
UpfList: ""
AddrPool:
Id: ""
UserLabel: ""
AddrType: "Static"
IpVersion: ""
AddrSegList: ""
EpRpDynN7Smf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN10Smf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,39 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
UdmFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
UdrFunction:
Id: ""
UserLabel: ""
AddrType: "Static"
IpVersion: ""
AddrSegList: ""
AusfFunction:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,141 +0,0 @@
ManagedElement:
Id: ""
UserLabel: ""
VendorName: ""
ManagedBy: ""
ManagementIpAddress: ""
SwVersion: ""
PatchInfo: ""
AdministrativeState: ""
OperationalState: ""
InventoryUnitRack:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SbiServiceList: ""
MaxPduSessions: ""
MaxQfi: ""
UpfList: ""
InventoryUnitShelf:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
RackPosition: ""
InventoryUnitPack:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
PortsInformation: ""
PackPosition: ""
SlotsOccupied: ""
InventoryUnitHost:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
HostPosition: ""
NumberOfCpu: ""
MemSize: ""
HardDiskSize: ""
InventoryUnitAccessory:
Id: ""
UserLabel: ""
VendorUnitFamilyType: ""
VendorUnitTypeNumber: ""
VendorName: ""
SerialNumber: ""
VersionNumber: ""
DateOfManufacture: ""
DateOfLastService: ""
ManufacturerData: ""
AccessoryPosition: ""
AccessoryType: ""
AddtionalInformation: ""
UpfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
MaxQosFlows: ""
MaxThroughput: ""
EpRpDynN9Upf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
EpRpDynN3Upf:
Id: ""
UserLabel: ""
LocIpAddrList: ""
FarIpSubnetworkList: ""
AmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
SmfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
UdrFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
AusfFunction:
Id: ""
UserLabel: ""
AdministrativeState: ""
OperationalState: ""
VnfInstanceId: ""
Fqdn: ""
IPResource:
Id: ""
UserLabel: ""
InterfaceType: ""
LocIpV4AddrList: ""
LocIpV6AddrList: ""

View File

@@ -1,71 +0,0 @@
server {
listen 44080;
listen 44443;
listen [::]:44080;
listen [::]:44443;
server_name localhost;
client_max_body_size 100M;
keepalive_timeout 180s;
#access_log /var/log/nginx/host.access.log main;
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
# ssl_verify_client on;
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_session_timeout 5m;
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
# ssl_prefer_server_ciphers on;
# OMC
location / {
root /usr/local/omc/htdocs/front;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /omc-api/ {
proxy_pass http://127.0.0.1:33030/;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
location /api/rest/ {
proxy_pass http://127.0.0.1:33030/api/rest/;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="DataFile">
<xs:complexType>
<xs:sequence>
<xs:element name="FileHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="TimeStamp" type="xs:dateTime"/>
<xs:element name="TimeZone" type="xs:string"/>
<xs:element name="VendorName" type="xs:string" minOccurs="0"/>
<xs:element name="ElementType" type="xs:string" minOccurs="0"/>
<xs:element name="CmVersion" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Objects" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ObjectType" type="xs:string"/>
<!--该字段必选-->
<xs:element name="FieldName">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="N">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FieldValue">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Object">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="V">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="rmUID" type="xs:string" use="required"/>
<xs:attribute name="Dn" type="xs:string"/>
<!-- //无线、核心网专业该字段必选传输、IP专业、业务系统无该字段-->
<xs:attribute name="UserLabel" type="xs:string"/>
<!-- //无线、核心网专业该字段必选传输、IP专业、业务系统无该字段-->
<xs:attribute name="PVFlag" type="xs:string" use="required"/>
<!-- //必须-->
<xs:attribute name="VMID" type="xs:string"/>
<!-- //VNF网络或VNF和PNF混合组网虚拟网元必选物理网元无该字段-->
<xs:attribute name="VNFInstanceID" type="xs:string"/>
<!-- //VNF网络或VNF和PNF混合组网虚拟网元必选物理网元无该字段-->
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -1,221 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- This XSLT will convert a PDML file, saved by Wireshark, into
HTML. The HTML page should look similar to Wireshark. See
https://gitlab.com/wireshark/wireshark/-/wikis/PDML for information
on how to generate such a HTML file from PDML.
For questions contact Dirk Jagdmann (doj@cubic.org).
Version: 2010-06-09
Wireshark - Network traffic analyzer
By Gerald Combs <gerald@wireshark.org>
Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
-->
<!-- set parameters of the HTML output -->
<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="no" standalone="yes" indent="yes"/>
<!-- this matches the "field" tag -->
<xsl:template match="field">
&#160;&#160;&#160; <!-- indent with 3 non-breaking spaces -->
<!-- output either the "showname" or "show" attribute -->
<xsl:choose>
<xsl:when test="string-length(@showname)>0">
<xsl:value-of select="@showname"/><br/>
</xsl:when>
<xsl:otherwise>
<!--<xsl:value-of select="@name"/>:--> <xsl:value-of select="@show"/><br/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
</xsl:template>
<!-- this matches the "packet" tag -->
<xsl:template match="packet">
<!-- declare some variables for later use -->
<xsl:variable name="frame_num" select="proto[@name='frame']/field[@name='frame.number']/@show"/>
<xsl:variable name="frame_id" select="concat('f',$frame_num)"/>
<xsl:variable name="frame_c" select="concat($frame_id,'c')"/>
<!-- the "title" bar of the frame -->
<div width="100%" id="{$frame_id}">
<a href="javascript:toggle_node('{$frame_c}')">&#8658;</a> <!-- #8658 is a "rArr" (double right arrow) character -->
Frame <xsl:value-of select="$frame_num"/>:
<xsl:for-each select="proto[@name!='geninfo']">
<xsl:value-of select="@name"/>,
</xsl:for-each>
<small><a href="javascript:hide_node('{$frame_id}')">[X]</a></small>
</div>
<!-- the frame contents are stored in a div, so we can toggle it -->
<div width="100%" id="{$frame_c}" style="display:none">
<!-- loop through all proto tags, but skip the "geninfo" one -->
<xsl:for-each select="proto[@name!='geninfo']">
<xsl:variable name="proto" select="concat($frame_id,@name,count(preceding-sibling::proto)+1)"/>
<!-- the "title" bar of the proto -->
<div width="100%" style="background-color:#e5e5e5; margin-bottom: 2px">
&#160;<a href="javascript:toggle_node('{$proto}')">&#8658;</a>&#160;<xsl:value-of select="@showname"/>
<!-- print "proto" details inside another div -->
<div width="100%" id="{$proto}" style="display:none">
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
</div>
</div>
</xsl:for-each>
</div>
<!-- use the javascript function set_node_color() to set the color
of the frame title bar. Defer colorization until the full page has
been loaded. If the browser would support the XPath function
replace() we could simply set the class attribute of the title bar div,
but for now we're stuck with class names from Wireshark's colorfilters
that contain spaces and we can't handle them in CSS. -->
<script type="text/javascript">
dojo.addOnLoad(function(){
set_node_color(
'<xsl:value-of select="$frame_id"/>',
'<xsl:value-of select="proto[@name='frame']/field[@name='frame.coloring_rule.name']/@show"/>'
);
});
</script>
</xsl:template>
<xsl:template match="pdml">
Capture Filename: <b><xsl:value-of select="@capture_file"/></b>
PDML created: <b><xsl:value-of select="@time"/></b>
<tt>
<xsl:apply-templates/> <!-- we expect to match the "packet" nodes -->
</tt>
</xsl:template>
<!-- this block matches the start of the PDML file -->
<xsl:template match="/">
<html>
<head>
<title>poor man's Wireshark</title>
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" type="text/javascript"></script>
<script type="text/javascript">
function set_node(node, str)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
node.style.display = str;
}
function toggle_node(node)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
set_node(node, (node.style.display != 'none') ? 'none' : 'block');
}
function hide_node(node)
{
set_node(node, 'none');
}
// this function was generated by colorfilters2js.pl
function set_node_color(node,colorname)
{
if(dojo.isString(node))
node = dojo.byId(node);
if(!node) return;
var fg;
var bg;
if(colorname == 'Bad TCP') {
bg='#000000';
fg='#ff5f5f';
}
if(colorname == 'HSRP State Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'Spanning Tree Topology Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'OSPF State Change') {
bg='#000000';
fg='#fff600';
}
if(colorname == 'ICMP errors') {
bg='#000000';
fg='#00ff0e';
}
if(colorname == 'ARP') {
bg='#d6e8ff';
fg='#000000';
}
if(colorname == 'ICMP') {
bg='#c2c2ff';
fg='#000000';
}
if(colorname == 'TCP RST') {
bg='#900000';
fg='#fff680';
}
if(colorname == 'TTL low or unexpected') {
bg='#900000';
fg='#ffffff';
}
if(colorname == 'Checksum Errors') {
bg='#000000';
fg='#ff5f5f';
}
if(colorname == 'SMB') {
bg='#fffa99';
fg='#000000';
}
if(colorname == 'HTTP') {
bg='#8dff7f';
fg='#000000';
}
if(colorname == 'IPX') {
bg='#ffe3e5';
fg='#000000';
}
if(colorname == 'DCERPC') {
bg='#c797ff';
fg='#000000';
}
if(colorname == 'Routing') {
bg='#fff3d6';
fg='#000000';
}
if(colorname == 'TCP SYN/FIN') {
bg='#a0a0a0';
fg='#000000';
}
if(colorname == 'TCP') {
bg='#e7e6ff';
fg='#000000';
}
if(colorname == 'UDP') {
bg='#70e0ff';
fg='#000000';
}
if(colorname == 'Broadcast') {
bg='#ffffff';
fg='#808080';
}
if(fg.length > 0)
node.style.color = fg;
if(bg.length > 0)
node.style.background = bg;
}
</script>
</head>
<body>
<xsl:apply-templates/> <!-- we expect to match the "pdml" node -->
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="PmFile">
<xs:complexType>
<xs:sequence>
<xs:element name="FileHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="TimeStamp" type="xs:dateTime" />
<xs:element name="TimeZone" type="xs:string" />
<xs:element name="Period" type="xs:integer" />
<xs:element name="VendorName" type="xs:string" />
<xs:element name="ElementType" type="xs:string" />
<xs:element name="PmVersion" type="xs:string" />
<xs:element name="StartTime" type="xs:dateTime" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Measurements" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ObjectType" type="xs:string" />
<xs:element name="PmName">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="N">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PmData">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Object">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="V">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="i" type="xs:integer" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="CV">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="SN" type="xs:string" />
<xs:element name="SV" type="xs:string" />
</xs:sequence>
<xs:attribute name="i" type="xs:integer"
use="required" />
</xs:complexType>
</xs:element>
</xs:choice>
<xs:attribute name="rmUID" type="xs:string" use="required" />
<xs:attribute name="Dn" type="xs:string" use="required" />
<xs:attribute name="UserLabel" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -1,8 +0,0 @@
Package: OMC
Version: 2.2410.2-YYYYMMDD-mt
Section: AGrandTech
Prioritt: optional
Architecture: amd64
Maintainer: Simon Zhangsz
Depends:
Description: OMC

View File

@@ -1,112 +0,0 @@
# !/bin/bash
OMCRootDir=/usr/local/omc
SystemdRootDir=/lib/systemd/system
OMCEtcDir=${OMCRootDir}/etc
FERootDir=${OMCRootDir}/htdocs/front
X86Lib64Dir=/lib/x86_64-linux-gnu
OMCBinDir=${OMCRootDir}/bin
OMCStaticDir=${OMCRootDir}/static
UsrLocalBinDir=/usr/local/bin
OMCDaemon=omcd
NginxEtcDir=/etc/nginx
NginxConfDir=${NginxEtcDir}/conf.d
CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml omc.conf"
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
echo ""
echo "* To start/stop/restart/status omc service, please run:"
echo " sudo systemctl start/stop/restart/status restagent.service"
echo " sudo systemctl start/stop/restart/status crontask.service"
echo " sudo systemctl start/stop/restart/status sshsvc.service"
echo " sudo systemctl start/stop/restart/status captrace.service"
echo " or run: "
echo " sudo /usr/local/omc/bin/omcsvc.sh start/stop/restart/status"
echo ""
cd ${X86Lib64Dir}
chmod +rx libwireshark.so.15.0.12
if [ ! -e libwireshark.so.15 ]; then ln -s libwireshark.so.15.0.12 libwireshark.so.15; fi
if [ ! -e libwireshark.so ]; then ln -s libwireshark.so.15.0.12 libwireshark.so; fi
chmod +rx libwiretap.so.12.0.12
if [ ! -e libwiretap.so.12 ]; then ln -s libwiretap.so.12.0.12 libwiretap.so.12; fi
if [ ! -e libwiretap.so ]; then ln -s libwiretap.so.12.0.12 libwiretap.so; fi
chmod +rx libwsutil.so.13.1.0
if [ ! -e libwsutil.so.13 ]; then ln -s libwsutil.so.13.1.0 libwsutil.so.13; fi
if [ ! -e libwsutil.so ]; then ln -s libwsutil.so.13.1.0 libwsutil.so; fi
cd ${UsrLocalBinDir}
if [ ! -e ${OMCDaemon} ]; then ln -s ${OMCBinDir}/omcsvc.sh ${OMCDaemon}; fi
chmod +rx ${OMCRootDir}/bin/*
chmod +rx ${OMCRootDir}/*
chmod +rx ${UsrLocalBinDir}/*
chmod -R 755 ${OMCRootDir}/htdocs/front
for CFile in ${CFileList}; do
if [ ! -e "${OMCEtcDir}/${CFile}" ]; then
cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}
else
# mv -f ${OMCEtcDir}/${CFile} ${OMCEtcDir}/${CFile}.bak
# cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}
if [ -e "${OMCBinDir}/upgconf.sh" ]; then
${OMCBinDir}/upgconf.sh
fi
fi
done
if [ ! -e "${FERootDir}/config.js" ]; then
cp ${FERootDir}/default/config.js ${FERootDir};
fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
if ! id -u omc >/dev/null 2>&1 ; then
useradd -d /opt/omc -m -s /bin/bash -pomc123 omc;
mkdir -p /opt/omc/ftp
else
echo "user omc exist";
fi
if [ ! -e "${NginxConfDir}/omc.conf" ]; then
mkdir -p ${NginxConfDir}
cp -f ${OMCEtcDir}/nginx/omc.conf ${NginxConfDir};
fi
systemctl daemon-reload
# disable auto upgrade
systemctl disable --now unattended-upgrades
systemctl enable restagent.service
systemctl enable crontask.service
systemctl enable sshsvc.service
systemctl enable captrace.service
systemctl daemon-reload
# read environment parameter and to do
if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
echo "M parameter: $M_PARAM"
if [ -n "$C_PARAM" ]; then
echo "C parameter: $C_PARAM"
${OMCRootDir}/bin/setomc.sh -m $M_PARAM -c $C_PARAM
else
${OMCRootDir}/bin/setomc.sh -m $M_PARAM
fi
# exit while failed to run setomc.sh
if [ $? -ne 0 ]; then
echo "setomc.sh execution failed. Exiting."
exit 1
fi
fi
echo -n "Starting OMC service ... "
systemctl start crontask.service
systemctl start sshsvc.service
systemctl start captrace.service
systemctl start restagent.service
echo "done"

View File

@@ -1,31 +0,0 @@
# !/bin/bash
X86Lib64Dir=/lib/x86_64-linux-gnu
rm -rf ${X86Lib64Dir}/libwireshark.so.15
rm -rf ${X86Lib64Dir}/libwireshark.so
rm -rf ${X86Lib64Dir}/libwiretap.so.12
rm -rf ${X86Lib64Dir}/libwiretap.so
rm -rf ${X86Lib64Dir}/libwsutil.so.13
rm -rf ${X86Lib64Dir}/libwsutil.so
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
rm -f /usr/local/bin/omcd
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
systemctl disable restagent.service
systemctl disable crontask.service
systemctl disable sshsvc.service
systemctl disable captrace.service
systemctl daemon-reload

View File

@@ -1,19 +0,0 @@
# !/bin/bash
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
FERootDir=/usr/local/omc/htdocs/front
# apt-get install zip
# clear front-end old hash js files
rm -rf ${FERootDir}/assets
rm -rf ${FERootDir}/js
rm -rf ${FERootDir}/index.*.js

View File

@@ -1,71 +0,0 @@
server {
listen 44080;
listen 44443;
listen [::]:44080;
listen [::]:44443;
server_name localhost;
client_max_body_size 100M;
keepalive_timeout 180s;
#access_log /var/log/nginx/host.access.log main;
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
# ssl_verify_client on;
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_session_timeout 5m;
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
# ssl_prefer_server_ciphers on;
# OMC
location / {
root /usr/local/omc/htdocs/front;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /omc-api/ {
proxy_pass http://127.0.0.1:33030/;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
location /api/rest/ {
proxy_pass http://127.0.0.1:33030/api/rest/;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,403 +0,0 @@
# 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
软件安装
银河麒麟OS(CentOS)
```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服务(可选)
注意:非第一次安装或者全新安装请跳过此步骤
OMC Web服务可通过nginx代理进行访问也可不需要代理进行访问
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软件包
```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
│   ├── nehosts
│   ├── omcsvc.sh
│   ├── restagent
│   └── tables.txt
├── database
├── etc
│   ├── cm
│   ├── crontask.yaml
│   ├── db
│   ├── default
│   ├── 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=6379/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.yamltrace级别的日志通常在调试系统时使用正常运行级别为debug如下配置项所示
```yaml
logger:
file: /usr/local/omc/log/restagent.log
level: debug
duration: 24
count: 90
```
OMC crontask程序的配置文件在crontask.yamltrace级别的日志通常在调试系统时使用正常运行级别为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) nginx代理模式
http://192.168.0.229:8080 (非nginx代理模式)

View File

@@ -1,11 +0,0 @@
# MySQL install guide
---
## 环境准备
硬件平台辉腾arm服务器
操作系统:麒麟
MySQL8.0.32

Some files were not shown because too many files have changed in this diff Show More