restart ne
This commit is contained in:
1 parent
21a4f123b3
commit
d0f90f4a50
3 files changed
+28
-8
No files matched your search
+3
-4
@@ -145,7 +145,7 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
log.Info("StatusCode: ", response.StatusCode())
|
||||
|
||||
if config.GetYamlConfig().OMC.Chk2Ne == false {
|
||||
if !config.GetYamlConfig().OMC.Chk2Ne {
|
||||
affected, err := dborm.XormInsertNeInfo(neInfo)
|
||||
if err != nil {
|
||||
log.Error("Failed to insert Ne info:", err)
|
||||
@@ -243,7 +243,7 @@ func PutNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
log.Info("StatusCode: ", response.StatusCode())
|
||||
|
||||
if config.GetYamlConfig().OMC.Chk2Ne == false {
|
||||
if !config.GetYamlConfig().OMC.Chk2Ne {
|
||||
affected, err := dborm.XormUpdateNeInfo(neInfo)
|
||||
if err != nil {
|
||||
log.Error("Failed to update Ne info:", err)
|
||||
@@ -319,7 +319,7 @@ func DeleteNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
log.Debug("NE info:", neInfo)
|
||||
|
||||
// if NE in active status, can't delete NE
|
||||
if IsActiveNF(neInfo) == false {
|
||||
if !IsActiveNF(neInfo) {
|
||||
affected, err := dborm.XormDeleteNeInfo(neInfo)
|
||||
if err != nil {
|
||||
log.Error("Failed to delete Ne info:", err)
|
||||
@@ -336,7 +336,6 @@ func DeleteNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
err = global.ErrCMCannotDeleteActiveNE
|
||||
log.Error(err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
func IsActiveNF(neInfo *dborm.NeInfo) bool {
|
||||
|
||||
Reference in new issue
Block a user