neinfo recover
This commit is contained in:
9
.gitignore
vendored
9
.gitignore
vendored
@@ -16,7 +16,7 @@ crontask/database/
|
|||||||
crontask/export/
|
crontask/export/
|
||||||
crontask/temp
|
crontask/temp
|
||||||
crontask/crontask
|
crontask/crontask
|
||||||
crontask/__debug_bin.exe
|
crontask/__debug_bin*.exe
|
||||||
|
|
||||||
restagent/backup/
|
restagent/backup/
|
||||||
restagent/log/
|
restagent/log/
|
||||||
@@ -24,17 +24,17 @@ restagent/upload/
|
|||||||
restagent/software/
|
restagent/software/
|
||||||
restagent/database/
|
restagent/database/
|
||||||
restagent/restagent
|
restagent/restagent
|
||||||
restagent/__debug_bin.exe
|
restagent/__debug_bin*.exe
|
||||||
|
|
||||||
sshsvc/sshsvc
|
sshsvc/sshsvc
|
||||||
sshsvc/mmllog/
|
sshsvc/mmllog/
|
||||||
sshsvc/mmlhome/
|
sshsvc/mmlhome/
|
||||||
sshsvc/log/
|
sshsvc/log/
|
||||||
sshsvc/__debug_bin.exe
|
sshsvc/__debug_bin*.exe
|
||||||
|
|
||||||
captrace/captrace
|
captrace/captrace
|
||||||
captrace/log/
|
captrace/log/
|
||||||
captrace/__debug_bin.exe
|
captrace/__debug_bin*.exe
|
||||||
|
|
||||||
tools/loadmconf/loadmconf
|
tools/loadmconf/loadmconf
|
||||||
|
|
||||||
@@ -46,4 +46,3 @@ vendor
|
|||||||
*.log-*
|
*.log-*
|
||||||
*.bak
|
*.bak
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,12 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
|
|||||||
log.Debug("Body:", string(body))
|
log.Debug("Body:", string(body))
|
||||||
|
|
||||||
neInfo := new(dborm.NeInfo)
|
neInfo := new(dborm.NeInfo)
|
||||||
_ = json.Unmarshal(body, neInfo)
|
err = json.Unmarshal(body, neInfo)
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to json.Unmarshal:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
neInfo.UpdateTime = time.Now().Format(time.DateTime)
|
neInfo.UpdateTime = time.Now().Format(time.DateTime)
|
||||||
log.Debug("NE info:", neInfo)
|
log.Debug("NE info:", neInfo)
|
||||||
|
|
||||||
|
|||||||
@@ -181,17 +181,17 @@ func InsertDataWithJson(insertData interface{}) (int64, error) {
|
|||||||
|
|
||||||
type NeInfo struct {
|
type NeInfo struct {
|
||||||
Id int `json:"id" xorm:"pk 'id' autoincr"`
|
Id int `json:"id" xorm:"pk 'id' autoincr"`
|
||||||
NeType string `json:"ne_type" xorm:"ne_type"`
|
NeType string `json:"neType" xorm:"ne_type"`
|
||||||
NeId string `json:"ne_id" xorm:"ne_id"` // neUID/rmUID 网元唯一标识
|
NeId string `json:"neId" xorm:"ne_id"` // neUID/rmUID 网元唯一标识
|
||||||
RmUID string `json:"rm_uid" xorm:"rm_uid"` // neUID/rmUID网元UID
|
RmUID string `json:"rmUid" xorm:"rm_uid"` // neUID/rmUID网元UID
|
||||||
NeName string `json:"ne_name" xorm:"ne_name"` // NeName/UserLabel 网元名称/网元设备友好名称
|
NeName string `json:"neName" xorm:"ne_name"` // NeName/UserLabel 网元名称/网元设备友好名称
|
||||||
Ip string `json:"ip" xorm:"ip"`
|
Ip string `json:"ip" xorm:"ip"`
|
||||||
Port string `json:"port" xorm:"port"`
|
Port string `json:"port" xorm:"port"`
|
||||||
PvFlag string `json:"pv_flag" xorm:"pv_flag"` // 网元虚实性标识 VNF/PNF: 虚拟/物理
|
PvFlag string `json:"pvFlag" xorm:"pv_flag"` // 网元虚实性标识 VNF/PNF: 虚拟/物理
|
||||||
NeAddress string `json:"ne_address" xorm:"ne_address"` // 只对PNF
|
NeAddress string `json:"neAddress" xorm:"ne_address"` // 只对PNF
|
||||||
Province string `json:"province" xorm:"province"` // 网元所在省份
|
Province string `json:"province" xorm:"province"` // 网元所在省份
|
||||||
VendorName string `json:"vendor_name" xorm:"vendor_name"` // 厂商名称
|
VendorName string `json:"vendorName" xorm:"vendor_name"` // 厂商名称
|
||||||
Dn string `json:"dn" xorm:"dn"` // 网络标识
|
Dn string `json:"dn" xorm:"dn"` // 网络标识
|
||||||
Status int `json:"status" xorm:"status"`
|
Status int `json:"status" xorm:"status"`
|
||||||
UpdateTime string `json:"-" xorm:"-"`
|
UpdateTime string `json:"-" xorm:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user