5 Commits

Author SHA1 Message Date
0adc47628f fix: remove session 2024-10-25 18:39:21 +08:00
18701c7c41 release main line version 2.2410.3 2024-10-25 16:47:31 +08:00
9e5b4c1bf1 changle git local root dir 2024-10-24 16:39:37 +08:00
587e7a65f0 add: NBI get fille api 2024-10-24 16:18:12 +08:00
7be1132430 fix: upgrade config file by upgconf.sh 2024-10-23 16:14:45 +08:00
26 changed files with 470 additions and 60 deletions

8
.vscode/launch.json vendored
View File

@@ -18,7 +18,7 @@
"type": "go", "type": "go",
"request": "launch", "request": "launch",
"mode": "debug", "mode": "debug",
"program": "d:/local.git/be.ems/restagent/", "program": "d:/omc.git/be.ems/restagent/",
"console": "integratedTerminal" "console": "integratedTerminal"
}, },
{ {
@@ -26,7 +26,7 @@
"type": "go", "type": "go",
"request": "launch", "request": "launch",
"mode": "debug", "mode": "debug",
"program": "d:/local.git/be.ems/sshsvc/sshsvc.go", "program": "d:/omc.git/be.ems/sshsvc/sshsvc.go",
"console": "integratedTerminal" "console": "integratedTerminal"
}, },
{ {
@@ -34,7 +34,7 @@
"type": "go", "type": "go",
"request": "launch", "request": "launch",
"mode": "debug", "mode": "debug",
"program": "d:/local.git/be.ems/crontask", "program": "d:/omc.git/be.ems/crontask",
"console": "integratedTerminal" "console": "integratedTerminal"
}, },
{ {
@@ -42,7 +42,7 @@
"type": "go", "type": "go",
"request": "launch", "request": "launch",
"mode": "debug", "mode": "debug",
"program": "d:/local.git/be.ems/tools/encode", "program": "d:/omc.git/be.ems/tools/encode",
"console": "integratedTerminal" "console": "integratedTerminal"
} }
] ]

View File

@@ -1,6 +1,6 @@
# 版本发布日志 # 版本发布日志
## 2.2410.2-20241018 ## 2.2410.3-20241018
- 新增 网元主机支持redis配置项 - 新增 网元主机支持redis配置项
- 新增 菜单功能iperf3/ping网络测试工具 - 新增 菜单功能iperf3/ping网络测试工具

View File

@@ -2,7 +2,7 @@
# level: /trace/debug/info/error/warn/error/fatal, default: debug # level: /trace/debug/info/error/warn/error/fatal, default: debug
# duration: saved days, default is 30 days # duration: saved days, default is 30 days
logger: logger:
file: d:/local.git/be.ems/captrace/log/captrace.log file: d:/omc.git/be.ems/captrace/log/captrace.log
level: trace level: trace
duration: 24 duration: 24
count: 10 count: 10

View File

@@ -1,7 +1,7 @@
# Makefile for rest agent project # Makefile for rest agent project
PROJECT = OMC PROJECT = OMC
VERSION = 2.2410.2 VERSION = 2.2410.3
PLATFORM = amd64 PLATFORM = amd64
ARMPLATFORM = aarch64 ARMPLATFORM = aarch64
BUILDDIR = ../../build BUILDDIR = ../../build

View File

@@ -2,7 +2,7 @@
# level: /trace/debug/info/error/warn/error/fatal, default: debug # level: /trace/debug/info/error/warn/error/fatal, default: debug
# duration: saved days, default is 30 days # duration: saved days, default is 30 days
logger: logger:
file: d:/local.git/be.ems/crontask/log/crontask.log file: d:/omc.git/be.ems/crontask/log/crontask.log
level: trace level: trace
duration: 24 duration: 24
count: 10 count: 10
@@ -26,7 +26,7 @@ database:
port: 33066 port: 33066
name: omc_db name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: d:/local.git/be.ems/restagent/database backup: d:/omc.git/be.ems/restagent/database
# northbound interface, cm/pm # northbound interface, cm/pm
# duration(day): saved days # duration(day): saved days

View File

@@ -1,7 +1,7 @@
# Makefile for OMC-OMC-crontask project # Makefile for OMC-OMC-crontask project
PROJECT = OMC PROJECT = OMC
VERSION = 2.2410.2 VERSION = 2.2410.3
LIBDIR = be.ems/lib LIBDIR = be.ems/lib
BINNAME = crontask BINNAME = crontask

