fix: 网元参数omcNeConfig接口转发带ne_id参数
This commit is contained in:
@@ -167,7 +167,7 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
hostUri := global.CombineHostUri(neInfo.Ip, neInfo.Port)
|
||||
//hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
||||
apiUri := fmt.Sprintf("%s/systemManagement/v1/elementType/%s/objectType/config/omcNeConfig", config.DefaultUriPrefix, strings.ToLower(neInfo.NeType))
|
||||
apiUri := fmt.Sprintf("%s/systemManagement/v1/elementType/%s/objectType/config/omcNeConfig?ne_id=%s", config.DefaultUriPrefix, strings.ToLower(neInfo.NeType), neInfo.NeId)
|
||||
requestURI2NF := fmt.Sprintf("%s%s", hostUri, apiUri)
|
||||
log.Debug("requestURI2NF:", requestURI2NF)
|
||||
|
||||
@@ -277,7 +277,7 @@ func PutNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
hostUri := global.CombineHostUri(neInfo.Ip, neInfo.Port)
|
||||
//hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
||||
apiUri := fmt.Sprintf("%s/systemManagement/v1/elementType/%s/objectType/config/omcNeConfig", config.DefaultUriPrefix, neTypeLower)
|
||||
apiUri := fmt.Sprintf("%s/systemManagement/v1/elementType/%s/objectType/config/omcNeConfig?ne_id=%s", config.DefaultUriPrefix, neTypeLower, neInfo.NeId)
|
||||
requestURI2NF := fmt.Sprintf("%s%s", hostUri, apiUri)
|
||||
log.Debug("requestURI2NF:", requestURI2NF)
|
||||
|
||||
|
||||
@@ -42,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)
|
||||
|
||||
@@ -78,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
|
||||
@@ -130,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
|
||||
@@ -183,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
|
||||
|
||||
Reference in New Issue
Block a user