backup and alarm
This commit is contained in:
@@ -129,7 +129,7 @@ func CheckLocalRmUID(rmUIDs []string) string {
|
||||
}
|
||||
|
||||
func NBIGetNRMFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
log.Debug("NorthGetNRMFromNF processing... ")
|
||||
log.Debug("NBIGetNRMFromNF processing... ")
|
||||
|
||||
// response 414-4 uri too long ? (optional)
|
||||
// todo ... ?
|
||||
@@ -220,19 +220,9 @@ func NBIGetNRMFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
services.ResponseRequestURITooLong414NRMNumExceed(w, config.GetYamlConfig().Params.RmUIDMaxNum)
|
||||
return
|
||||
}
|
||||
/*
|
||||
// response 400-1
|
||||
// check rmUID is valid
|
||||
// todo ...
|
||||
invalidRmUIDs := CheckValidRmUID(rmUIDValues)
|
||||
if len(invalidRmUIDs) != 0 {
|
||||
log.Debug("rmUID is invalid")
|
||||
services.ResponseBadRequest400RmUIDsIsInvalid(w, invalidRmUIDs)
|
||||
return
|
||||
}
|
||||
*/
|
||||
|
||||
var response *resty.Response
|
||||
// respMsg := make(map[string]interface{})
|
||||
respMsg := make(map[string]interface{})
|
||||
for _, rmUID := range rmUIDValues {
|
||||
neInfo, err := dborm.XormGetNeInfoByRmUID(neType, rmUID)
|
||||
if err != nil {
|
||||
@@ -255,16 +245,14 @@ func NBIGetNRMFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
services.ResponseInternalServerError500NFConnectRefused(w)
|
||||
return
|
||||
}
|
||||
/*
|
||||
switch response.StatusCode() {
|
||||
case http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusCreated:
|
||||
respMsg["data"] = response
|
||||
default:
|
||||
if response != nil {
|
||||
services.TransportResponse(w, response.StatusCode(), response.Body())
|
||||
}
|
||||
switch response.StatusCode() {
|
||||
case http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusCreated:
|
||||
respMsg["data"] = response
|
||||
default:
|
||||
if response != nil {
|
||||
services.TransportResponse(w, response.StatusCode(), response.Body())
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
services.TransportResponse(w, response.StatusCode(), response.Body())
|
||||
|
||||
Reference in New Issue
Block a user