fix: OMC网元配置omcNeConfig接口覆盖
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package cm
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"ems.agt/lib/dborm"
|
||||
"ems.agt/lib/global"
|
||||
"ems.agt/lib/log"
|
||||
@@ -163,8 +165,14 @@ func PutParamConfigToNF(w http.ResponseWriter, r *http.Request) {
|
||||
services.ResponseNotFound404UriNotExist(w, r)
|
||||
return
|
||||
}
|
||||
neId := services.GetUriParamString(r, "ne_id", ",", false, false)
|
||||
|
||||
// OMC配置接口 /api/rest/systemManagement/v1/elementType/omc/objectType/config/omcNeConfig
|
||||
if v, ok := vars["paraName"]; ok && v == "omcNeConfig" && strings.ToLower(neType) == "omc" {
|
||||
PutOMCNeConfig(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
neId := services.GetUriParamString(r, "ne_id", ",", false, false)
|
||||
// no, _ := strconv.ParseInt(neId, 10, 64)
|
||||
neInfo, err := dborm.XormGetNeInfo(neType, neId)
|
||||
if err != nil {
|
||||
@@ -199,6 +207,31 @@ func PutParamConfigToNF(w http.ResponseWriter, r *http.Request) {
|
||||
services.ResponseWithJson(w, http.StatusNoContent, response)
|
||||
}
|
||||
|
||||
// PutOMCNeConfig 网元OMC配置
|
||||
//
|
||||
// 目前没配置,返回204
|
||||
func PutOMCNeConfig(w http.ResponseWriter, r *http.Request) {
|
||||
// vars := mux.Vars(r)
|
||||
// neType := vars["elementTypeValue"]
|
||||
// if neType == "" {
|
||||
// log.Error("elementTypeValue is empty")
|
||||
// services.ResponseNotFound404UriNotExist(w, r)
|
||||
// return
|
||||
// }
|
||||
// body, err := io.ReadAll(io.LimitReader(r.Body, global.RequestBodyMaxLen))
|
||||
// if err != nil {
|
||||
// log.Error("Failed to io.ReadAll:", err)
|
||||
// services.ResponseNotFound404UriNotExist(w, r)
|
||||
// return
|
||||
// }
|
||||
|
||||
// neInfo := new(dborm.NeInfo)
|
||||
// _ = json.Unmarshal(body, neInfo)
|
||||
// neInfo.NeType = strings.ToUpper(neType)
|
||||
|
||||
services.ResponseStatusOK204NoContent(w)
|
||||
}
|
||||
|
||||
func DeleteParamConfigToNF(w http.ResponseWriter, r *http.Request) {
|
||||
log.Debug("DeleteParamConfigToNF processing... ")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user