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