feat: 许可证和网元开关机
This commit is contained in:
@@ -1630,9 +1630,20 @@ func IsPermissionAllowed(token, method, module, dbname, tbname, pack string) (bo
|
||||
}
|
||||
|
||||
type NeLicense struct {
|
||||
NeType string `json:"neType" xorm:"ne_type"`
|
||||
NeID string `json:"neID" xorm:"ne_id"`
|
||||
Capability int `json:"capability"`
|
||||
NeType string `json:"neType" xorm:"ne_type"`
|
||||
NeID string `json:"neID" xorm:"ne_id"`
|
||||
SerialNo string `json:"serialNo" xorm:"serial_no"`
|
||||
Capcity int `json:"capcity" xorm:"capcity"`
|
||||
Used int `json:"used" xorm:"used"`
|
||||
FeatureEnabled string `json:"featureEnabled" xorm:"feature_enabled"`
|
||||
ExpirationDate string `json:"expirationDate" xorm:"expiration_date"`
|
||||
Status string `json:"status" xorm:"status"`
|
||||
Path string `json:"path" xorm:"path"`
|
||||
FileName string `json:"file_name" xorm:"file_name"`
|
||||
Comment string `json:"comment" xorm:"comment"`
|
||||
CreatedAt string `json:"createdAt" xorm:"-"`
|
||||
UpdatedAt string `json:"updatedAt" xorm:"-"`
|
||||
DeletedAt string `json:"deletedAt" xorm:"-"`
|
||||
}
|
||||
|
||||
func XormAdjustmentNeLicense(neType, neID string, value int) (int64, error) {
|
||||
|
||||
@@ -220,17 +220,11 @@ func init() {
|
||||
Register("PATCH", cm.CustomUriSoftwareNE, cm.RollBackSoftwareToNF, nil)
|
||||
|
||||
// License management
|
||||
Register("GET", cm.LicenseUri, cm.ExportCmFromNF, nil)
|
||||
Register("POST", cm.LicenseUri, cm.ImportCmToNF, nil)
|
||||
Register("DELETE", cm.LicenseUri, cm.ImportCmToNF, nil)
|
||||
Register("POST", cm.UriLicense, cm.UploadLicenseFileData, nil)
|
||||
Register("POST", cm.UriLicenseExt, cm.UploadLicenseFileData, nil)
|
||||
|
||||
Register("POST", cm.NeLicenseUri, cm.ExportCmFromNF, nil)
|
||||
Register("PUT", cm.NeLicenseUri, cm.ImportCmToNF, nil)
|
||||
Register("PATCH", cm.NeLicenseUri, cm.ImportCmToNF, nil)
|
||||
|
||||
Register("POST", cm.CustomNeLicenseUri, cm.ExportCmFromNF, nil)
|
||||
Register("PUT", cm.CustomNeLicenseUri, cm.ImportCmToNF, nil)
|
||||
Register("PATCH", cm.CustomNeLicenseUri, cm.ImportCmToNF, nil)
|
||||
Register("POST", cm.CustomUriLicense, cm.UploadLicenseFileData, nil)
|
||||
Register("POST", cm.CustomUriLicenseExt, cm.UploadLicenseFileData, nil)
|
||||
|
||||
// Trace management
|
||||
Register("POST", trace.UriTraceTask, trace.PostTraceTaskToNF, nil)
|
||||
|
||||
Reference in New Issue
Block a user