Documentation ¶
Index ¶
- type AppResult
- type DataInfo
- type Service
- func (s *Service) AddHost(ctx *rest.Contexts)
- func (s *Service) AddHostFavourite(ctx *rest.Contexts)
- func (s *Service) AddHostFromAgent(ctx *rest.Contexts)deprecated
- func (s *Service) AddHostToResourcePool(ctx *rest.Contexts)
- func (s *Service) AddUserCustomQuery(ctx *rest.Contexts)
- func (s *Service) AssignHostToApp(ctx *rest.Contexts)
- func (s *Service) BKSystemInstall(ctx *rest.Contexts)
- func (s *Service) BatchCreateOrUpdateHostApplyRule(ctx *rest.Contexts)
- func (s *Service) CloneHostProperty(ctx *rest.Contexts)
- func (s *Service) CountTopoNodeHosts(ctx *rest.Contexts)
- func (s *Service) CreateHostApplyRule(ctx *rest.Contexts)
- func (s *Service) CreatePlat(ctx *rest.Contexts)
- func (s *Service) CreatePlatBatch(ctx *rest.Contexts)
- func (s *Service) DeleteHostApplyRule(ctx *rest.Contexts)
- func (s *Service) DeleteHostBatchFromResourcePool(ctx *rest.Contexts)
- func (s *Service) DeleteHostFavouriteByID(ctx *rest.Contexts)
- func (s *Service) DeleteHostFromBusiness(ctx *rest.Contexts)
- func (s *Service) DeletePlat(ctx *rest.Contexts)
- func (s *Service) DeleteUserCustomQuery(ctx *rest.Contexts)
- func (s *Service) FindHostsByServiceTemplates(ctx *rest.Contexts)
- func (s *Service) FindHostsBySetTemplates(ctx *rest.Contexts)
- func (s *Service) FindHostsByTopo(ctx *rest.Contexts)
- func (s *Service) FindManyCloudArea(ctx *rest.Contexts)
- func (s *Service) FindModuleHost(ctx *rest.Contexts)
- func (s *Service) FindModuleHostRelation(ctx *rest.Contexts)
- func (s *Service) FindSystemUserConfigBKSwitch(ctx *rest.Contexts)
- func (s *Service) GenerateApplyPlan(ctx *rest.Contexts)
- func (s *Service) GetAppHostTopoRelation(ctx *rest.Contexts)
- func (s *Service) GetHostApplyRule(ctx *rest.Contexts)
- func (s *Service) GetHostInstanceProperties(ctx *rest.Contexts)
- func (s *Service) GetHostModuleRelation(ctx *rest.Contexts)
- func (s *Service) GetModelDefaultCustom(ctx *rest.Contexts)
- func (s *Service) GetUserCustom(ctx *rest.Contexts)
- func (s *Service) GetUserCustomQuery(ctx *rest.Contexts)
- func (s *Service) GetUserCustomQueryDetail(ctx *rest.Contexts)
- func (s *Service) GetUserCustomQueryResult(ctx *rest.Contexts)
- func (s *Service) Healthz(req *restful.Request, resp *restful.Response)
- func (s *Service) HostSnapInfo(ctx *rest.Contexts)
- func (s *Service) HostSnapInfoBatch(ctx *rest.Contexts)
- func (s *Service) IncrHostFavouritesCount(ctx *rest.Contexts)
- func (s *Service) ListBizHosts(ctx *rest.Contexts)
- func (s *Service) ListBizHostsTopo(ctx *rest.Contexts)
- func (s *Service) ListHostApplyRule(ctx *rest.Contexts)
- func (s *Service) ListHostFavourites(ctx *rest.Contexts)
- func (s *Service) ListHostRelatedApplyRule(ctx *rest.Contexts)
- func (s *Service) ListHostsWithNoBiz(ctx *rest.Contexts)
- func (s *Service) ListResourcePoolHosts(ctx *rest.Contexts)
- func (s *Service) LockHost(ctx *rest.Contexts)
- func (s *Service) MoveHost2FaultModule(ctx *rest.Contexts)
- func (s *Service) MoveHost2IdleModule(ctx *rest.Contexts)
- func (s *Service) MoveHost2RecycleModule(ctx *rest.Contexts)
- func (s *Service) MoveHostToResourcePool(ctx *rest.Contexts)
- func (s *Service) MoveSetHost2IdleModule(ctx *rest.Contexts)
- func (s *Service) NewHostSyncAppTopo(ctx *rest.Contexts)
- func (s *Service) QueryHostLock(ctx *rest.Contexts)
- func (s *Service) RunHostApplyRule(ctx *rest.Contexts)
- func (s *Service) SaveModelDefaultCustom(ctx *rest.Contexts)
- func (s *Service) SaveUserCustom(ctx *rest.Contexts)
- func (s *Service) SearchHost(ctx *rest.Contexts)
- func (s *Service) SearchHostWithAsstDetail(ctx *rest.Contexts)
- func (s *Service) TransferHostAcrossBusiness(ctx *rest.Contexts)
- func (s *Service) TransferHostModule(ctx *rest.Contexts)
- func (s *Service) TransferHostResourceDirectory(ctx *rest.Contexts)
- func (s *Service) TransferHostWithAutoClearServiceInstance(ctx *rest.Contexts)
- func (s *Service) TransferHostWithAutoClearServiceInstancePreview(ctx *rest.Contexts)
- func (s *Service) UnlockHost(ctx *rest.Contexts)
- func (s *Service) UpdateHostApplyRule(ctx *rest.Contexts)
- func (s *Service) UpdateHostBatch(ctx *rest.Contexts)
- func (s *Service) UpdateHostCloudAreaField(ctx *rest.Contexts)
- func (s *Service) UpdateHostFavouriteByID(ctx *rest.Contexts)
- func (s *Service) UpdateHostPropertyBatch(ctx *rest.Contexts)
- func (s *Service) UpdateImportHosts(ctx *rest.Contexts)
- func (s *Service) UpdatePlat(ctx *rest.Contexts)
- func (s *Service) UpdateUserCustomQuery(ctx *rest.Contexts)
- func (s *Service) WebService() *restful.Container
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { *options.Config *backbone.Engine CacheDB *redis.Client AuthManager *extensions.AuthManager EnableTxn bool Logic *logics.Logics // contains filtered or unexported fields }
func (*Service) AddHostFavourite ¶
func (*Service) AddHostFromAgent
deprecated
func (*Service) AddHostToResourcePool ¶
add host to resource pool, returns bk_host_id of the successfully added hosts
func (*Service) AddUserCustomQuery ¶
func (*Service) AssignHostToApp ¶
AssignHostToApp transfer host from resource pool to idle module
func (*Service) BKSystemInstall ¶
BKSystemInstall 蓝鲸组件机器安装agent,主机写入cmdb 描述: 1. 只能操作蓝鲸业务 2. 不能将主机转移到空闲机和故障机等内置模块 3. 不会删除主机已经存在的主机模块, 只会新加主机与模块。 4. 不存在的主机会新加, 规则通过内网IP和 cloud id 判断主机是否存在 4. 进程不存在不报错
func (*Service) BatchCreateOrUpdateHostApplyRule ¶
func (*Service) CloneHostProperty ¶
CloneHostProperty clone host property from src host to dst host
func (*Service) CountTopoNodeHosts ¶
func (*Service) CreateHostApplyRule ¶
func (*Service) CreatePlat ¶
CreatePlat create a plat instance available fields for body are last_time, bk_cloud_name, bk_supplier_account, bk_cloud_id, create_time {"bk_cloud_name": "云区域", "bk_supplier_account": 0}
func (*Service) CreatePlatBatch ¶
CreatePlatBatch create plat instance in batch
func (*Service) DeleteHostApplyRule ¶
func (*Service) DeleteHostBatchFromResourcePool ¶
delete hosts from resource pool
func (*Service) DeleteHostFavouriteByID ¶
func (*Service) DeleteHostFromBusiness ¶
DeleteHostFromBusiness delete host from business dangerous operation
func (*Service) DeletePlat ¶
func (*Service) DeleteUserCustomQuery ¶
func (*Service) FindHostsByServiceTemplates ¶
FindHostsByServiceTemplates find hosts by service templates
func (*Service) FindHostsBySetTemplates ¶
FindHostsBySetTemplates find hosts by set templates
func (*Service) FindHostsByTopo ¶
FindHostsByTopo find hosts by topo node except for biz
func (*Service) FindManyCloudArea ¶
FindManyCloudArea find cloud area list
func (*Service) FindModuleHost ¶
func (*Service) FindModuleHostRelation ¶
FindModuleHostRelation find host with module by module id
func (*Service) FindSystemUserConfigBKSwitch ¶
func (*Service) GenerateApplyPlan ¶
func (*Service) GetAppHostTopoRelation ¶
GetAppHostTopoRelation query host and module relation, hostID can empty
func (*Service) GetHostApplyRule ¶
func (*Service) GetHostInstanceProperties ¶
func (*Service) GetHostModuleRelation ¶
GetHostModuleRelation query host and module relation, hostID can empty
func (*Service) GetModelDefaultCustom ¶
GetModelDefaultCustom 获取模型在列表页面展示字段
func (*Service) GetUserCustom ¶
func (*Service) GetUserCustomQuery ¶
func (*Service) GetUserCustomQueryDetail ¶
func (*Service) GetUserCustomQueryResult ¶
func (*Service) HostSnapInfo ¶
HostSnapInfo return host state
func (*Service) HostSnapInfoBatch ¶
HostSnapInfoBatch get the host snapshot in batch
func (*Service) IncrHostFavouritesCount ¶
func (*Service) ListBizHosts ¶
ListHosts list host under business specified by path parameter
func (*Service) ListBizHostsTopo ¶
ListBizHostsTopo list hosts under business specified by path parameter with their topology information
func (*Service) ListHostApplyRule ¶
func (*Service) ListHostFavourites ¶
func (*Service) ListHostRelatedApplyRule ¶
ListHostRelatedApplyRule 返回主机关联的规则信息(仅返回启用模块的规则)
func (*Service) ListHostsWithNoBiz ¶
ListHostsWithNoBiz list host for no biz case merely
func (*Service) ListResourcePoolHosts ¶
func (*Service) MoveHost2FaultModule ¶
func (*Service) MoveHost2IdleModule ¶
func (*Service) MoveHost2RecycleModule ¶
func (*Service) MoveHostToResourcePool ¶
func (*Service) MoveSetHost2IdleModule ¶
MoveSetHost2IdleModule bk_set_id and bk_module_id cannot be empty at the same time Remove the host from the module or set. The host belongs to the current module or host only, and puts the host into the idle machine of the current service. When the host data is in multiple modules or sets. Disconnect the host from the module or set only TODO: used by v2 version, remove this api when v2 is offline.
func (*Service) NewHostSyncAppTopo ¶
NewHostSyncAppTopo add new hosts to the business synchronize hosts directly to a module in a business if this host does not exist. otherwise, this operation will only change host's attribute. TODO: used by framework.
func (*Service) QueryHostLock ¶
func (*Service) RunHostApplyRule ¶
func (*Service) SaveModelDefaultCustom ¶
SaveModelDefaultCustom 设置模型在列表页面展示字段
func (*Service) SaveUserCustom ¶
func (*Service) SearchHost ¶
func (*Service) SearchHostWithAsstDetail ¶
func (*Service) TransferHostAcrossBusiness ¶
TransferHostAcrossBusiness Transfer host across business, delete old business host and module relation
func (*Service) TransferHostModule ¶
HostModuleRelation transfer host to module specify by bk_module_id (in the same business) move a business host to a module.
func (*Service) TransferHostResourceDirectory ¶
func (*Service) TransferHostWithAutoClearServiceInstance ¶
TransferHostWithAutoClearServiceInstance 主机转移接口(带服务实例自动清除功能) 1. 将主机 bk_host_ids 从 remove_from_node 指定的拓扑节点移除 2. 移入到 add_to_modules 指定的模块中 3. 自动删除主机在移除模块下的服务实例 4. 自动添加主机在新模块上的服务实例 note: - 不允许 remove_from_node 和 add_to_modules 同时为空 - bk_host_ids 不允许为空 - 如果 remove_from_node 指定为业务ID,则接口行为是:覆盖更新 - 如果 remove_from_node 没有指定,仅仅是增量更新,无移除操作 - 如果 add_to_modules 没有指定,主机将仅仅从 remove_from_node 指定的模块中移除 - 如果 add_to_modules 是空先机/故障机/待回收模块中的一个,必须显式指定 remove_from_node(可指定成业务节点), 否则报主机不能属于互斥模块错误 - 如果 add_to_modules 是普通模块,主机当前数据空先机/故障机/待回收模块中的一个,必须显式指定 remove_from_node(可指定成业务节点), 否则报主机不能属于互斥模块错误 - 模块同时出现在 add_to_modules 和 remove_from_node 时,不会导致对应的服务实例被删除然后重新添加
func (*Service) TransferHostWithAutoClearServiceInstancePreview ¶
TransferHostWithAutoClearServiceInstancePreview generate a preview of changes for TransferHostWithAutoClearServiceInstance operation 接口请求参数跟转移是一致的 主机从模块删除时提供了将要删除的服务实例信息 主机添加到新模块时,提供了模块对应的服务模板(如果有)
func (*Service) UnlockHost ¶
func (*Service) UpdateHostApplyRule ¶
func (*Service) UpdateHostBatch ¶
func (*Service) UpdateHostCloudAreaField ¶
func (*Service) UpdateHostFavouriteByID ¶
func (*Service) UpdateHostPropertyBatch ¶
func (*Service) UpdateImportHosts ¶
UpdateImportHosts update excel import hosts
func (*Service) UpdatePlat ¶
func (*Service) UpdateUserCustomQuery ¶
func (*Service) WebService ¶
func (s *Service) WebService() *restful.Container