Documentation ¶
Index ¶
- func AddHost(req *restful.Request, ownerID string, appID int, ...) (error, []string, []string, []string)
- func EnterIP(req *restful.Request, ownerID string, appID, moduleID int, ...) error
- func GetAppIDByCond(req *restful.Request, objURL string, cond []interface{}) ([]int, error)
- func GetAppInfo(req *restful.Request, fields string, conditon map[string]interface{}, ...) (map[string]interface{}, error)
- func GetAppMapByCond(req *restful.Request, fields string, objURL string, cond interface{}) (map[int]interface{}, error)
- func GetConfigByCond(req *restful.Request, hostURL string, cond map[string]interface{}) ([]map[string]int, error)
- func GetDefaultAppID(req *restful.Request, ownerID, fields, hostAddr string) (int, error)
- func GetDefaultAppIDBySupplierID(req *restful.Request, supplierID int, fields, hostAddr string) (int, error)
- func GetHostIDByCond(req *restful.Request, hostURL string, cond interface{}) ([]int, error)
- func GetHostLogFields(req *restful.Request, ownerID, objCtrl string) ([]metadata.Header, int)
- func GetHttpResult(req *restful.Request, url, method string, params interface{}) (bool, string, interface{})
- func GetModuleByModuleID(req *restful.Request, appID int, moduleID int, hostAddr string) ([]interface{}, error)
- func GetModuleIDByCond(req *restful.Request, objURL string, cond []interface{}) ([]int, error)
- func GetModuleMapByCond(req *restful.Request, fields string, objURL string, cond interface{}) (map[int]interface{}, error)
- func GetObjectFields(ownerID, objID, ObjAddr string) map[string]map[string]interface{}
- func GetSetIDByCond(req *restful.Request, objURL string, cond []interface{}) ([]int, error)
- func GetSetIDByObjectCond(req *restful.Request, objURL string, objectCond []interface{}) []int
- func GetSetMapByCond(req *restful.Request, fields string, objURL string, cond interface{}) (map[int]interface{}, error)
- func GetSingleApp(req *restful.Request, objURL string, cond interface{}) (map[string]interface{}, error)
- func GetSingleModuleID(req *restful.Request, conds interface{}, hostAddr string) (int, error)
- func GetTopoIDByName(req *restful.Request, ownerID, appName, setName, moduleName, objURL string, ...) (int, int, int, error)
- func HostSearch(req *restful.Request, data hostParse.HostCommonSearch, ...) (interface{}, error)
- func IsExistHostIDInApp(CC *api.APIResource, req *restful.Request, appID int, hostID int) (bool, error)
- func MoveHost2ResourcePool(CC *api.APIResource, req *restful.Request, appID int, hostID []int) (interface{}, error)
- func ParseHostSnap(data string) (common.KvMap, error)
- type HostLog
- type HostModuleConfigLog
- type ObjectData
- type ObjectSResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHost ¶
func AddHost(req *restful.Request, ownerID string, appID int, hostInfos map[int]map[string]interface{}, moduleID int, hostAddr, ObjAddr, auditAddr string, errHandle errorHandle.DefaultCCErrorIf) (error, []string, []string, []string)
AddHost, return error info
func EnterIP ¶
func EnterIP(req *restful.Request, ownerID string, appID, moduleID int, IP, osType, hostname, appName, setName, moduleName, hostAddr, ObjAddr, auditAddr string, errHandle errorHandle.DefaultCCErrorIf) error
EnterIP 将机器导入到制定模块或者空闲机器, 已经存在机器,不操作
func GetAppIDByCond ¶
GetAppIDByCond get appid by cond
func GetAppInfo ¶
func GetAppInfo(req *restful.Request, fields string, conditon map[string]interface{}, hostAddr string) (map[string]interface{}, error)
GetAppInfo get app info
func GetAppMapByCond ¶
func GetAppMapByCond(req *restful.Request, fields string, objURL string, cond interface{}) (map[int]interface{}, error)
GetAppMapByCond get appmap by cond
func GetConfigByCond ¶
func GetConfigByCond(req *restful.Request, hostURL string, cond map[string]interface{}) ([]map[string]int, error)
GetConfigByCond get config by condition
func GetDefaultAppID ¶
GetDefaultAppID get default biz id
func GetDefaultAppIDBySupplierID ¶
func GetDefaultAppIDBySupplierID(req *restful.Request, supplierID int, fields, hostAddr string) (int, error)
GetDefaultAppID get supplier ID
func GetHostIDByCond ¶
GetHostIDByCond get module host config
func GetHostLogFields ¶
GetHostLogFields get host fields
func GetHttpResult ¶
func GetHttpResult(req *restful.Request, url, method string, params interface{}) (bool, string, interface{})
GetHttpResult get http result
func GetModuleByModuleID ¶
func GetModuleByModuleID(req *restful.Request, appID int, moduleID int, hostAddr string) ([]interface{}, error)
GetModuleByModuleID get module by module id
func GetModuleIDByCond ¶
get moduleid by cond
func GetModuleMapByCond ¶
func GetModuleMapByCond(req *restful.Request, fields string, objURL string, cond interface{}) (map[int]interface{}, error)
get modulemap by cond
func GetObjectFields ¶
GetObjectFields get object fields
func GetSetIDByCond ¶
GetSetIDByCond get setid by cond
func GetSetIDByObjectCond ¶
GetSetIDByObjectCond get set id by object condition
func GetSetMapByCond ¶
func GetSetMapByCond(req *restful.Request, fields string, objURL string, cond interface{}) (map[int]interface{}, error)
GetSetMapByCond get setmap by cond
func GetSingleApp ¶
func GetSingleApp(req *restful.Request, objURL string, cond interface{}) (map[string]interface{}, error)
GetSingleApp get single app
func GetSingleModuleID ¶
GetSingleModuleID get single module id
func GetTopoIDByName ¶
func GetTopoIDByName(req *restful.Request, ownerID, appName, setName, moduleName, objURL string, defErr errors.DefaultCCErrorIf) (int, int, int, error)
GetTopoIDByName get topo id by name
func HostSearch ¶
func IsExistHostIDInApp ¶
func IsExistHostIDInApp(CC *api.APIResource, req *restful.Request, appID int, hostID int) (bool, error)
IsExistHostIDInApp is host exsit in app
func MoveHost2ResourcePool ¶
func MoveHost2ResourcePool(CC *api.APIResource, req *restful.Request, appID int, hostID []int) (interface{}, error)
MoveHostToResourcePool move host to resource pool
Types ¶
type HostLog ¶
type HostLog struct {
// contains filtered or unexported fields
}
func NewHostLog ¶
func (*HostLog) GetHostLog ¶
func (*HostLog) GetInnerIP ¶
GetInnerIP return innerip for host detail
func (*HostLog) GetPreHostData ¶
type HostModuleConfigLog ¶
type HostModuleConfigLog struct {
// contains filtered or unexported fields
}
func NewHostModuleConfigLog ¶
func (*HostModuleConfigLog) SaveLog ¶
func (h *HostModuleConfigLog) SaveLog(appID, user string) error
func (*HostModuleConfigLog) SetDesc ¶
func (h *HostModuleConfigLog) SetDesc(desc string)
func (*HostModuleConfigLog) SetDescPrefix ¶
func (h *HostModuleConfigLog) SetDescPrefix(prefix string)
func (*HostModuleConfigLog) SetDescSuffix ¶
func (h *HostModuleConfigLog) SetDescSuffix(suffix string)
func (*HostModuleConfigLog) SetHostID ¶
func (h *HostModuleConfigLog) SetHostID(hostID []int) error
set host id, host id must be nil
type ObjectData ¶
type ObjectSResult ¶
type ObjectSResult struct { Result bool `json:"result"` Code int `json:"code"` Message interface{} `json:"message"` Data ObjectData `json:"data"` }