logclient

package
v2.3.20181123+incompat... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACT_ADDTAG                       = "添加标签"
	ACT_ALLOCATE                     = "分配"
	ACT_BM_CONVERT_HYPER             = "转换为宿主机"
	ACT_BM_MAINTENANCE               = "进入离线状态"
	ACT_BM_UNCONVERT_HYPER           = "转换为受管物理机"
	ACT_BM_UNMAINTENANCE             = "退出离线状态"
	ACT_CANCEL_DELETE                = "恢复"
	ACT_CHANGE_OWNER                 = "更改项目"
	ACT_CLOUD_FULLSYNC               = "全量同步"
	ACT_CLOUD_SYNC                   = "同步"
	ACT_CREATE                       = "创建"
	ACT_DELETE                       = "删除"
	ACT_DISABLE                      = "禁用"
	ACT_ENABLE                       = "启用"
	ACT_GUEST_ATTACH_ISOLATED_DEVICE = "挂载透传设备"
	ACT_GUEST_DETACH_ISOLATED_DEVICE = "卸载透传设备"
	ACT_MERGE                        = "合并"
	ACT_OFFLINE                      = "下线"
	ACT_ONLINE                       = "上线"
	ACT_PRIVATE                      = "设为私有"
	ACT_PUBLIC                       = "设为共享"
	ACT_RELEASE_IP                   = "释放IP"
	ACT_RESERVE_IP                   = "预留IP"
	ACT_RESIZE                       = "扩容"
	ACT_RMTAG                        = "删除标签"
	ACT_SPLIT                        = "分割"
	ACT_UNCACHED_IMAGE               = "清除缓存"
	ACT_UPDATE                       = "更新"
	ACT_VM_ATTACH_DISK               = "挂载磁盘"
	ACT_VM_BIND_KEYPAIR              = "绑定密钥"
	ACT_VM_CHANGE_FLAVOR             = "调整配置"
	ACT_VM_DEPLOY                    = "部署"
	ACT_VM_DETACH_DISK               = "卸载磁盘"
	ACT_VM_PURGE                     = "清除"
	ACT_VM_REBUILD                   = "重装系统"
	ACT_VM_RESET_PSWD                = "重置密码"
	ACT_VM_CHANGE_BANDWIDTH          = "调整带宽"
	ACT_VM_START                     = "开机"
	ACT_VM_STOP                      = "关机"
	ACT_VM_RESTART                   = "重启"
	ACT_VM_SYNC_CONF                 = "同步配置"
	ACT_VM_SYNC_STATUS               = "同步状态"
	ACT_VM_UNBIND_KEYPAIR            = "解绑密钥"
	ACT_VM_ASSIGNSECGROUP            = "关联安全组"
	ACT_RESET_DISK                   = "回滚磁盘"
)

Variables

View Source
var BLACK_LIST_OBJ_TYPE = []string{"parameter"}

golang 不支持 const 的string array, http://t.cn/EzAvbw8

Functions

func AddActionLog

func AddActionLog(model IObject, action string, iNotes interface{}, userCred mcclient.TokenCredential, success bool)

save log to db.

func PostWebsocketNotify

func PostWebsocketNotify(model IObject, action string, iNotes interface{}, userCred mcclient.TokenCredential, success bool)

add websocket log to notify active browser users

Types

type IModule

type IModule interface {
	Create(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
}

type IObject

type IObject interface {
	GetId() string
	GetName() string
	Keyword() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL