marge: 合并代码,包名变更be.ems
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
package cm
|
||||
|
||||
import (
|
||||
"ems.agt/lib/dborm"
|
||||
"ems.agt/lib/global"
|
||||
"ems.agt/lib/log"
|
||||
"ems.agt/lib/services"
|
||||
"ems.agt/restagent/config"
|
||||
"strings"
|
||||
|
||||
"be.ems/lib/dborm"
|
||||
"be.ems/lib/global"
|
||||
"be.ems/lib/log"
|
||||
"be.ems/lib/services"
|
||||
"be.ems/restagent/config"
|
||||
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
tokenConst "ems.agt/src/framework/constants/token"
|
||||
tokenConst "be.ems/src/framework/constants/token"
|
||||
"github.com/go-resty/resty/v2"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
@@ -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