View File

@@ -1,7 +1,7 @@
# Makefile for rest agent project # Makefile for rest agent project
PROJECT = OMC PROJECT = OMC
VERSION = 2.2410.2 VERSION = 2.2410.3
RelDate = `date +%Y%m%d` RelDate = `date +%Y%m%d`
Release = $(RelDate) Release = $(RelDate)
RelVer = $(VERSION)-$(RelDate) RelVer = $(VERSION)-$(RelDate)

View File

@@ -3,6 +3,7 @@ package features
import ( import (
"be.ems/features/cm" "be.ems/features/cm"
"be.ems/features/lm" "be.ems/features/lm"
"be.ems/features/nbi"
"be.ems/features/pm" "be.ems/features/pm"
"be.ems/lib/log" "be.ems/lib/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
@@ -12,10 +13,10 @@ func InitServiceEngine(r *gin.Engine) {
log.Info("======init feature group gin.Engine") log.Info("======init feature group gin.Engine")
// featuresGroup := r.Group("/") // featuresGroup := r.Group("/")
// 注册 各个features 模块的路由 // register features routers
pm.InitSubServiceRoute(r) pm.InitSubServiceRoute(r)
lm.InitSubServiceRoute(r) lm.InitSubServiceRoute(r)
cm.InitSubServiceRoute(r) cm.InitSubServiceRoute(r)
nbi.InitSubServiceRoute(r)
// return featuresGroup // return featuresGroup
} }

View File

@@ -0,0 +1,257 @@
package nbi_file
import (
"archive/zip"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"time"
"be.ems/lib/dborm"
"be.ems/lib/file"
"be.ems/lib/global"
"be.ems/lib/log"
"be.ems/lib/services"
"github.com/gin-gonic/gin"
)
type SysJobResponse struct {
SysJob
TableName string `json:"tableName"`
TableDisplay string `json:"tableDisplay"`
FilePath string `json:"filePath"`
}
type TargetParams struct {
Duration int `json:"duration"`
TableName string `json:"tableName"`
Columns string `json:"columns"` // exported column name of time string
TimeCol string `json:"timeCol"` // time stamp of column name
TimeUnit string `json:"timeUnit"` // timestamp unit: second/micro/milli
Extras string `json:"extras"` // extras condition for where
FilePath string `json:"filePath"` // file path
}
func (m *FileNBI) GetFileList(c *gin.Context) {
var querys FileNBIQuery
querys.Category = c.Param("category")
querys.Type = c.Param("type")
if err := c.ShouldBindQuery(&querys); err != nil {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
if querys.Path == "" {
tableName := ""
ok := false
switch querys.Category {
case "cdr":
tableName, ok = CDRTableMapper[querys.Type]
if tableName == "" || !ok {
c.JSON(http.StatusOK, services.ErrResp(fmt.Sprintf("invalid CDR file type: %s", querys.Type)))
return
}
case "log":
tableName, ok = LogTableMapper[querys.Type]
if tableName == "" || !ok {
c.JSON(http.StatusOK, services.ErrResp(fmt.Sprintf("invalid log file type: %s", querys.Type)))
return
}
default:
c.JSON(http.StatusOK, services.ErrResp(fmt.Sprintf("invalid log file category: %s", querys.Category)))
return
}
s := SysJob{}
where := fmt.Sprintf("invoke_target='%s' and status=1 and JSON_UNQUOTE(JSON_EXTRACT(target_params,'$.tableName'))='%s'", INVOKE_FILE_EXPORT, tableName)
_, err := dborm.XEngDB().Table(s.TableName()).
Select("JSON_UNQUOTE(JSON_EXTRACT(target_params, '$.filePath')) as file_path").
Where(where).
Get(&querys.Path)
if err != nil {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
}
files, err := file.GetFileInfo(querys.Path, querys.Suffix)
if err != nil {
log.Error("failed to GetFileInfo:", err)
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
// split files list
lenNum := int64(len(files))
start := (querys.PageNum - 1) * querys.PageSize
end := start + querys.PageSize
var splitList []file.FileInfo
if start >= lenNum {
splitList = []file.FileInfo{}
} else if end >= lenNum {
splitList = files[start:]
} else {
splitList = files[start:end]
}
total := len(files)
c.JSON(http.StatusOK, services.TotalDataResp(splitList, total))
}
func (m *FileNBI) Total(c *gin.Context) {
dir := c.Query("path")
fileCount, dirCount, err := file.GetFileAndDirCount(dir)
if err != nil {
log.Error("failed to GetFileAndDirCount:", err)
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
total := fileCount + dirCount
c.JSON(http.StatusOK, services.TotalResp(int64(total)))
}
func (m *FileNBI) GetSingleFileHandler(c *gin.Context) {
var querys FileNBIQuery
querys.Category = c.Param("category")
querys.Type = c.Param("type")
querys.DateIndex = c.Param("dateIndex")
if err := c.ShouldBindQuery(&querys); err != nil {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
tableName := ""
if querys.Path == "" {
ok := false
switch querys.Category {
case "cdr":
tableName, ok = CDRTableMapper[querys.Type]
if tableName == "" || !ok {
c.JSON(http.StatusOK, services.ErrResp(fmt.Sprintf("invalid CDR file type: %s", querys.Type)))
return
}
case "log":
tableName, ok = LogTableMapper[querys.Type]
if tableName == "" || !ok {
c.JSON(http.StatusOK, services.ErrResp(fmt.Sprintf("invalid log file type: %s", querys.Type)))
return
}
default:
c.JSON(http.StatusOK, services.ErrResp(fmt.Sprintf("invalid log file category: %s", querys.Category)))
return
}
s := SysJob{}
where := fmt.Sprintf("invoke_target='%s' and status=1 and JSON_UNQUOTE(JSON_EXTRACT(target_params,'$.tableName'))='%s'", INVOKE_FILE_EXPORT, tableName)
_, err := dborm.XEngDB().Table(s.TableName()).
Select("JSON_UNQUOTE(JSON_EXTRACT(target_params, '$.filePath')) as file_path").
Where(where).
Get(&querys.Path)
if err != nil {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
}
fileName := tableName + "_export_" + querys.DateIndex + "0000" + ".csv"
filePath := filepath.Join(querys.Path, fileName)
file, err := os.Open(filePath)
if err != nil {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
defer file.Close()
if _, err := os.Stat(filePath); os.IsNotExist(err) {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
c.Header("Content-Disposition", "attachment; filename="+fileName)
c.Header("Content-Type", "application/octet-stream")
c.File(filePath)
}
func (m *FileNBI) GetMultiFileHandler(c *gin.Context) {
var querys FileNBIQuery
querys.Category = c.Param("category")
querys.Type = c.Param("type")
if err := c.ShouldBindQuery(&querys); err != nil {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
tableName := ""
if querys.Path == "" {
ok := false
switch querys.Category {
case "cdr":
tableName, ok = CDRTableMapper[querys.Type]
if tableName == "" || !ok {
c.JSON(http.StatusOK, services.ErrResp(fmt.Sprintf("invalid CDR file type: %s", querys.Type)))
return
}
case "log":
tableName, ok = LogTableMapper[querys.Type]
if tableName == "" || !ok {
c.JSON(http.StatusOK, services.ErrResp(fmt.Sprintf("invalid log file type: %s", querys.Type)))
return
}
default:
c.JSON(http.StatusOK, services.ErrResp(fmt.Sprintf("invalid log file category: %s", querys.Category)))
return
}
s := SysJob{}
where := fmt.Sprintf("invoke_target='%s' and status=1 and JSON_UNQUOTE(JSON_EXTRACT(target_params,'$.tableName'))='%s'", INVOKE_FILE_EXPORT, tableName)
_, err := dborm.XEngDB().Table(s.TableName()).
Select("JSON_UNQUOTE(JSON_EXTRACT(target_params, '$.filePath')) as file_path").
Where(where).
Get(&querys.Path)
if err != nil {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
}
zipWriter := zip.NewWriter(c.Writer)
defer zipWriter.Close()
for _, fileName := range querys.FileNames {
filePath := filepath.Join(querys.Path, fileName)
file, err := os.Open(filePath)
if err != nil {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
defer file.Close()
if _, err := os.Stat(filePath); os.IsNotExist(err) {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
writer, err := zipWriter.Create(filepath.Base(fileName))
if err != nil {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
if _, err := io.Copy(writer, file); err != nil {
c.JSON(http.StatusOK, services.ErrResp(err.Error()))
return
}
}
zipFile := tableName + "_export_" + time.Now().Local().Format(global.DateData) + ".zip"
c.Header("Content-Disposition", "attachment; filename="+zipFile)
c.Header("Content-Type", "application/zip")
//c.File(filePath)
}

View File

@@ -0,0 +1,47 @@
package nbi_file
import (
"be.ems/lib/file"
)
const (
INVOKE_FILE_EXPORT = "exportTable"
)
var CDRTableMapper map[string]string = map[string]string{
"ims": "cdr_event_ims",
"smf": "cdr_event_smf",
"smsc": "cdr_event_smsc",
"sms": "cdr_event_smsc",
}
var LogTableMapper map[string]string = map[string]string{
"operate": "sys_log_operate",
"security": "sys_log_login",
"alarm": "alarm_log",
}
type SysJob struct {
JobID int64 `gorm:"column:job_id;primary_key;auto_increment" json:"job_id"` //任务ID
InvokeTarget string `gorm:"column:invoke_target" json:"invoke_target"` //调用目标字符串
TargetParams string `gorm:"column:target_params;type:json" json:"target_params,omitempty"` //调用目标传入参数
}
func (s *SysJob) TableName() string {
return "sys_job"
}
type FileNBI struct {
file.FileInfo
}
type FileNBIQuery struct {
Category string `form:"category" binding:"required"`
Type string `form:"type" binding:"required"`
DateIndex string `form:"dateIndex"`
Path string `json:"path" form:"path"`
FileNames []string `json:"fileName" form:"fileName"`
Suffix string `form:"suffix"`
PageNum int64 `form:"pageNum"`
PageSize int64 `form:"pageSize"`
}

View File

@@ -0,0 +1,26 @@
package nbi_file
import (
"be.ems/src/framework/middleware"
"github.com/gin-gonic/gin"
)
// Register Routes for file_export
func Register(r *gin.RouterGroup) {
fileNBI := r.Group("/file")
{
var f *FileNBI
fileNBI.GET("/:category/:type/list",
middleware.PreAuthorize(nil),
f.GetFileList,
)
fileNBI.GET("/:category/:type/:dateIndex",
middleware.PreAuthorize(nil),
f.GetSingleFileHandler,
)
fileNBI.GET("/:category/:type",
middleware.PreAuthorize(nil),
f.GetMultiFileHandler,
)
}
}

View File

@@ -15,7 +15,6 @@ import (
"be.ems/lib/log" "be.ems/lib/log"
"be.ems/lib/oauth" "be.ems/lib/oauth"
"be.ems/lib/services" "be.ems/lib/services"
"be.ems/lib/session"
"be.ems/restagent/config" "be.ems/restagent/config"
) )
@@ -35,7 +34,7 @@ type ApiResponse struct {
ResultMessage interface{} ResultMessage interface{}
} }
var globalSession = session.NewSessManager("restagent") //var globalSession = session.NewSessManager("restagent")
var ( var (
MAX_RMUID_NUM int MAX_RMUID_NUM int

16
features/nbi/service.go Normal file
View File

@@ -0,0 +1,16 @@
// log management package
package nbi
import (
nbi_file "be.ems/features/nbi/file"
"be.ems/lib/log"
"github.com/gin-gonic/gin"
)
func InitSubServiceRoute(r *gin.Engine) {
log.Info("======init North-Bound Interface group gin.Engine")
nbiGroup := r.Group("/nbi")
nbi_file.Register(nbiGroup)
}

View File

@@ -54,28 +54,28 @@ func GetNRMByUri(w http.ResponseWriter, r *http.Request) {
// error processing ... // error processing ...
// 401-1 response // 401-1 response
token, ret := globalSession.IsCarriedToken(r) // token, ret := globalSession.IsCarriedToken(r)
if ret == false { // if ret == false {
log.Error("AccessToken is not carried") // log.Error("AccessToken is not carried")
services.ResponseUnauthorized401AccessTokenNotCarried(w) // services.ResponseUnauthorized401AccessTokenNotCarried(w)
return // return
} // }
// 401-2 response // 401-2 response
if globalSession.IsValidToken(token) == false { // if globalSession.IsValidToken(token) == false {
log.Error("AccessToken fails or does not exist") // log.Error("AccessToken fails or does not exist")
services.ResponseUnauthorized401AccessTokenNotExist(w) // services.ResponseUnauthorized401AccessTokenNotExist(w)
return // return
} // }
// response 403 Forbidden, permissions deny // response 403 Forbidden, permissions deny
// todo... // todo...
plist := globalSession.GetPermissionFromSession(token) // plist := globalSession.GetPermissionFromSession(token)
log.Debug("permission list:", plist) // log.Debug("permission list:", plist)
if len(plist) == 0 || plist[0] == false { // if len(plist) == 0 || plist[0] == false {
log.Error("User permission deny") // log.Error("User permission deny")
services.ResponseForbidden403NotPermission(w) // services.ResponseForbidden403NotPermission(w)
return // return
} // }
vars := mux.Vars(r) vars := mux.Vars(r)
qeuryUri := vars["apiCategory"] + "/" + vars["elementTypeValue"] + "/" + vars["objectTypeValue"] qeuryUri := vars["apiCategory"] + "/" + vars["elementTypeValue"] + "/" + vars["objectTypeValue"]

View File

@@ -9,14 +9,15 @@ import (
) )
type FileInfo struct { type FileInfo struct {
FileType string `json:"fileType"` // 文件类型 FileType string `json:"fileType"` // file type: file/directory
FileMode string `json:"fileMode"` // 文件的权限 FileMode string `json:"fileMode"` // file mode
LinkCount int64 `json:"linkCount"` // 硬链接数目 LinkCount int64 `json:"linkCount"` // link count
Owner string `json:"owner"` // 所属用户 Owner string `json:"owner"` // owner
Group string `json:"group"` // 所属组 Group string `json:"group"` // group
Size int64 `json:"size"` // 文件的大小 Size int64 `json:"size"` // size: xx byte
ModifiedTime int64 `json:"modifiedTime"` // 最后修改时间,单位为秒 ModifiedTime int64 `json:"modifiedTime"` // last modified time:seconds
FileName string `json:"fileName"` // 文件的名称 FilePath string `json:"filePath"` // file path
FileName string `json:"fileName"` // file name
} }
func GetFileInfo(dir, suffix string) ([]FileInfo, error) { func GetFileInfo(dir, suffix string) ([]FileInfo, error) {
@@ -48,6 +49,7 @@ func GetFileInfo(dir, suffix string) ([]FileInfo, error) {
Group: "-", Group: "-",
Size: info.Size(), Size: info.Size(),
ModifiedTime: info.ModTime().Unix(), ModifiedTime: info.ModTime().Unix(),
FilePath: dir,
FileName: info.Name(), FileName: info.Name(),
} }
files = append(files, fileInfo) files = append(files, fileInfo)

View File

@@ -3,13 +3,13 @@
ProjectL = omc ProjectL = omc
ProjectU = OMC ProjectU = OMC
PROJECT = $(ProjectL) PROJECT = $(ProjectL)
VERSION = 2.2410.2 VERSION = 2.2410.3
RelDate = `date +%Y%m%d` RelDate = `date +%Y%m%d`
Release = $(RelDate) Release = $(RelDate)
RelVer = $(VERSION)-$(RelDate) RelVer = $(VERSION)-$(RelDate)
PLATFORM = amd64 PLATFORM = amd64
ARMPLATFORM = aarch64 ARMPLATFORM = aarch64
GitLocalRoot = $(HOME)/local.git GitLocalRoot = $(HOME)/omc.git
EmsBuildRoot=$(GitLocalRoot)/build.ems EmsBuildRoot=$(GitLocalRoot)/build.ems
BuildDir = $(EmsBuildRoot)/build BuildDir = $(EmsBuildRoot)/build
BuildOMCDir = $(BuildDir)/usr/local/omc BuildOMCDir = $(BuildDir)/usr/local/omc

62
misc/upgconf.sh Normal file
View File

@@ -0,0 +1,62 @@
#!/bin/bash
config_file="/usr/local/omc/etc/restconf.yaml"
temp_file="/tmp/temp.yaml"
declare -A insert_lines=(
[156]=" dataCoding: 0"
[157]=" serviceNumber: \"OMC\""
)
declare -A update_lines=(
["deadLine: 10"]="deadLine: 600"
)
# check if exist file
if [[ ! -f $config_file ]]; then
echo "NOT FOUND config file: $config_file"
exit 1
fi
insert_if_missing() {
local line_number="$1"
local line_content="$2"
local current_content=$(sed -n "${line_number}p" "$config_file")
if [[ "$current_content" != "$line_content" ]]; then
# insert line to config file
echo -n "Inserting '$line_content' into line ${line_number} ... "
awk -v n="$line_number" -v line="$line_content" 'NR==n {print line} {print}' "$config_file" >"$temp_file" && mv "$temp_file" "$config_file"
if [ $? = 0 ]; then
echo "done"
fi
else
echo "Exist '$line_content' at line ${line_number}"
fi
}
# functionupdate line content
update_lines_content() {
local old_line="$1"
local new_line="$2"
echo -n "Updating '$old_line' to line '$new_line' ..."
sed -i "s/$old_line/$new_line/" "$config_file"
if [ $? = 0 ]; then
echo "done"
fi
}
#line_numbers=(156 157)
line_numbers=$(for key in "${!insert_lines[@]}"; do echo "$key"; done | sort -n)
# insert process
#for line_number in "${line_numbers[@]}"; do
#for line_number in "${!insert_lines[@]}"; do
for line_number in $line_numbers; do
insert_if_missing "$line_number" "${insert_lines[$line_number]}"
done
# update process
for old_line in "${!update_lines[@]}"; do
update_lines_content "$old_line" "${update_lines[$old_line]}"
done

View File

@@ -2,7 +2,7 @@
ProcList="restagent crontask sshsvc captrace data2html" ProcList="restagent crontask sshsvc captrace data2html"
ProjectL=omc ProjectL=omc
VERSION=2.2410.2 VERSION=2.2410.3
RelDate=`date +%Y%m%d` RelDate=`date +%Y%m%d`
Release=${RelDate} Release=${RelDate}
RelVer=${VERSION}-${RelDate} RelVer=${VERSION}-${RelDate}
@@ -10,7 +10,7 @@ Ky10Arch=ky10.aarch64
RpmPkgName=${ProjectL}-${RelVer}.ky10.aarch64.rpm RpmPkgName=${ProjectL}-${RelVer}.ky10.aarch64.rpm
RpmPkgRename=${ProjectL}-r${RelVer}-ky10.rpm RpmPkgRename=${ProjectL}-r${RelVer}-ky10.rpm
DebPkgName=${ProjectL}-r${RelVer}-ub*.deb DebPkgName=${ProjectL}-r${RelVer}-ub*.deb
GitLocalRoot=${HOME}/local.git GitLocalRoot=${HOME}/omc.git
EmsBEDir=${GitLocalRoot}/be.ems EmsBEDir=${GitLocalRoot}/be.ems
EmsBuildRoot=${GitLocalRoot}/build.ems EmsBuildRoot=${GitLocalRoot}/build.ems
RpmArch=`arch` RpmArch=`arch`

View File

@@ -3,7 +3,7 @@
# duration: rotation time with xx hours, example: 1/12/24 hours # duration: rotation time with xx hours, example: 1/12/24 hours
# count: rotation count of log, default is 30 rotation # count: rotation count of log, default is 30 rotation
logger: logger:
file: d:/local.git/be.ems/restagent/log/restagent.log file: d:/omc.git/be.ems/restagent/log/restagent.log
level: trace level: trace
duration: 24 duration: 24
count: 2 count: 2
@@ -27,7 +27,7 @@ rest:
webServer: webServer:
enabled: false enabled: false
rootDir: d:/local.git/fe.ems.vue3/dist rootDir: d:/omc.git/fe.ems.vue3/dist
listen: listen:
- addr: :80 - addr: :80
schema: http schema: http
@@ -46,7 +46,7 @@ database:
port: 33066 port: 33066
name: omc_db name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: d:/local.git/be.ems/restagent/database backup: d:/omc.git/be.ems/restagent/database
# Redis 缓存数据,数据源声明全小写 # Redis 缓存数据,数据源声明全小写
redis: redis:
@@ -113,8 +113,8 @@ omc:
binDir: ./bin binDir: ./bin
backup: ./backup backup: ./backup
upload: ./upload upload: ./upload
frontUpload: d:/local.git/fe.ems/upload frontUpload: d:/omc.git/fe.ems/upload
frontTraceDir: d:/local.git/fe.ems/trace frontTraceDir: d:/omc.git/fe.ems/trace
software: ./software software: ./software
license: ./license license: ./license
gtpUri: gtp:192.168.2.219:2152 gtpUri: gtp:192.168.2.219:2152

View File

@@ -4,7 +4,7 @@
# count: rotation count of log, default is 30 rotation # count: rotation count of log, default is 30 rotation
# pprof: false(default)/true to disable/enable pprof # pprof: false(default)/true to disable/enable pprof
logger: logger:
file: d:/local.git/be.ems/restagent/log/restagent.log file: d:/omc.git/be.ems/restagent/log/restagent.log
level: trace level: trace
duration: 24 duration: 24
count: 2 count: 2
@@ -24,7 +24,7 @@ rest:
webServer: webServer:
enabled: true enabled: true
rootDir: d:/local.git/fe.ems.vue3/dist rootDir: d:/omc.git/fe.ems.vue3/dist
listen: listen:
- addr: :80 - addr: :80
schema: http schema: http
@@ -43,7 +43,7 @@ database:
port: 33066 port: 33066
name: "omc_db" name: "omc_db"
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: d:/local.git/be.ems/restagent/database backup: d:/omc.git/be.ems/restagent/database
# Redis data cache # Redis data cache
redis: redis:

View File

@@ -1,7 +1,7 @@
# Makefile for rest agent project # Makefile for rest agent project
PROJECT = OMC PROJECT = OMC
VERSION = 2.2410.2 VERSION = 2.2410.3
PLATFORM = amd64 PLATFORM = amd64
ARMPLATFORM = aarch64 ARMPLATFORM = aarch64
BUILDDIR = ../../build BUILDDIR = ../../build

View File

@@ -1,7 +1,7 @@
# 项目信息 # 项目信息
framework: framework:
name: "OMC" name: "OMC"
version: "2.2410.2" version: "2.2410.3"
# 应用服务配置 # 应用服务配置
server: server:

View File

@@ -3,7 +3,7 @@
# duration: rotation time with xx hours, example: 1/12/24 hours # duration: rotation time with xx hours, example: 1/12/24 hours
# count: rotation count of log, default is 30 rotation # count: rotation count of log, default is 30 rotation
logger: logger:
file: d:/local.git/be.ems/sshsvc/log/sshsvc.log file: d:/omc.git/be.ems/sshsvc/log/sshsvc.log
level: trace level: trace
duration: 24 duration: 24
count: 30 count: 30
@@ -13,7 +13,7 @@ logger:
# count: rotation count of log, default is 30 rotation # count: rotation count of log, default is 30 rotation
# level: cmd/ret log cmd/log cmd & result # level: cmd/ret log cmd/log cmd & result
logmml: logmml:
file: d:/local.git/be.ems/sshsvc/mmllog/omcmml.log file: d:/omc.git/be.ems/sshsvc/mmllog/omcmml.log
duration: 24 duration: 24
count: 30 count: 30
level: ret level: ret

View File

@@ -1,7 +1,7 @@
# Makefile for OMC-OMC-crontask project # Makefile for OMC-OMC-crontask project
PROJECT = OMC PROJECT = OMC
VERSION = 2.2410.2 VERSION = 2.2410.3
LIBDIR = be.ems/lib LIBDIR = be.ems/lib
BINNAME = sshsvc BINNAME = sshsvc

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
Home=/home/simon Home=/home/simon
GitLocalRoot=${Home}/local.git GitLocalRoot=${Home}/omc.git
EmsBEDir=${GitLocalRoot}/be.ems EmsBEDir=${GitLocalRoot}/be.ems
user="root" user="root"
password="1000omc@kp!" password="1000omc@kp!"

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
Home=/home/simon Home=/home/simon
GitLocalRoot=${Home}/local.git GitLocalRoot=${Home}/omc.git
EmsBEDir=${GitLocalRoot}/be.ems EmsBEDir=${GitLocalRoot}/be.ems
EMSBuildDir=${GitLocalRoot}/build.ems EMSBuildDir=${GitLocalRoot}/build.ems
user="root" user="root"