Compare commits
120 Commits
lichang
...
multi-tena
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c77981e587 | ||
|
|
745ec999b4 | ||
|
|
1054da9b4e | ||
|
|
6226809e8d | ||
|
|
86f994cbe6 | ||
|
|
6ff8e49cf6 | ||
|
|
858eec188a | ||
|
|
73911f3192 | ||
|
|
8f50df5bd1 | ||
|
|
f9a2a84144 | ||
|
|
ec756261be | ||
|
|
f8e17fbcd6 | ||
|
|
255f531fb7 | ||
|
|
75405e0482 | ||
|
|
e176154f73 | ||
|
|
c893d8d051 | ||
|
|
234a403bca | ||
|
|
ac9d369235 | ||
|
|
cde04d7608 | ||
|
|
b6dc85e51e | ||
|
|
8000d6c263 | ||
|
|
8447da9d46 | ||
|
|
8def038993 | ||
|
|
271aaa1f69 | ||
|
|
3a1cac9f0e | ||
|
|
5b47a8d366 | ||
|
|
b18224c95d | ||
|
|
14623348b8 | ||
|
|
e5ca189b05 | ||
|
|
f84d4e48a8 | ||
|
|
521936fbcc | ||
|
|
1bb763df6e | ||
|
|
e8d51f0821 | ||
|
|
72d299a87a | ||
|
|
fc8d8bd9d9 | ||
|
|
764ef45098 | ||
|
|
dd9ded3ad1 | ||
|
|
32a0fc7d46 | ||
|
|
4bc25c840a | ||
|
|
cc7a42edb2 | ||
|
|
b5a4d8f084 | ||
|
|
22cad473ab | ||
|
|
8426a91eec | ||
|
|
45bed62998 | ||
|
|
e5fd1fe7a2 | ||
|
|
5820c66f8b | ||
|
|
f1250f6409 | ||
|
|
9e4427b3e8 | ||
|
|
4566d4ff4c | ||
|
|
eba31a09a2 | ||
|
|
60e4034ca8 | ||
|
|
0676d237ec | ||
|
|
f2de67e311 | ||
|
|
106d499eae | ||
| 16ce7958f0 | |||
| f1d7c0b1b7 | |||
| a2278d066c | |||
| d96a2400ce | |||
| 39204e55c0 | |||
| 6a60d55180 | |||
| 8fb18ef6bb | |||
| e389f98b46 | |||
| fa9870f690 | |||
| 09250dfaf8 | |||
| 0946603828 | |||
| 23591dfda0 | |||
| 1a97be11df | |||
| 2454fbf1d6 | |||
| f3ee5c189b | |||
| 2be4cfdd03 | |||
| 9acb7caaa1 | |||
| a547fda132 | |||
| 821af0148e | |||
| 0a43eea194 | |||
| e11f0235f1 | |||
| 904a13fd56 | |||
| c4539e30bb | |||
| 103140f08d | |||
| 48e6bfd67d | |||
| 05940359d8 | |||
| 9ddc4ea6cb | |||
| e4deb815b9 | |||
|
|
3649afe328 | ||
|
|
5cdb82297a | ||
| 615000ee68 | |||
| 625b49a6b4 | |||
| 2fe1725288 | |||
| 7ecd7e1602 | |||
| 9dd9a2f391 | |||
| 11e1604683 | |||
| a78fd76e3b | |||
| 22119320d1 | |||
| c4142d894b | |||
| 815a754485 | |||
| 1bbaf9b4d7 | |||
| ac6ef015eb | |||
| 69a54c9243 | |||
| 860b53b06a | |||
| 7831377857 | |||
| dfb1b87772 | |||
| 8c2e7957d9 | |||
| 5902ba2f51 | |||
| 5a822828e6 | |||
| a4ff093c81 | |||
| 41ea7703f8 | |||
| ed650b18db | |||
| ca9b21ffe3 | |||
| 52f038e4e1 | |||
| 761e4ed44a | |||
| 2097f177e0 | |||
| 07868f83dc | |||
| 3837d1d491 | |||
| 5d390fcefc | |||
| d17ae34d37 | |||
| 272ff190c0 | |||
| 66366c39fc | |||
| c86f8e0356 | |||
| 152813bbd4 | |||
| a7e9e6acb7 | |||
| bf6a756b28 |
23
.gitignore
vendored
@@ -8,14 +8,25 @@
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
.idea/
|
||||
|
||||
# Run temp file and dir
|
||||
docs/temp/
|
||||
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
*.log
|
||||
*.log
|
||||
*.bak
|
||||
*.exe
|
||||
|
||||
# Build Output
|
||||
tmp/*
|
||||
# build and release package
|
||||
build/
|
||||
debbuild/etc
|
||||
debbuild/usr
|
||||
debbuild/lib
|
||||
debbuild/22.04/etc
|
||||
debbuild/22.04/usr
|
||||
debbuild/22.04/lib
|
||||
# !debbuild/DEBIAN
|
||||
# !debbuild/22.04/DEBIAN
|
||||
|
||||
# --> release
|
||||
release/*
|
||||
# --> debbuild
|
||||
|
||||
33
README.md
@@ -4,34 +4,33 @@
|
||||
|
||||
OS: Ubuntu 18.04 / 22.04 (Recommendation)
|
||||
|
||||
Golang: go1.24.2 (or above)
|
||||
Arch: amd64
|
||||
|
||||
Database: 10.6.16-MariaDB, Redis server v=5.0.5 (or above)
|
||||
|
||||
node.js: v20.18.0 (or above)
|
||||
- Golang: go1.24.2 linux/amd64
|
||||
- node.js: v20.18.0 (or above)
|
||||
|
||||
## Build Guide
|
||||
|
||||
### Pull Code
|
||||
|
||||
`pwd` default in `/root`
|
||||
|
||||
```bash
|
||||
git clone https://xxx@git/ems.git omc.git
|
||||
cd omc.git && ls
|
||||
# pwd
|
||||
cd /root/omc.git
|
||||
# ls
|
||||
# be.ems build.ems fe.ems.vue3
|
||||
cp build.ems/pkg-* .
|
||||
cp build.ems/pkg.sh .
|
||||
bash pkg.sh --web --api -v 2.2508.1
|
||||
```
|
||||
|
||||
### Build System Pageage Manager
|
||||
Encountered character error
|
||||
|
||||
Modify the information in the script as appropriate
|
||||
error: `sed: -e expression #1, char 46: Invalid collation character`
|
||||
|
||||
```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
|
||||
sudo apt-get update
|
||||
sudo apt-get install locales
|
||||
sudo locale-gen en_US.UTF-8
|
||||
sudo update-locale LANG=en_US.UTF-8
|
||||
source /etc/default/locale
|
||||
locale
|
||||
```
|
||||
|
||||
BIN
bin/binWriter
Normal file
308
bin/build.sh
Executable file
@@ -0,0 +1,308 @@
|
||||
#!/bin/bash
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
# Use a new parameter list
|
||||
set -- "${new_args[@]}"
|
||||
|
||||
RootDir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
GitLocalRoot=$(dirname $(dirname "$RootDir"))
|
||||
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.2508.1
|
||||
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
|
||||
SshSvcBin=sshsvc
|
||||
RestagentDir=${EmsBEDir}/${RESTAGENT}
|
||||
SshSvcDir=${EmsBEDir}/${SshSvcBin}
|
||||
DBSQLSrcDir=${EmsBEDir}/database
|
||||
MiscDir=${EmsBEDir}/misc
|
||||
FrontBuildDir=${BuildOMCDir}/htdocs
|
||||
FrontSrcDir=${EmsBEDir}/front
|
||||
BinWriterDir=${HOME}/bin
|
||||
|
||||
if [[ ${RpmArch} =~ "x86_64" ]];then
|
||||
RelArch=amd64
|
||||
elif [[ ${RpmArch} =~ "aarch64" ]];then
|
||||
RelArch=arm64
|
||||
fi
|
||||
|
||||
case "${pkgtype}" in
|
||||
rpm)
|
||||
echo "Begin to make ${pkgtype} package ======>"
|
||||
|
||||
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 ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
|
||||
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
|
||||
# rm -rf ${BinDir2}/ne-hosts
|
||||
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
|
||||
rm -rf ${BuildOMCEtcDir}/db && mkdir -p ${BuildOMCEtcDir}/db
|
||||
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
|
||||
#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
|
||||
|
||||
ReleasePkgDir=${ReleaseDir}/rpms/${RelArch}
|
||||
mv -f $RpmsDir/$RpmArch/$RpmPkgName ${ReleasePkgDir}/$RpmPkgRename
|
||||
cd ${ReleasePkgDir}
|
||||
rm -f omc-md5sum.txt
|
||||
# rpm --addsign *.rpm
|
||||
md5sum $RpmPkgRename >omc-md5sum.txt
|
||||
echo "Finish to make ${pkgtype} package <======"
|
||||
;;
|
||||
deb)
|
||||
echo "Begin to make ${pkgtype} package ======>"
|
||||
|
||||
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${RelVer}-ub22.deb
|
||||
if [ ! $ProjectTag = "" ]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub22-${ProjectTag}.deb
|
||||
fi
|
||||
elif [[ ${VersionID} =~ 'VERSION_ID="24.04"' ]]; then
|
||||
DebBuildDir=${DebBuild2204Dir}
|
||||
DebBuildOMCDir=${DebBuild2204OMCDir}
|
||||
DebFEBuildDir=${DebFEBuild2204Dir}
|
||||
DebPkgFile=${PROJECT}-r${RelVer}-ub24.deb
|
||||
if [ ! $ProjectTag = "" ]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub24-${ProjectTag}.deb
|
||||
fi
|
||||
elif [[ ${VersionID} =~ 'VERSION_ID="18.04"' ]]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub18.deb
|
||||
if [ ! $ProjectTag = "" ]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-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 ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
|
||||
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
|
||||
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
|
||||
rm -rf ${BuildOMCEtcDir}/db && mkdir -p ${BuildOMCEtcDir}/db
|
||||
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
|
||||
#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 ${CustomizedDir}/ba.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
|
||||
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
|
||||
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
|
||||
|
||||
cd ${ReleasePkgDir}
|
||||
rm -f omc-md5sum.txt
|
||||
# rpm --addsign *.rpm
|
||||
md5sum ${DebPkgName} >omc-md5sum.txt
|
||||
echo "Finish to make ${pkgtype} package <======="
|
||||
;;
|
||||
badeb)
|
||||
echo "Begin to make ${pkgtype} package ======>"
|
||||
|
||||
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=${ProjectL}-r${RelVer}-ub22-ba.deb
|
||||
elif [[ ${VersionID} =~ 'VERSION_ID="24.04"' ]]; then
|
||||
DebBuildDir=${DebBuild2204Dir}
|
||||
DebBuildOMCDir=${DebBuild2204OMCDir}
|
||||
DebFEBuildDir=${DebFEBuild2204Dir}
|
||||
DebPkgFile=${PROJECT}-r${RelVer}-ub24.deb
|
||||
if [ ! $ProjectTag = "" ]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub24-${ProjectTag}.deb
|
||||
fi
|
||||
elif [[ ${VersionID} =~ 'VERSION_ID="18.04"' ]]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-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 ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
|
||||
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
|
||||
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
|
||||
rm -rf ${BuildOMCEtcDir}/db && mkdir -p ${BuildOMCEtcDir}/db
|
||||
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
|
||||
#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
|
||||
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
|
||||
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
|
||||
|
||||
cd ${ReleasePkgDir}
|
||||
rm -f omc-md5sum.txt
|
||||
md5sum ${DebPkgName} >omc-md5sum.txt
|
||||
echo "Finish to make ${pkgtype} package <======"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 4
|
||||
;;
|
||||
esac
|
||||
146
bin/makepkg.sh
Executable file
@@ -0,0 +1,146 @@
|
||||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 deb|rpm [option]..."
|
||||
echo
|
||||
echo "Make omc package, option as follow:"
|
||||
echo " deb|rpm, deb: 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 " -m, =be|fe|all be: only process back-end code, default if non input"
|
||||
echo " fe: only process front-end code"
|
||||
echo " all: process all include be and fe"
|
||||
echo " -c, =ba ba: customized for BA OMC"
|
||||
}
|
||||
|
||||
pkgtype=""
|
||||
new_args=()
|
||||
be_args=()
|
||||
# Traverse all parameters
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == "deb" || "$arg" == "rpm" ]]; then
|
||||
pkgtype=$arg
|
||||
be_args+=("$arg")
|
||||
else
|
||||
new_args+=("$arg") # Add non pkgtype parameters to a new parameter list
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$pkgtype" ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use a new parameter list
|
||||
set -- "${new_args[@]}"
|
||||
|
||||
rootdir=${HOME}/omc.git
|
||||
m_arg="*"
|
||||
while getopts "m:r:c:d" option; do
|
||||
case $option in
|
||||
m)
|
||||
m_arg=$(echo $OPTARG | tr '[:upper:]' '[:lower:]')
|
||||
;;
|
||||
r)
|
||||
rootdir=$OPTARG
|
||||
be_args+=("-r ${rootdir}")
|
||||
;;
|
||||
d)
|
||||
be_args+=("-d")
|
||||
;;
|
||||
c)
|
||||
c_arg=$(echo $OPTARG | tr '[:upper:]' '[:lower:]')
|
||||
if [ "${c_arg}" == "ba" ]; then
|
||||
pkgtype="badeb"
|
||||
be_args+=("${pkgtype}")
|
||||
fi
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
usage
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -d ${rootdir} ]; then
|
||||
echo "Not exist directory: ${rootdir}"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
bedir=${rootdir}/be.ems
|
||||
|
||||
builddir=${rootdir}/build.ems
|
||||
buildcustomized=${builddir}/customized
|
||||
customizeddir=${buildcustomized}/${c_arg}.d
|
||||
|
||||
fedir=${rootdir}/fe.ems.vue3
|
||||
feassetsdir=${fedir}/public
|
||||
felocalesdir=${fedir}/src/i18n/locales
|
||||
feconstantsdir=${fedir}/src/constants
|
||||
fehooksdir=${fedir}/src/hooks
|
||||
|
||||
makefe() {
|
||||
cd ${fedir}
|
||||
# git checkout ${feassetsdir}
|
||||
# git checkout ${felocalesdir}
|
||||
# git checkout ${feconstantsdir}
|
||||
# git checkout ${fehooksdir}
|
||||
git pull
|
||||
if [ "${pkgtype}" == "badeb" ]; then
|
||||
cp -rf ${customizeddir}/images/background_light.jpg ${feassetsdir}/background/light.jpg
|
||||
cp -rf ${customizeddir}/images/background_dark.jpg ${feassetsdir}/background/dark.jpg
|
||||
cp -rf ${customizeddir}/locales/zh-CN.ts ${felocalesdir}/zh-CN.ts
|
||||
find "${feconstantsdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
|
||||
find "${fehooksdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
|
||||
fi
|
||||
# npm install --force --registry https://registry.npmmirror.com
|
||||
npm install --registry https://registry.npmmirror.com
|
||||
echo -n "Building front-end vue ... "
|
||||
npm run build 1>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
echo "done"
|
||||
fi
|
||||
git checkout ${feassetsdir}
|
||||
git checkout ${felocalesdir}
|
||||
git checkout ${feconstantsdir}
|
||||
git checkout ${fehooksdir}
|
||||
}
|
||||
|
||||
makebe() {
|
||||
cd ${builddir}/bin
|
||||
#chmod +x mkpkg.sh
|
||||
EmsBEDir=${rootdir}/be.ems
|
||||
ProcList="restagent sshsvc"
|
||||
cd $EmsBEDir
|
||||
for procName in $ProcList;do
|
||||
cd $EmsBEDir/$procName
|
||||
echo "Make $procName ..."
|
||||
make
|
||||
done
|
||||
|
||||
chmod +x build.sh
|
||||
./build.sh ${be_args[@]}
|
||||
}
|
||||
|
||||
post_makepkg() {
|
||||
cd ${builddir}
|
||||
git checkout debbuild/DEBIAN/
|
||||
git checkout debbuild/22.04/DEBIAN/
|
||||
}
|
||||
|
||||
case "${m_arg}" in
|
||||
"fe")
|
||||
makefe
|
||||
;;
|
||||
"all")
|
||||
makefe
|
||||
makebe
|
||||
post_makepkg
|
||||
;;
|
||||
"be" | "*")
|
||||
makebe
|
||||
post_makepkg
|
||||
;;
|
||||
esac
|
||||
5
bin/nodejs.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
# copy to /etc/profile.d/ to set the environment variables for all users
|
||||
# cp -f nodejs.sh /etc/profile.d/99-nodejs.sh
|
||||
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
export NODE_OPTIONS=--max-old-space-size=50000
|
||||
163
build-docker.sh
@@ -1,163 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
187
build.sh
@@ -1,187 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Default Version
|
||||
VERSION="1.0.0"
|
||||
# usage
|
||||
usage() {
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
# =================== 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
|
||||
|
||||
# bash build.sh -v 2.2505.2
|
||||
71
build/etc/nginx/conf.d/omc.conf
Normal file
@@ -0,0 +1,71 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
38
build/usr/local/omc/.ssh/id_rsa
Normal file
@@ -0,0 +1,38 @@
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
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
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
1
build/usr/local/omc/.ssh/id_rsa.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCjzE0MHy0P2sQmG1OKvArwLEzR77BwxPp+4N9NKBz8lEyNch4zoHvoLDaUJKPBMwTrScZnxhvRJNde6hz5Z0QVxZolVKV95fMfgb9YICzDfPF3Bphae5q/PBYUJNfrC9SAjQeHV4CCO6xk6LV8O/Nfw8uaXwtuN3yfpUWd5mRWKMc3GHV4vxerfKoIQZN6etLhIEYibAhCJ21P0uoWzZl7ceLmkG+6qrRSbyC0bCnrN3+wjN4bwtflrEFJk3XQGuRbVsYLzux+mMm9p22+CLPRl/FUPF3x4/wKCsqr7JDSxx80HSPhk4g/1nCTpDR9hAfF6A9ww2va/k8jMeYPBO8Owe7erLEZzvg5WQAR3Wj05eJpJD99BeC91S5KW6AFQDfDHxWWprSibd/Jj9dtct2pK2ZxW0ph9OJ49ftRhzT1iVi4UnJwnG5/qLfwl6Tnx+qnQ1If/9lY/99erCTATzFTMSImKrRz7CnuPlcw8WkzCYpWKKe0kJLkL2cRD5Qi4yk= simon@simonzhangsz
|
||||
38
build/usr/local/omc/.ssh/private_key.pem
Normal file
@@ -0,0 +1,38 @@
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
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
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
49
build/usr/local/omc/etc/cm/cm-amf.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
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: ""
|
||||
48
build/usr/local/omc/etc/cm/cm-smf.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
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: ""
|
||||
39
build/usr/local/omc/etc/cm/cm-udm.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
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: ""
|
||||
141
build/usr/local/omc/etc/cm/cm-upf.yaml
Normal file
@@ -0,0 +1,141 @@
|
||||
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: ""
|
||||
71
build/usr/local/omc/etc/nginx/omc.conf
Normal file
@@ -0,0 +1,71 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
76
build/usr/local/omc/etc/schema/cm-schema.xsd
Normal file
@@ -0,0 +1,76 @@
|
||||
<?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>
|
||||
|
||||
221
build/usr/local/omc/etc/schema/pdml2html.xsl
Normal file
@@ -0,0 +1,221 @@
|
||||
<?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">
|
||||
    <!-- 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}')">⇒</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">
|
||||
 <a href="javascript:toggle_node('{$proto}')">⇒</a> <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>
|
||||
80
build/usr/local/omc/etc/schema/pm-schema.xsd
Normal file
@@ -0,0 +1,80 @@
|
||||
<?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>
|
||||
20
customized/agt.d/db/customized.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
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 ©2025 千通科技', '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 ©2025 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;
|
||||
BIN
customized/agt.d/doc/en_doc.pdf
Normal file
BIN
customized/agt.d/doc/zh_doc.pdf
Normal file
BIN
customized/agt.d/images/background.jpg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
customized/agt.d/images/background_dark.jpg
Normal file
|
After Width: | Height: | Size: 226 KiB |
BIN
customized/agt.d/images/background_light.jpg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
customized/agt.d/logo/en_brand.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
customized/agt.d/logo/en_icon.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
customized/agt.d/logo/zh_brand.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
customized/agt.d/logo/zh_icon.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
20
customized/ba.d/db/customized.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
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 ©2025 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 ©2025 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;
|
||||
BIN
customized/ba.d/doc/en_doc.pdf
Normal file
BIN
customized/ba.d/images/background.jpg
Normal file
|
After Width: | Height: | Size: 216 KiB |
BIN
customized/ba.d/images/background_dark.jpg
Normal file
|
After Width: | Height: | Size: 216 KiB |
BIN
customized/ba.d/images/background_light.jpg
Normal file
|
After Width: | Height: | Size: 216 KiB |
2
customized/ba.d/locales/zh-CN.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export default {
|
||||
};
|
||||
BIN
customized/ba.d/logo/en_brand.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
customized/ba.d/logo/en_icon.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
20
customized/omc.d/db/customized.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
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 ©2025', '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 ©2025', '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;
|
||||
BIN
customized/omc.d/doc/en_doc.pdf
Normal file
BIN
customized/omc.d/doc/zh_doc.pdf
Normal file
BIN
customized/omc.d/images/background.jpg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
customized/omc.d/images/background_dark.jpg
Normal file
|
After Width: | Height: | Size: 226 KiB |
BIN
customized/omc.d/images/background_light.jpg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
customized/omc.d/logo/en_brand.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
customized/omc.d/logo/en_icon.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
customized/omc.d/logo/zh_brand.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
customized/omc.d/logo/zh_icon.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
8
debbuild/22.04/DEBIAN/control
Normal file
@@ -0,0 +1,8 @@
|
||||
Package: OMC
|
||||
Version: 2.2508.1-YYYYMMDD-mt
|
||||
Section: AGrandTech
|
||||
Prioritt: optional
|
||||
Architecture: amd64
|
||||
Maintainer: Simon Zhangsz
|
||||
Depends:
|
||||
Description: OMC
|
||||
151
debbuild/22.04/DEBIAN/postinst
Executable file
@@ -0,0 +1,151 @@
|
||||
#!/bin/bash
|
||||
|
||||
OMCRootDir=/usr/local/omc
|
||||
SystemdRootDir=/lib/systemd/system
|
||||
OMCEtcDir=${OMCRootDir}/etc
|
||||
FERootDir=${OMCRootDir}/htdocs/front
|
||||
OMCBinDir=${OMCRootDir}/bin
|
||||
OMCStaticDir=${OMCRootDir}/static
|
||||
UsrLocalBinDir=/usr/local/bin
|
||||
OMCDaemon=omcd
|
||||
NginxEtcDir=/etc/nginx
|
||||
NginxConfDir=${NginxEtcDir}/conf.d
|
||||
CFileList="restconf.yaml sshsvc.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 sshsvc.service"
|
||||
echo " or run: "
|
||||
echo " sudo /usr/local/omc/bin/omcsvc.sh start/stop/restart/status"
|
||||
echo ""
|
||||
|
||||
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" ] && [ "${CFile}" = "restconf.yaml" ]; 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 sshsvc.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 sshsvc.service
|
||||
systemctl start restagent.service
|
||||
echo "done"
|
||||
19
debbuild/22.04/DEBIAN/postrm
Executable file
@@ -0,0 +1,19 @@
|
||||
# !/bin/bash
|
||||
|
||||
#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 sshsvc.service
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
systemctl disable restagent.service
|
||||
systemctl disable sshsvc.service
|
||||
|
||||
systemctl daemon-reload
|
||||
17
debbuild/22.04/DEBIAN/preinst
Executable file
@@ -0,0 +1,17 @@
|
||||
# !/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 sshsvc.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
|
||||
71
debbuild/22.04/etc/nginx/conf.d/omc.conf
Normal file
@@ -0,0 +1,71 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
debbuild/22.04/lib/x86_64-linux-gnu/libwireshark.so.15.0.12
Normal file
BIN
debbuild/22.04/lib/x86_64-linux-gnu/libwiretap.so.12.0.12
Normal file
BIN
debbuild/22.04/lib/x86_64-linux-gnu/libwsutil.so.13.1.0
Normal file
BIN
debbuild/22.04/usr/local/bin/tshark
Normal file
BIN
debbuild/22.04/usr/local/bin/unzip
Normal file
BIN
debbuild/22.04/usr/local/bin/xsltproc
Normal file
BIN
debbuild/22.04/usr/local/bin/zip
Normal file
0
debbuild/22.04/usr/local/omc/bin/.gitkeep
Normal file
0
debbuild/22.04/usr/local/omc/database/.gitkeep
Normal file
0
debbuild/22.04/usr/local/omc/etc/certs/.gitkeep
Normal file
49
debbuild/22.04/usr/local/omc/etc/cm/cm-amf.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
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: ""
|
||||
48
debbuild/22.04/usr/local/omc/etc/cm/cm-smf.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
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: ""
|
||||
39
debbuild/22.04/usr/local/omc/etc/cm/cm-udm.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
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: ""
|
||||
141
debbuild/22.04/usr/local/omc/etc/cm/cm-upf.yaml
Normal file
@@ -0,0 +1,141 @@
|
||||
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: ""
|
||||
0
debbuild/22.04/usr/local/omc/etc/default/.gitkeep
Normal file
71
debbuild/22.04/usr/local/omc/etc/nginx/omc.conf
Normal file
@@ -0,0 +1,71 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
76
debbuild/22.04/usr/local/omc/etc/schema/cm-schema.xsd
Normal file
@@ -0,0 +1,76 @@
|
||||
<?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>
|
||||
|
||||
221
debbuild/22.04/usr/local/omc/etc/schema/pdml2html.xsl
Normal file
@@ -0,0 +1,221 @@
|
||||
<?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">
|
||||
    <!-- 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}')">⇒</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">
|
||||
 <a href="javascript:toggle_node('{$proto}')">⇒</a> <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>
|
||||
80
debbuild/22.04/usr/local/omc/etc/schema/pm-schema.xsd
Normal file
@@ -0,0 +1,80 @@
|
||||
<?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>
|
||||