Documentation ¶
Index ¶
- Variables
- func InitActionLog()
- func InitActionWhiteList()
- func InitBaremetalEvent()
- func InitDB() error
- func IsInActionWhiteList(key string) bool
- type SActionlog
- func (action *SActionlog) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (action *SActionlog) GetI18N(ctx context.Context) *jsonutils.JSONDict
- func (action *SActionlog) GetModelManager() db.IModelManager
- func (self *SActionlog) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- type SActionlogManager
- func (man *SActionlogManager) GetI18N(ctx context.Context, idstr string, resObj jsonutils.JSONObject) *jsonutils.JSONDict
- func (manager *SActionlogManager) GetImmutableInstance(ctx context.Context, userCred mcclient.TokenCredential, ...) db.IModelManager
- func (manager *SActionlogManager) GetMutableInstance(ctx context.Context, userCred mcclient.TokenCredential, ...) db.IModelManager
- func (manager *SActionlogManager) GetPropertyDistinctField(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SActionlogManager) InitializeData() error
- func (manager *SActionlogManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- type SBaremetalEvent
- type SBaremetalEventManager
- func (manager *SBaremetalEventManager) CreateByInsertOrUpdate() bool
- func (manager *SBaremetalEventManager) GetPagingConfig() *db.SPagingConfig
- func (manager *SBaremetalEventManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SBaremetalEventManager) ResourceScope() rbacscope.TRbacScope
Constants ¶
This section is empty.
Variables ¶
View Source
var WhiteListMap = make(map[string]bool)
Functions ¶
func InitActionLog ¶
func InitActionLog()
func InitActionWhiteList ¶
func InitActionWhiteList()
func InitBaremetalEvent ¶
func InitBaremetalEvent()
func IsInActionWhiteList ¶
Types ¶
type SActionlog ¶
type SActionlog struct { db.SOpsLog db.SRecordChecksumResourceBase // 开始时间 StartTime time.Time `nullable:"true" list:"user" create:"optional"` // 结果 Success bool `list:"user" create:"required"` // 服务类别 Service string `width:"32" charset:"utf8" nullable:"true" list:"user" create:"optional"` // 系统账号 IsSystemAccount tristate.TriState `default:"false" list:"user" create:"optional"` // 用户IP Ip string `width:"17" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 风险级别 0 紧急(Emergency) 1 警报(Alert) 2 关键(Critical) 3 错误(Error) 4 警告(Warning) 5 通知(Notice) 6 信息(informational) 7 调试(debug) Severity api.TEventSeverity `width:"32" charset:"ascii" nullable:"false" default:"INFO" list:"user" create:"optional"` // 行为类别,0 一般行为(normal) 1 异常行为(abnormal) 2 违规行为(illegal) Kind api.TEventKind `width:"16" charset:"ascii" nullable:"false" default:"NORMAL" list:"user" create:"optional"` }
func (*SActionlog) CustomizeCreate ¶
func (action *SActionlog) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SActionlog) GetI18N ¶
func (action *SActionlog) GetI18N(ctx context.Context) *jsonutils.JSONDict
func (*SActionlog) GetModelManager ¶
func (action *SActionlog) GetModelManager() db.IModelManager
func (*SActionlog) PostCreate ¶
func (self *SActionlog) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
type SActionlogManager ¶
type SActionlogManager struct { db.SOpsLogManager db.SRecordChecksumResourceBaseManager // contains filtered or unexported fields }
var ActionLog *SActionlogManager
var AdminActionLog *SActionlogManager
func (*SActionlogManager) GetI18N ¶
func (man *SActionlogManager) GetI18N(ctx context.Context, idstr string, resObj jsonutils.JSONObject) *jsonutils.JSONDict
func (*SActionlogManager) GetImmutableInstance ¶
func (manager *SActionlogManager) GetImmutableInstance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) db.IModelManager
func (*SActionlogManager) GetMutableInstance ¶
func (manager *SActionlogManager) GetMutableInstance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) db.IModelManager
func (*SActionlogManager) GetPropertyDistinctField ¶
func (manager *SActionlogManager) GetPropertyDistinctField(ctx context.Context, userCred mcclient.TokenCredential, input apis.DistinctFieldInput) (jsonutils.JSONObject, error)
func (*SActionlogManager) InitializeData ¶
func (manager *SActionlogManager) InitializeData() error
func (*SActionlogManager) ListItemFilter ¶
func (manager *SActionlogManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input api.ActionLogListInput, ) (*sqlchemy.SQuery, error)
操作日志列表
type SBaremetalEvent ¶
type SBaremetalEvent struct { db.SModelBase Id int64 `primary:"true" auto_increment:"true" list:"user" clickhouse_partition_by:"toInt64(id/100000000000)"` HostId string `width:"128" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"` HostName string `width:"64" charset:"utf8" nullable:"false" list:"user" create:"required"` IpmiIp string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional"` Created time.Time `nullable:"false" create:"required" list:"user"` EventId string `width:"32" nullable:"true" create:"optional" list:"user"` Type string `width:"10" nullable:"true" create:"optional" list:"user"` Message string `nullable:"false" create:"required" list:"user"` Severity string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional"` }
func (*SBaremetalEvent) BeforeInsert ¶
func (event *SBaremetalEvent) BeforeInsert()
func (*SBaremetalEvent) GetId ¶
func (event *SBaremetalEvent) GetId() string
func (*SBaremetalEvent) GetModelManager ¶
func (event *SBaremetalEvent) GetModelManager() db.IModelManager
func (*SBaremetalEvent) GetName ¶
func (event *SBaremetalEvent) GetName() string
type SBaremetalEventManager ¶
type SBaremetalEventManager struct {
db.SModelBaseManager
}
var BaremetalEventManager *SBaremetalEventManager
func (*SBaremetalEventManager) CreateByInsertOrUpdate ¶
func (manager *SBaremetalEventManager) CreateByInsertOrUpdate() bool
func (*SBaremetalEventManager) GetPagingConfig ¶
func (manager *SBaremetalEventManager) GetPagingConfig() *db.SPagingConfig
func (*SBaremetalEventManager) ListItemFilter ¶
func (manager *SBaremetalEventManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.BaremetalEventListInput, ) (*sqlchemy.SQuery, error)
物理机日志列表
func (*SBaremetalEventManager) ResourceScope ¶
func (manager *SBaremetalEventManager) ResourceScope() rbacscope.TRbacScope
Click to show internal directories.
Click to hide internal directories.