merge: 合并OMC分支

This commit is contained in:
TsMask
2024-07-10 14:18:48 +08:00
parent 17c0011c6b
commit 625ed57a50
260 changed files with 9167 additions and 14857 deletions

View File

@@ -3,7 +3,7 @@ package cm
import (
"strings"
"nms_cxy/lib/core/utils/ctx"
"nms_cxy/lib/core/ctx"
"nms_cxy/lib/global"
"nms_cxy/lib/log"
"nms_cxy/lib/services"
@@ -13,6 +13,7 @@ import (
"fmt"
"io"
"net/http"
neService "nms_cxy/src/modules/network_element/service"
"github.com/go-resty/resty/v2"
@@ -41,7 +42,7 @@ func GetParamConfigFromNF(w http.ResponseWriter, r *http.Request) {
neInfo := neService.NewNeInfoImpl.SelectNeInfoByNeTypeAndNeID(neType, neId)
var response services.DataResponse
if neInfo.NeId == neId {
if neInfo.NeId == neId && neInfo.NeId != "" {
requestURI2NF := fmt.Sprintf("http://%s:%v%s", neInfo.IP, neInfo.Port, r.RequestURI)
log.Debug("requestURI2NF:", requestURI2NF)
@@ -77,7 +78,7 @@ func PostParamConfigToNF(w http.ResponseWriter, r *http.Request) {
neInfo := neService.NewNeInfoImpl.SelectNeInfoByNeTypeAndNeID(neType, neId)
if neInfo.NeId != neId {
if neInfo.NeId != neId || neInfo.NeId == "" {
log.Error("neId is empty")
services.ResponseInternalServerError500DatabaseOperationFailed(w)
return
@@ -129,7 +130,7 @@ func PutParamConfigToNF(w http.ResponseWriter, r *http.Request) {
neId := ctx.GetQuery(r, "ne_id")
neInfo := neService.NewNeInfoImpl.SelectNeInfoByNeTypeAndNeID(neType, neId)
if neInfo.NeId != neId {
if neInfo.NeId != neId || neInfo.NeId == "" {
log.Error("neId is empty")
services.ResponseInternalServerError500DatabaseOperationFailed(w)
return
@@ -182,7 +183,7 @@ func DeleteParamConfigToNF(w http.ResponseWriter, r *http.Request) {
neId := ctx.GetQuery(r, "ne_id")
neInfo := neService.NewNeInfoImpl.SelectNeInfoByNeTypeAndNeID(neType, neId)
if neInfo.NeId != neId {
if neInfo.NeId != neId || neInfo.NeId == "" {
log.Error("neId is empty")
services.ResponseInternalServerError500DatabaseOperationFailed(w)
return