Documentation ¶
Index ¶
- Constants
- func Actions() []httpserver.Action
- func BaseInstOperation() inst.OperationInterface
- func CreateClassification(name string) model.Classification
- func CreateCommonInst(target model.Model) (inst.CommonInstInterface, error)
- func CreateCondition() common.Condition
- func FindClassificationsByCondition(cond common.Condition) (model.ClassificationIterator, error)
- func FindClassificationsByConditionWithOwner(supplierAccount string, cond common.Condition) (model.ClassificationIterator, error)
- func FindClassificationsLikeName(name string) (model.ClassificationIterator, error)
- func FindClassificationsLikeNameWithOwner(supplierAccount, name string) (model.ClassificationIterator, error)
- func FindInstsByCondition(target model.Model, cond common.Condition) (inst.Iterator, error)
- func FindInstsLikeName(target model.Model, instName string) (inst.Iterator, error)
- func GetBusinessModel(supplierAccount string) (model.Model, error)
- func GetHostModel(supplierAccount string) (model.Model, error)
- func GetModel(supplierAccount, classificationID, objID string) (model.Model, error)
- func GetModuleModel(supplierAccount string) (model.Model, error)
- func GetPlatID(supplierAccount, platName string) (int64, error)
- func GetPlatModel(supplierAccount string) (model.Model, error)
- func GetSetModel(supplierAccount string) (model.Model, error)
- func Init()
- func RegisterEventBusiness(eventFunc types.EventCallbackFunc) types.EventKey
- func RegisterEventHost(eventFunc types.EventCallbackFunc) types.EventKey
- func RegisterEventHostIdentifier(eventFunc types.EventCallbackFunc) types.EventKey
- func RegisterEventInst(eventFunc types.EventCallbackFunc) types.EventKey
- func RegisterEventModule(eventFunc types.EventCallbackFunc) types.EventKey
- func RegisterEventModuleTransfer(eventFunc types.EventCallbackFunc) types.EventKey
- func RegisterEventSet(eventFunc types.EventCallbackFunc) types.EventKey
- func RegisterFrequencyInputer(inputer input.Inputer, frequency time.Duration)
- func RegisterInputer(inputer input.Inputer)
- func UnInit() error
- func UnRegisterEvent(eventKey types.EventKey)
- type BusinessIteratorWrapper
- type BusinessWrapper
- func (cli *BusinessWrapper) Create() error
- func (cli *BusinessWrapper) GetBusinessID() (int64, error)
- func (cli *BusinessWrapper) GetDeveloper() (string, error)
- func (cli *BusinessWrapper) GetLifeCycle() (string, error)
- func (cli *BusinessWrapper) GetMaintainer() (string, error)
- func (cli *BusinessWrapper) GetModel() model.Model
- func (cli *BusinessWrapper) GetName() (string, error)
- func (cli *BusinessWrapper) GetOperator() (string, error)
- func (cli *BusinessWrapper) GetProductor() (string, error)
- func (cli *BusinessWrapper) GetTester() (string, error)
- func (cli *BusinessWrapper) GetValues() (types.MapStr, error)
- func (cli *BusinessWrapper) IsExists() (bool, error)
- func (cli *BusinessWrapper) Save() error
- func (cli *BusinessWrapper) SetDeveloper(developer string) error
- func (cli *BusinessWrapper) SetLifeCycle(lifeCycle string) error
- func (cli *BusinessWrapper) SetMaintainer(maintainer string) error
- func (cli *BusinessWrapper) SetName(name string) error
- func (cli *BusinessWrapper) SetOperator(operator string) error
- func (cli *BusinessWrapper) SetProductor(productor string) error
- func (cli *BusinessWrapper) SetTester(tester string) error
- func (cli *BusinessWrapper) SetValue(key string, val interface{}) error
- func (cli *BusinessWrapper) Update() error
- type FinderHostWrapper
- type HostIteratorWrapper
- type HostModuleActionType
- type HostWrapper
- func (cli *HostWrapper) Create() error
- func (cli *HostWrapper) GetAssetID() (string, error)
- func (cli *HostWrapper) GetBakOperator() (string, error)
- func (cli *HostWrapper) GetCPU() (int, error)
- func (cli *HostWrapper) GetCPUMhz() (int, error)
- func (cli *HostWrapper) GetCPUModule() (string, error)
- func (cli *HostWrapper) GetCloudID() (int, error)
- func (cli *HostWrapper) GetComment() (string, error)
- func (cli *HostWrapper) GetDisk() (int, error)
- func (cli *HostWrapper) GetInnerIP() (string, error)
- func (cli *HostWrapper) GetInnerMac() (string, error)
- func (cli *HostWrapper) GetMem() (int, error)
- func (cli *HostWrapper) GetModel() model.Model
- func (cli *HostWrapper) GetName() (string, error)
- func (cli *HostWrapper) GetOperator() (string, error)
- func (cli *HostWrapper) GetOsBit() (string, error)
- func (cli *HostWrapper) GetOsName() (string, error)
- func (cli *HostWrapper) GetOsType() (string, error)
- func (cli *HostWrapper) GetOsVersion() (string, error)
- func (cli *HostWrapper) GetOuterIP() (string, error)
- func (cli *HostWrapper) GetOuterMac() (string, error)
- func (cli *HostWrapper) GetSLA() (string, error)
- func (cli *HostWrapper) GetSN() (string, error)
- func (cli *HostWrapper) GetServiceTerm() (int, error)
- func (cli *HostWrapper) GetValues() (types.MapStr, error)
- func (cli *HostWrapper) IsExists() (bool, error)
- func (cli *HostWrapper) Save() error
- func (cli *HostWrapper) SetAssetID(assetID string) error
- func (cli *HostWrapper) SetBakOperator(bakOperator string) error
- func (cli *HostWrapper) SetBusiness(bizID int64)
- func (cli *HostWrapper) SetCPU(cpu int64) error
- func (cli *HostWrapper) SetCPUMhz(cpuMhz int64) error
- func (cli *HostWrapper) SetCPUModule(cpuModule string) error
- func (cli *HostWrapper) SetCloudID(cloudID int64) error
- func (cli *HostWrapper) SetComment(comment string) error
- func (cli *HostWrapper) SetDisk(disk int64) error
- func (cli *HostWrapper) SetInnerIP(innerIP string) error
- func (cli *HostWrapper) SetInnerMac(mac string) error
- func (cli *HostWrapper) SetMem(mem int64) error
- func (cli *HostWrapper) SetModuleIDS(moduleIDS []int64, act HostModuleActionType) error
- func (cli *HostWrapper) SetName(hostName string) error
- func (cli *HostWrapper) SetOperator(operator string) error
- func (cli *HostWrapper) SetOsBit(osbit string) error
- func (cli *HostWrapper) SetOsName(osName string) error
- func (cli *HostWrapper) SetOsType(osType string) error
- func (cli *HostWrapper) SetOsVersion(osVersion string) error
- func (cli *HostWrapper) SetOuterIP(outerIP string) error
- func (cli *HostWrapper) SetOuterMac(mac string) error
- func (cli *HostWrapper) SetSLA(sla string) error
- func (cli *HostWrapper) SetSN(sn string) error
- func (cli *HostWrapper) SetServiceTerm(serviceTerm int64) error
- func (cli *HostWrapper) SetTopo(bizID int64, setName, moduleName string, act HostModuleActionType) error
- func (cli *HostWrapper) SetValue(key string, val interface{}) error
- func (cli *HostWrapper) Transfer() inst.TransferInterface
- func (cli *HostWrapper) Update() error
- type ModuleIteratorWrapper
- type ModuleWrapper
- func (cli *ModuleWrapper) Create() error
- func (cli *ModuleWrapper) GetBakOperator() (string, error)
- func (cli *ModuleWrapper) GetBusinessID() (int, error)
- func (cli *ModuleWrapper) GetID() (int64, error)
- func (cli *ModuleWrapper) GetModel() model.Model
- func (cli *ModuleWrapper) GetModuleID() (int64, error)
- func (cli *ModuleWrapper) GetName() (string, error)
- func (cli *ModuleWrapper) GetOperator() (string, error)
- func (cli *ModuleWrapper) GetSupplierAccount() (string, error)
- func (cli *ModuleWrapper) GetValues() (types.MapStr, error)
- func (cli *ModuleWrapper) IsExists() (bool, error)
- func (cli *ModuleWrapper) Save() error
- func (cli *ModuleWrapper) SetBakOperator(bakOperator string) error
- func (cli *ModuleWrapper) SetName(name string) error
- func (cli *ModuleWrapper) SetOperator(operator string) error
- func (cli *ModuleWrapper) SetSupplierAccount(supplierAccount string) error
- func (cli *ModuleWrapper) SetTopo(bizID, setID int64) error
- func (cli *ModuleWrapper) SetValue(key string, val interface{}) error
- func (cli *ModuleWrapper) Update() error
- type PlatIteratorWrapper
- type PlatWrapper
- func (cli *PlatWrapper) Create() error
- func (cli *PlatWrapper) GetID() (int, error)
- func (cli *PlatWrapper) GetModel() model.Model
- func (cli *PlatWrapper) GetName() (string, error)
- func (cli *PlatWrapper) GetSupplierAccount() (string, error)
- func (cli *PlatWrapper) GetValues() (types.MapStr, error)
- func (cli *PlatWrapper) IsExists() (bool, error)
- func (cli *PlatWrapper) Save() error
- func (cli *PlatWrapper) SetName(name string) error
- func (cli *PlatWrapper) SetSupplierAccount(supplierAccount string) error
- func (cli *PlatWrapper) SetValue(key string, val interface{}) error
- func (cli *PlatWrapper) Update() error
- type SetIteratorWrapper
- type SetWrapper
- func (cli *SetWrapper) Create() error
- func (cli *SetWrapper) GetBusinessID() (int64, error)
- func (cli *SetWrapper) GetCapacity() (int, error)
- func (cli *SetWrapper) GetEnv() (string, error)
- func (cli *SetWrapper) GetID() (int64, error)
- func (cli *SetWrapper) GetModel() model.Model
- func (cli *SetWrapper) GetName() (string, error)
- func (cli *SetWrapper) GetServiceStatus() (string, error)
- func (cli *SetWrapper) GetSetID() (int64, error)
- func (cli *SetWrapper) GetSupplierAccount() (string, error)
- func (cli *SetWrapper) GetValues() (types.MapStr, error)
- func (cli *SetWrapper) IsExists() (bool, error)
- func (cli *SetWrapper) Save() error
- func (cli *SetWrapper) SetBusinessID(businessID int64) error
- func (cli *SetWrapper) SetCapacity(capacity int64) error
- func (cli *SetWrapper) SetDescription(intro string) error
- func (cli *SetWrapper) SetEnv(env string) error
- func (cli *SetWrapper) SetMark(desc string) error
- func (cli *SetWrapper) SetName(name string) error
- func (cli *SetWrapper) SetParent(parentInstID int64) error
- func (cli *SetWrapper) SetServiceStatus(status string) error
- func (cli *SetWrapper) SetSupplierAccount(supplierAccount string) error
- func (cli *SetWrapper) SetValue(key string, val interface{}) error
- func (cli *SetWrapper) Update() error
Constants ¶
const ( HostSLALevel1 = "1" HostSLALevel2 = "2" HostSLALevel3 = "3" HostOSTypeLinux = "1" HostOSTypeWindows = "2" HostImportFromExcel = "1" HostImportFromAgent = "2" HostImportFromAPI = "3" BusinessLifeCycleTesting = "1" BusinessLifeCycleOnLine = "2" BusinessLifeCycleStopped = "3" SetEnvTesting = "1" SetEnvGuest = "2" SetEnvNormal = "3" SetServiceOpen = "1" SetServiceClose = "2" )
Enum definition
Variables ¶
This section is empty.
Functions ¶
func BaseInstOperation ¶
func BaseInstOperation() inst.OperationInterface
BaseInstOperation return the base inst operation interface
func CreateClassification ¶
func CreateClassification(name string) model.Classification
CreateClassification create a new classification
func CreateCommonInst ¶
func CreateCommonInst(target model.Model) (inst.CommonInstInterface, error)
CreateCommonInst create a common inst object
func CreateCondition ¶
CreateCondition create a condition object
func FindClassificationsByCondition ¶
func FindClassificationsByCondition(cond common.Condition) (model.ClassificationIterator, error)
FindClassificationsByCondition find a array of the classification by the condition
func FindClassificationsByConditionWithOwner ¶
func FindClassificationsByConditionWithOwner(supplierAccount string, cond common.Condition) (model.ClassificationIterator, error)
FindClassificationsByConditionWithOwner find a array of the classification by the condition
func FindClassificationsLikeName ¶
func FindClassificationsLikeName(name string) (model.ClassificationIterator, error)
FindClassificationsLikeName find a array of the classification by the name
func FindClassificationsLikeNameWithOwner ¶
func FindClassificationsLikeNameWithOwner(supplierAccount, name string) (model.ClassificationIterator, error)
FindClassificationsLikeNameWithOwner find a array of the classification by the name
func FindInstsByCondition ¶
FindInstsByCondition find all insts by the condition
func FindInstsLikeName ¶
FindInstsLikeName find all insts by the name
func GetBusinessModel ¶
GetBusinessModel return a Business object
func GetHostModel ¶
GetHostModel get a host object
func GetModuleModel ¶
GetModuleModel get a module object
func GetPlatModel ¶
GetPlatModel return a plat object
func GetSetModel ¶
GetSetModel get a set object
func RegisterEventBusiness ¶
func RegisterEventBusiness(eventFunc types.EventCallbackFunc) types.EventKey
RegisterEventBusiness register business event
func RegisterEventHost ¶
func RegisterEventHost(eventFunc types.EventCallbackFunc) types.EventKey
RegisterEventHost register host event
func RegisterEventHostIdentifier ¶
func RegisterEventHostIdentifier(eventFunc types.EventCallbackFunc) types.EventKey
RegisterEventHostIdentifier register host identifier event
func RegisterEventInst ¶
func RegisterEventInst(eventFunc types.EventCallbackFunc) types.EventKey
RegisterEventInst register host inst event
func RegisterEventModule ¶
func RegisterEventModule(eventFunc types.EventCallbackFunc) types.EventKey
RegisterEventModule register business event
func RegisterEventModuleTransfer ¶
func RegisterEventModuleTransfer(eventFunc types.EventCallbackFunc) types.EventKey
RegisterEventModuleTransfer register module transfer event
func RegisterEventSet ¶
func RegisterEventSet(eventFunc types.EventCallbackFunc) types.EventKey
RegisterEventSet register host set event
func RegisterFrequencyInputer ¶
RegisterFrequencyInputer execute a non-blocking timing inputer, only execute once
func RegisterInputer ¶
RegisterInputer register a inputer, only execute once
func UnRegisterEvent ¶
UnRegisterEvent unregister event
Types ¶
type BusinessIteratorWrapper ¶
type BusinessIteratorWrapper struct {
// contains filtered or unexported fields
}
BusinessIteratorWrapper the business iterator wrapper
func FindBusinessByCondition ¶
func FindBusinessByCondition(supplierAccount string, cond common.Condition) (*BusinessIteratorWrapper, error)
FindBusinessByCondition find all insts by the condition
func FindBusinessLikeName ¶
func FindBusinessLikeName(supplierAccount, businessName string) (*BusinessIteratorWrapper, error)
FindBusinessLikeName find all insts by the name
func (*BusinessIteratorWrapper) ForEach ¶
func (cli *BusinessIteratorWrapper) ForEach(callback func(business *BusinessWrapper) error) error
ForEach the foreach function
func (*BusinessIteratorWrapper) Next ¶
func (cli *BusinessIteratorWrapper) Next() (*BusinessWrapper, error)
Next next the business
type BusinessWrapper ¶
type BusinessWrapper struct {
// contains filtered or unexported fields
}
BusinessWrapper the business wrapper
func CreateBusiness ¶
func CreateBusiness(supplierAccount string) (*BusinessWrapper, error)
CreateBusiness create a new Business object
func (*BusinessWrapper) GetBusinessID ¶
func (cli *BusinessWrapper) GetBusinessID() (int64, error)
GetBusinessID get the id for the business
func (*BusinessWrapper) GetDeveloper ¶
func (cli *BusinessWrapper) GetDeveloper() (string, error)
GetDeveloper get the developer name
func (*BusinessWrapper) GetLifeCycle ¶
func (cli *BusinessWrapper) GetLifeCycle() (string, error)
GetLifeCycle get the life cycle
func (*BusinessWrapper) GetMaintainer ¶
func (cli *BusinessWrapper) GetMaintainer() (string, error)
GetMaintainer get the maintaner name
func (*BusinessWrapper) GetModel ¶
func (cli *BusinessWrapper) GetModel() model.Model
GetModel get the model for the business
func (*BusinessWrapper) GetName ¶
func (cli *BusinessWrapper) GetName() (string, error)
GetName get the business name
func (*BusinessWrapper) GetOperator ¶
func (cli *BusinessWrapper) GetOperator() (string, error)
GetOperator get the operator
func (*BusinessWrapper) GetProductor ¶
func (cli *BusinessWrapper) GetProductor() (string, error)
GetProductor get the productor for the business
func (*BusinessWrapper) GetTester ¶
func (cli *BusinessWrapper) GetTester() (string, error)
GetTester get the tester name
func (*BusinessWrapper) GetValues ¶
func (cli *BusinessWrapper) GetValues() (types.MapStr, error)
GetValues return the values
func (*BusinessWrapper) IsExists ¶
func (cli *BusinessWrapper) IsExists() (bool, error)
IsExists check the set
func (*BusinessWrapper) SetDeveloper ¶
func (cli *BusinessWrapper) SetDeveloper(developer string) error
SetDeveloper set the biz developer
func (*BusinessWrapper) SetLifeCycle ¶
func (cli *BusinessWrapper) SetLifeCycle(lifeCycle string) error
SetLifeCycle set the life cycle
func (*BusinessWrapper) SetMaintainer ¶
func (cli *BusinessWrapper) SetMaintainer(maintainer string) error
SetMaintainer set the maintainer for the biz
func (*BusinessWrapper) SetName ¶
func (cli *BusinessWrapper) SetName(name string) error
SetName set the business name
func (*BusinessWrapper) SetOperator ¶
func (cli *BusinessWrapper) SetOperator(operator string) error
SetOperator set the operator
func (*BusinessWrapper) SetProductor ¶
func (cli *BusinessWrapper) SetProductor(productor string) error
SetProductor set the productor name
func (*BusinessWrapper) SetTester ¶
func (cli *BusinessWrapper) SetTester(tester string) error
SetTester set the tester name
func (*BusinessWrapper) SetValue ¶
func (cli *BusinessWrapper) SetValue(key string, val interface{}) error
SetValue set the key value
type FinderHostWrapper ¶
type FinderHostWrapper struct { *HostWrapper // contains filtered or unexported fields }
FinderHostWrapper find the host wrapper
func (*FinderHostWrapper) GetBizs ¶
func (cli *FinderHostWrapper) GetBizs() ([]*BusinessWrapper, error)
GetBizs return all business for the host
func (*FinderHostWrapper) GetModules ¶
func (cli *FinderHostWrapper) GetModules() ([]*ModuleWrapper, error)
GetModules return all modules for the module
func (*FinderHostWrapper) GetSets ¶
func (cli *FinderHostWrapper) GetSets() ([]*SetWrapper, error)
GetSets return all sets for the host
type HostIteratorWrapper ¶
type HostIteratorWrapper struct {
// contains filtered or unexported fields
}
HostIteratorWrapper the host iterator wrapper
func FindHostByCondition ¶
func FindHostByCondition(supplierAccount string, cond common.Condition) (*HostIteratorWrapper, error)
FindHostByCondition find all insts by the condition
func FindHostLikeName ¶
func FindHostLikeName(supplierAccount, hostName string) (*HostIteratorWrapper, error)
FindHostLikeName find all insts by the name
func (*HostIteratorWrapper) ForEach ¶
func (cli *HostIteratorWrapper) ForEach(callback func(host *FinderHostWrapper) error) error
ForEach the foreach function
func (*HostIteratorWrapper) Next ¶
func (cli *HostIteratorWrapper) Next() (*HostWrapper, error)
Next next the business
type HostModuleActionType ¶
type HostModuleActionType string
const ( HostAppendModule HostModuleActionType = "append" HostReplaceModule HostModuleActionType = "replace" )
type HostWrapper ¶
type HostWrapper struct {
// contains filtered or unexported fields
}
HostWrapper the host wrapper
func CreateHost ¶
func CreateHost(supplierAccount string) (*HostWrapper, error)
CreateHost create a new host object
func (*HostWrapper) GetAssetID ¶
func (cli *HostWrapper) GetAssetID() (string, error)
GetAssetID get the asset id for the host
func (*HostWrapper) GetBakOperator ¶
func (cli *HostWrapper) GetBakOperator() (string, error)
GetBakOperator get the bak operator
func (*HostWrapper) GetCPU ¶
func (cli *HostWrapper) GetCPU() (int, error)
GetCPU get the cpu core num
func (*HostWrapper) GetCPUMhz ¶
func (cli *HostWrapper) GetCPUMhz() (int, error)
GetCPUMhz get the cpu mhz
func (*HostWrapper) GetCPUModule ¶
func (cli *HostWrapper) GetCPUModule() (string, error)
GetCPUModule get the cpu module
func (*HostWrapper) GetCloudID ¶
func (cli *HostWrapper) GetCloudID() (int, error)
GetCloudID get the cloudid
func (*HostWrapper) GetComment ¶
func (cli *HostWrapper) GetComment() (string, error)
GetComment get the comment for the host
func (*HostWrapper) GetInnerIP ¶
func (cli *HostWrapper) GetInnerIP() (string, error)
GetInnerIP get the inner ip
func (*HostWrapper) GetInnerMac ¶
func (cli *HostWrapper) GetInnerMac() (string, error)
GetInnerMac get the mac for the host
func (*HostWrapper) GetMem ¶
func (cli *HostWrapper) GetMem() (int, error)
GetMem get the mem for the host
func (*HostWrapper) GetModel ¶
func (cli *HostWrapper) GetModel() model.Model
GetModel get the model for the host
func (*HostWrapper) GetName ¶
func (cli *HostWrapper) GetName() (string, error)
GetName get the host name
func (*HostWrapper) GetOperator ¶
func (cli *HostWrapper) GetOperator() (string, error)
GetOperator get the operator
func (*HostWrapper) GetOsBit ¶
func (cli *HostWrapper) GetOsBit() (string, error)
GetOsBit get the os bit
func (*HostWrapper) GetOsName ¶
func (cli *HostWrapper) GetOsName() (string, error)
GetOsName get the os name
func (*HostWrapper) GetOsType ¶
func (cli *HostWrapper) GetOsType() (string, error)
GetOsType get the os type
func (*HostWrapper) GetOsVersion ¶
func (cli *HostWrapper) GetOsVersion() (string, error)
GetOsVersion get the os version
func (*HostWrapper) GetOuterIP ¶
func (cli *HostWrapper) GetOuterIP() (string, error)
GetOuterIP get the outerip
func (*HostWrapper) GetOuterMac ¶
func (cli *HostWrapper) GetOuterMac() (string, error)
GetOuterMac get the mac for the host
func (*HostWrapper) GetSN ¶
func (cli *HostWrapper) GetSN() (string, error)
GetSN get the sn for the host
func (*HostWrapper) GetServiceTerm ¶
func (cli *HostWrapper) GetServiceTerm() (int, error)
GetServiceTerm get the service term
func (*HostWrapper) GetValues ¶
func (cli *HostWrapper) GetValues() (types.MapStr, error)
GetValues return the values
func (*HostWrapper) IsExists ¶
func (cli *HostWrapper) IsExists() (bool, error)
IsExists check the set
func (*HostWrapper) SetAssetID ¶
func (cli *HostWrapper) SetAssetID(assetID string) error
SetAssetID set the assetid for the host
func (*HostWrapper) SetBakOperator ¶
func (cli *HostWrapper) SetBakOperator(bakOperator string) error
SetBakOperator set the bak operator
func (*HostWrapper) SetBusiness ¶
func (cli *HostWrapper) SetBusiness(bizID int64)
SetBusiness set the business id for the host
func (*HostWrapper) SetCPU ¶
func (cli *HostWrapper) SetCPU(cpu int64) error
SetCPU set the cpu core num for the host
func (*HostWrapper) SetCPUMhz ¶
func (cli *HostWrapper) SetCPUMhz(cpuMhz int64) error
SetCPUMhz set the cpu mhz
func (*HostWrapper) SetCPUModule ¶
func (cli *HostWrapper) SetCPUModule(cpuModule string) error
SetCPUModule set the cpu module for the host
func (*HostWrapper) SetCloudID ¶
func (cli *HostWrapper) SetCloudID(cloudID int64) error
SetCloudID set the cloudid for the host
func (*HostWrapper) SetComment ¶
func (cli *HostWrapper) SetComment(comment string) error
SetComment set the comment for the host
func (*HostWrapper) SetDisk ¶
func (cli *HostWrapper) SetDisk(disk int64) error
SetDisk set the capacity of the disk for the host
func (*HostWrapper) SetInnerIP ¶
func (cli *HostWrapper) SetInnerIP(innerIP string) error
SetInnerIP set the inner ip
func (*HostWrapper) SetInnerMac ¶
func (cli *HostWrapper) SetInnerMac(mac string) error
SetInnerMac set the mac for the host
func (*HostWrapper) SetMem ¶
func (cli *HostWrapper) SetMem(mem int64) error
SetMem set the mem for the host
func (*HostWrapper) SetModuleIDS ¶
func (cli *HostWrapper) SetModuleIDS(moduleIDS []int64, act HostModuleActionType) error
SetModuleIDS set the modules
func (*HostWrapper) SetName ¶
func (cli *HostWrapper) SetName(hostName string) error
SetName set the host name for the host
func (*HostWrapper) SetOperator ¶
func (cli *HostWrapper) SetOperator(operator string) error
SetOperator set the operator for the host
func (*HostWrapper) SetOsBit ¶
func (cli *HostWrapper) SetOsBit(osbit string) error
SetOsBit set the os bit
func (*HostWrapper) SetOsName ¶
func (cli *HostWrapper) SetOsName(osName string) error
SetOsName set the os name for the host
func (*HostWrapper) SetOsType ¶
func (cli *HostWrapper) SetOsType(osType string) error
SetOsType set the os type for the host
func (*HostWrapper) SetOsVersion ¶
func (cli *HostWrapper) SetOsVersion(osVersion string) error
SetOsVersion set the os version for the host
func (*HostWrapper) SetOuterIP ¶
func (cli *HostWrapper) SetOuterIP(outerIP string) error
SetOuterIP set the outer ip for the host
func (*HostWrapper) SetOuterMac ¶
func (cli *HostWrapper) SetOuterMac(mac string) error
SetOuterMac set the mac for the host
func (*HostWrapper) SetSN ¶
func (cli *HostWrapper) SetSN(sn string) error
SetSN set the sn for the host
func (*HostWrapper) SetServiceTerm ¶
func (cli *HostWrapper) SetServiceTerm(serviceTerm int64) error
SetServiceTerm set the service term for the host
func (*HostWrapper) SetTopo ¶
func (cli *HostWrapper) SetTopo(bizID int64, setName, moduleName string, act HostModuleActionType) error
SetTopo set the host topo
func (*HostWrapper) SetValue ¶
func (cli *HostWrapper) SetValue(key string, val interface{}) error
SetValue set the key value
func (*HostWrapper) Transfer ¶
func (cli *HostWrapper) Transfer() inst.TransferInterface
Transfer transfer operation
type ModuleIteratorWrapper ¶
type ModuleIteratorWrapper struct {
// contains filtered or unexported fields
}
ModuleIteratorWrapper the module iterator wrapper
func FindModuleByCondition ¶
func FindModuleByCondition(supplierAccount string, cond common.Condition) (*ModuleIteratorWrapper, error)
FindModuleByCondition find all insts by the condition
func FindModuleLikeName ¶
func FindModuleLikeName(supplierAccount, moduleName string) (*ModuleIteratorWrapper, error)
FindModuleLikeName find all insts by the name
func (*ModuleIteratorWrapper) ForEach ¶
func (cli *ModuleIteratorWrapper) ForEach(callback func(module *ModuleWrapper) error) error
ForEach the foreach function
func (*ModuleIteratorWrapper) Next ¶
func (cli *ModuleIteratorWrapper) Next() (*ModuleWrapper, error)
Next next the module
type ModuleWrapper ¶
type ModuleWrapper struct {
// contains filtered or unexported fields
}
ModuleWrapper the module wrapper
func CreateModule ¶
func CreateModule(supplierAccount string) (*ModuleWrapper, error)
CreateModule create a new module object
func (*ModuleWrapper) GetBakOperator ¶
func (cli *ModuleWrapper) GetBakOperator() (string, error)
GetBakOperator get the bak operator
func (*ModuleWrapper) GetBusinessID ¶
func (cli *ModuleWrapper) GetBusinessID() (int, error)
GetBusinessID get the business id
func (*ModuleWrapper) GetID ¶
func (cli *ModuleWrapper) GetID() (int64, error)
GetID get the id for the host
func (*ModuleWrapper) GetModel ¶
func (cli *ModuleWrapper) GetModel() model.Model
GetModel get the model for the module
func (*ModuleWrapper) GetModuleID ¶
func (cli *ModuleWrapper) GetModuleID() (int64, error)
GetModuleID get the id for the module
func (*ModuleWrapper) GetName ¶
func (cli *ModuleWrapper) GetName() (string, error)
GetName get the module name
func (*ModuleWrapper) GetOperator ¶
func (cli *ModuleWrapper) GetOperator() (string, error)
GetOperator get the operator for the host
func (*ModuleWrapper) GetSupplierAccount ¶
func (cli *ModuleWrapper) GetSupplierAccount() (string, error)
GetSupplierAccount get the supplier account
func (*ModuleWrapper) GetValues ¶
func (cli *ModuleWrapper) GetValues() (types.MapStr, error)
GetValues return the values
func (*ModuleWrapper) IsExists ¶
func (cli *ModuleWrapper) IsExists() (bool, error)
IsExists check the set
func (*ModuleWrapper) SetBakOperator ¶
func (cli *ModuleWrapper) SetBakOperator(bakOperator string) error
SetBakOperator set the bak operator
func (*ModuleWrapper) SetName ¶
func (cli *ModuleWrapper) SetName(name string) error
SetName set the module name
func (*ModuleWrapper) SetOperator ¶
func (cli *ModuleWrapper) SetOperator(operator string) error
SetOperator set the operator
func (*ModuleWrapper) SetSupplierAccount ¶
func (cli *ModuleWrapper) SetSupplierAccount(supplierAccount string) error
SetSupplierAccount set the supplier account
func (*ModuleWrapper) SetTopo ¶
func (cli *ModuleWrapper) SetTopo(bizID, setID int64) error
SetTopo set the parent inst
func (*ModuleWrapper) SetValue ¶
func (cli *ModuleWrapper) SetValue(key string, val interface{}) error
SetValue set the key value
type PlatIteratorWrapper ¶
type PlatIteratorWrapper struct {
// contains filtered or unexported fields
}
PlatIteratorWrapper the plat iterator wrapper
func FindPlatByCondition ¶
func FindPlatByCondition(supplierAccount string, cond common.Condition) (*PlatIteratorWrapper, error)
FindPlatByCondition find all insts by the condition
func FindPlatLikeName ¶
func FindPlatLikeName(supplierAccount, platName string) (*PlatIteratorWrapper, error)
FindPlatLikeName find all insts by the name
func (*PlatIteratorWrapper) ForEach ¶
func (cli *PlatIteratorWrapper) ForEach(callback func(plat *PlatWrapper) error) error
ForEach the foreach function
func (*PlatIteratorWrapper) Next ¶
func (cli *PlatIteratorWrapper) Next() (*PlatWrapper, error)
Next next the plat
type PlatWrapper ¶
type PlatWrapper struct {
// contains filtered or unexported fields
}
PlatWrapper the plat wrapper
func CreatePlat ¶
func CreatePlat(supplierAccount string) (*PlatWrapper, error)
CreatePlat create a new plat object
func (*PlatWrapper) GetModel ¶
func (cli *PlatWrapper) GetModel() model.Model
GetModel get the model for the plat
func (*PlatWrapper) GetName ¶
func (cli *PlatWrapper) GetName() (string, error)
GetName get the set name
func (*PlatWrapper) GetSupplierAccount ¶
func (cli *PlatWrapper) GetSupplierAccount() (string, error)
GetSupplierAccount get the supplier account
func (*PlatWrapper) GetValues ¶
func (cli *PlatWrapper) GetValues() (types.MapStr, error)
GetValues return the values
func (*PlatWrapper) IsExists ¶
func (cli *PlatWrapper) IsExists() (bool, error)
IsExists check the set
func (*PlatWrapper) SetName ¶
func (cli *PlatWrapper) SetName(name string) error
SetName the name of the set
func (*PlatWrapper) SetSupplierAccount ¶
func (cli *PlatWrapper) SetSupplierAccount(supplierAccount string) error
SetSupplierAccount set the supplier account code of the set
func (*PlatWrapper) SetValue ¶
func (cli *PlatWrapper) SetValue(key string, val interface{}) error
SetValue set the key value
type SetIteratorWrapper ¶
type SetIteratorWrapper struct {
// contains filtered or unexported fields
}
SetIteratorWrapper the set iterator wrapper
func FindSetByCondition ¶
func FindSetByCondition(supplierAccount string, cond common.Condition) (*SetIteratorWrapper, error)
FindSetByCondition find all insts by the condition
func FindSetLikeName ¶
func FindSetLikeName(supplierAccount, setName string) (*SetIteratorWrapper, error)
FindSetLikeName find all insts by the name
func (*SetIteratorWrapper) ForEach ¶
func (cli *SetIteratorWrapper) ForEach(callback func(set *SetWrapper) error) error
ForEach the foreach function
func (*SetIteratorWrapper) Next ¶
func (cli *SetIteratorWrapper) Next() (*SetWrapper, error)
Next next the set
type SetWrapper ¶
type SetWrapper struct {
// contains filtered or unexported fields
}
SetWrapper the set wrapper
func CreateSet ¶
func CreateSet(supplierAccount string) (*SetWrapper, error)
CreateSet create a new set object
func (*SetWrapper) GetBusinessID ¶
func (cli *SetWrapper) GetBusinessID() (int64, error)
GetBusinessID get the business id
func (*SetWrapper) GetCapacity ¶
func (cli *SetWrapper) GetCapacity() (int, error)
GetCapacity get the capacity
func (*SetWrapper) GetModel ¶
func (cli *SetWrapper) GetModel() model.Model
GetModel get the model for the set
func (*SetWrapper) GetName ¶
func (cli *SetWrapper) GetName() (string, error)
GetName get the set name
func (*SetWrapper) GetServiceStatus ¶
func (cli *SetWrapper) GetServiceStatus() (string, error)
GetServiceStatus get the service status
func (*SetWrapper) GetSetID ¶
func (cli *SetWrapper) GetSetID() (int64, error)
GetSetID get the id for the set
func (*SetWrapper) GetSupplierAccount ¶
func (cli *SetWrapper) GetSupplierAccount() (string, error)
GetSupplierAccount get the supplier account
func (*SetWrapper) GetValues ¶
func (cli *SetWrapper) GetValues() (types.MapStr, error)
GetValues return the values
func (*SetWrapper) IsExists ¶
func (cli *SetWrapper) IsExists() (bool, error)
IsExists check the set
func (*SetWrapper) SetBusinessID ¶
func (cli *SetWrapper) SetBusinessID(businessID int64) error
SetBusinessID set the business id of the set
func (*SetWrapper) SetCapacity ¶
func (cli *SetWrapper) SetCapacity(capacity int64) error
SetCapacity set the capacity of the set
func (*SetWrapper) SetDescription ¶
func (cli *SetWrapper) SetDescription(intro string) error
SetDescription set the introducrtion of the set
func (*SetWrapper) SetEnv ¶
func (cli *SetWrapper) SetEnv(env string) error
SetEnv set the env of the set
func (*SetWrapper) SetMark ¶
func (cli *SetWrapper) SetMark(desc string) error
SetMark set the mark of the set
func (*SetWrapper) SetName ¶
func (cli *SetWrapper) SetName(name string) error
SetName the name of the set
func (*SetWrapper) SetParent ¶
func (cli *SetWrapper) SetParent(parentInstID int64) error
SetParent set the parent id of the set
func (*SetWrapper) SetServiceStatus ¶
func (cli *SetWrapper) SetServiceStatus(status string) error
SetServiceStatus the service status of the set
func (*SetWrapper) SetSupplierAccount ¶
func (cli *SetWrapper) SetSupplierAccount(supplierAccount string) error
SetSupplierAccount set the supplier account code of the set
func (*SetWrapper) SetValue ¶
func (cli *SetWrapper) SetValue(key string, val interface{}) error
SetValue set the key value