Documentation ¶
Index ¶
- Constants
- func AddHost(req *restful.Request, ownerID string, appID int, ...) (error, []string, []string, []string)
- func EnterIP(req *restful.Request, ownerID string, appID, moduleID int, ip string, ...) 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, objAddr string, ...) (int, error)
- func GetDefaultAppIDBySupplierID(req *restful.Request, supplierID int, fields, objAddr string, ...) (int, error)
- func GetHostIDByCond(req *restful.Request, hostURL string, cond interface{}) ([]int, error)
- func GetHostIDByInstID(req *restful.Request, asstObjId string, objURL string, instIDArr []int) []int
- func GetHostInfoByConds(req *restful.Request, hostURL string, conds map[string]interface{}, ...) ([]interface{}, 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(forward *sourceAPI.ForwardParam, ownerID, objID, ObjAddr, sort string) ([]sourceAPI.ObjAttDes, error)
- func GetObjectInstByCond(req *restful.Request, objID string, objURL string, cond []interface{}) []int
- func GetSetIDByCond(req *restful.Request, objURL string, cond []interface{}) ([]int, error)
- func GetSetIDByObjectCond(req *restful.Request, objURL string, appID int, 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 GetSystemConfig(req *restful.Request, objURL string) bool
- func GetTopoIDByName(req *restful.Request, ownerID, appName, setName, moduleName, objURL string, ...) (int, int, int, error)
- func HostSearch(req *restful.Request, data hostParse.HostCommonSearch, isDetail bool, ...) (interface{}, error)
- func IsExistHostIDInApp(CC *api.APIResource, req *restful.Request, appID int, hostID int, ...) (bool, error)
- func IsExistPlat(req *restful.Request, objURL string, cond interface{}) (bool, error)
- func MoveHost2ResourcePool(CC *api.APIResource, req *restful.Request, appID int, hostID []int) (interface{}, error)
- func NewHostSyncValidModule(req *restful.Request, appID int, moduleID []int, objAddr string) ([]int, error)
- func NewHostsInstance(req *restful.Request, ownerID, inputType string, cloudID int, ...) (*hostsInstance, error)
- func ParseHostSnap(data string) (common.KvMap, error)
- type HostLog
- type HostModuleConfigLog
- type ObjectData
- type ObjectSResult
Constants ¶
const SplitFlag = "##"
const TopoModuleName = "TopModuleName"
const TopoSetName = "TopSetName"
Variables ¶
This section is empty.
Functions ¶
func AddHost ¶
func AddHost(req *restful.Request, ownerID string, appID int, hostInfos map[int]map[string]interface{}, inputType string, moduleID []int, cc *api.APIResource) (error, []string, []string, []string)
AddHost, return error info
func EnterIP ¶
func EnterIP(req *restful.Request, ownerID string, appID, moduleID int, ip string, cloudID int64, host map[string]interface{}, isIncrement bool, cc *api.APIResource) error
EnterIP 将机器导入到制定模块或者空闲机器, 已经存在机器,不操作
func GetAppIDByCond ¶
GetAppIDByCond get appid by cond
func GetAppInfo ¶
func GetAppInfo(req *restful.Request, fields string, conditon map[string]interface{}, objAddr string, defLang language.DefaultCCLanguageIf) (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 ¶
func GetDefaultAppID(req *restful.Request, ownerID, fields, objAddr string, defLang language.DefaultCCLanguageIf) (int, error)
GetDefaultAppID get default biz id
func GetDefaultAppIDBySupplierID ¶
func GetDefaultAppIDBySupplierID(req *restful.Request, supplierID int, fields, objAddr string, defLang language.DefaultCCLanguageIf) (int, error)
GetDefaultAppID get supplier ID
func GetHostIDByCond ¶
GetHostIDByCond get module host config
func GetHostIDByInstID ¶
func GetHostIDByInstID(req *restful.Request, asstObjId string, objURL string, instIDArr []int) []int
getHostIDByInstID get host Id by inst Id
func GetHostInfoByConds ¶
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 ¶
func GetObjectFields(forward *sourceAPI.ForwardParam, ownerID, objID, ObjAddr, sort string) ([]sourceAPI.ObjAttDes, error)
GetObjectFields get object fields
func GetObjectInstByCond ¶
func GetObjectInstByCond(req *restful.Request, objID string, objURL string, cond []interface{}) []int
getObjectInstByCond get object inst id by condtion
func GetSetIDByCond ¶
GetSetIDByCond get setid by cond
func GetSetIDByObjectCond ¶
func GetSetIDByObjectCond(req *restful.Request, objURL string, appID int, objectCond []interface{}) []int
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 GetSystemConfig ¶
GetSystemConfig get system config by condition
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 HostSearch(req *restful.Request, data hostParse.HostCommonSearch, isDetail bool, hostCtrl, objCtrl string) (interface{}, error)
HostSearch search host by mutiple condition
func IsExistHostIDInApp ¶
func IsExistHostIDInApp(CC *api.APIResource, req *restful.Request, appID int, hostID int, defLang language.DefaultCCLanguageIf) (bool, error)
IsExistHostIDInApp is host exsit in app
func IsExistPlat ¶
IsExistPlat plat is exist
func MoveHost2ResourcePool ¶
func MoveHost2ResourcePool(CC *api.APIResource, req *restful.Request, appID int, hostID []int) (interface{}, error)
MoveHostToResourcePool move host to resource pool
func NewHostSyncValidModule ¶
func NewHostSyncValidModule(req *restful.Request, appID int, moduleID []int, objAddr string) ([]int, error)
NewHostSyncValidModule 1. check module is exist, 2. multiple moduleID Check whether all the module default 0
func NewHostsInstance ¶
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) 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"` }