diff --git a/crontask/db.go b/crontask/db.go index 1b8eb136..104a43bb 100644 --- a/crontask/db.go +++ b/crontask/db.go @@ -117,7 +117,7 @@ func XormGetAllNeInfo(nes *[]NeInfo) (*[]NeInfo, error) { log.Debug("XormGetAllNeInfo processing... ") ne := new(NeInfo) - rows, err := dbClient.xEngine.Table("ne_info").Where("status='0'").Rows(ne) + rows, err := dbClient.xEngine.Table("ne_info").Where("status in ('0','3')").Rows(ne) if err != nil { log.Error("Failed to get table ne_info from database:", err) return nil, err diff --git a/features/cm/param.go b/features/cm/param.go index 2a68a87c..64474efd 100644 --- a/features/cm/param.go +++ b/features/cm/param.go @@ -48,9 +48,9 @@ func GetParamConfigFromNF(w http.ResponseWriter, r *http.Request) { getNeInfoURI := restHostPort + getNeInfoPattern neId := services.GetUriParamString(r, "ne_id", ",", true, true) if neId == "" { - getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status='0'+and+ne_type='%s'", neType) + getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status in ('0','3')+and+ne_type='%s'", neType) } else { - getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status='0'+and+ne_type='%v'+and+ne_id+in+%v", neType, neId) + getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status in ('0','3')+and+ne_type='%v'+and+ne_id+in+%v", neType, neId) } log.Debug("getNeInfoURI:", getNeInfoURI) diff --git a/features/state/getstate.go b/features/state/getstate.go index 8f3a9371..bebd4c76 100644 --- a/features/state/getstate.go +++ b/features/state/getstate.go @@ -750,7 +750,7 @@ func GetStateFromNF(w http.ResponseWriter, r *http.Request) { restHostPort := fmt.Sprintf("http://127.0.0.1:%d", config.GetYamlConfig().Rest[0].Port) getNeInfoPattern := fmt.Sprintf(config.DefaultUriPrefix+"/databaseManagement/v1/elementType/%s/objectType/ne_info", config.GetYamlConfig().Database.Name) - getNeInfoURI := restHostPort + getNeInfoPattern + "?WHERE=status='0'" + getNeInfoURI := restHostPort + getNeInfoPattern + "?WHERE=status in ('0','3')" log.Debug("getNeInfoPattern:", getNeInfoPattern) resp, err := client.R(). @@ -774,9 +774,9 @@ func GetStateFromNF(w http.ResponseWriter, r *http.Request) { getNeInfoURI := restHostPort + getNeInfoPattern neId := services.GetUriParamString(r, "ne_id", ",", true, true) if neId == "" { - getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status='0'+and+ne_type='%s'", neType) + getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status in ('0','3')+and+ne_type='%s'", neType) } else { - getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status='0'+and+ne_type='%v'+and+ne_id+in+%v", neType, neId) + getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status in ('0','3')+and+ne_type='%v'+and+ne_id+in+%v", neType, neId) } log.Debug("getNeInfoURI:", getNeInfoURI) @@ -886,7 +886,7 @@ func GetEMSState(ip string) *SysState { OsInfo: getUnameStr(), DbInfo: "mysql Ver 15.1 Distrib 10.3.35-MariaDB, for Linux (aarch64) using readline 5.1", IpAddr: []string{ip}, - Port: 3030, + Port: config.GetYamlConfig().Rest[0].Port, Version: version, Capability: 9999999, SerialNum: config.GetYamlConfig().OMC.Sn, diff --git a/lib/dborm/dborm.go b/lib/dborm/dborm.go index bc6586cb..036ce881 100644 --- a/lib/dborm/dborm.go +++ b/lib/dborm/dborm.go @@ -222,7 +222,7 @@ func XormGetNeInfoByRmUID(neType string, rmUID string) (*NeInfo, error) { log.Error("Failed to get table ne_info from database:", err) return nil, err } else if !has { - log.Infof("Not found ne_info from database, status='0', neType=%s, neId=%s", neType, rmUID) + log.Infof("Not found ne_info from database, status in ('0','3'), neType=%s, neId=%s", neType, rmUID) return nil, nil }