mager: 合并11.3版本,包名和主线一样方便复制
This commit is contained in:
@@ -10,13 +10,13 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"nms_cxy/lib/dborm"
|
||||
"nms_cxy/lib/global"
|
||||
"nms_cxy/lib/log"
|
||||
"nms_cxy/lib/services"
|
||||
"nms_cxy/omc/config"
|
||||
tokenConst "nms_cxy/src/framework/constants/token"
|
||||
neService "nms_cxy/src/modules/network_element/service"
|
||||
"be.ems/lib/dborm"
|
||||
"be.ems/lib/global"
|
||||
"be.ems/lib/log"
|
||||
"be.ems/lib/services"
|
||||
"be.ems/restagent/config"
|
||||
tokenConst "be.ems/src/framework/constants/token"
|
||||
neService "be.ems/src/modules/network_element/service"
|
||||
|
||||
"github.com/go-resty/resty/v2"
|
||||
"github.com/gorilla/mux"
|
||||
@@ -157,7 +157,7 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 刷新缓存,不存在结构体网元Id空字符串
|
||||
neService.NewNeInfoImpl.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
neService.NewNeInfo.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
|
||||
mapRow := make(map[string]interface{})
|
||||
row := map[string]interface{}{"affectedRows": affected}
|
||||
@@ -208,7 +208,7 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 刷新缓存,不存在结构体网元Id空字符串
|
||||
neService.NewNeInfoImpl.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
neService.NewNeInfo.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
|
||||
services.ResponseStatusOK204NoContent(w)
|
||||
return
|
||||
@@ -267,7 +267,7 @@ func PutNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 刷新缓存,不存在结构体网元Id空字符串
|
||||
neService.NewNeInfoImpl.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
neService.NewNeInfo.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
|
||||
mapRow := make(map[string]interface{})
|
||||
row := map[string]interface{}{"affectedRows": affected}
|
||||
@@ -319,7 +319,7 @@ func PutNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 刷新缓存,不存在结构体网元Id空字符串
|
||||
neService.NewNeInfoImpl.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
neService.NewNeInfo.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
|
||||
services.ResponseStatusOK204NoContent(w)
|
||||
return
|
||||
@@ -381,7 +381,7 @@ func DeleteNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 刷新缓存,不存在结构体网元Id空字符串
|
||||
neService.NewNeInfoImpl.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
neService.NewNeInfo.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
|
||||
mapRow := make(map[string]interface{})
|
||||
row := map[string]interface{}{"affectedRows": affected}
|
||||
@@ -862,7 +862,7 @@ func PostNeServiceAction(w http.ResponseWriter, r *http.Request) {
|
||||
// send 204 to fe firstly
|
||||
services.ResponseStatusOK204NoContent(w)
|
||||
//actionCmd := fmt.Sprintf("sudo %s/bin/omcsvc.sh %s", config.GetYamlConfig().NE.OmcDir, action)
|
||||
actionCmd := fmt.Sprintf("sudo systemctl %s omc", action)
|
||||
actionCmd := fmt.Sprintf("sudo systemctl %s restagent", action)
|
||||
go RunSSHCmd(sshHost, actionCmd)
|
||||
return
|
||||
// cmd := exec.Command("ssh", sshHost, actionCmd)
|
||||
|
||||
Reference in New Issue
Block a user