Documentation ¶
Index ¶
- Constants
- func DoCronJobs(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
- func GetNicDHCPConfig(n *types.SNic, serverIP string, hostName string, isPxe bool, arch uint16) (*dhcp.ResponseConfig, error)
- func PowerStatusToBaremetalStatus(status string) string
- func PowerStatusToServerStatus(bm *SBaremetalInstance, status string) string
- func Start(app *appsrv.Application) error
- func Stop() error
- type BmRegisterInput
- type IBaremetalCronJob
- type SBaremetalAgent
- func (agent *SBaremetalAgent) GetAccessIP() (net.IP, error)
- func (agent *SBaremetalAgent) GetAdminSession() *mcclient.ClientSession
- func (agent *SBaremetalAgent) GetAgentType() string
- func (agent *SBaremetalAgent) GetDHCPServerIP() (net.IP, error)
- func (agent *SBaremetalAgent) GetDHCPServerListenIP() (net.IP, error)
- func (agent *SBaremetalAgent) GetEnableSsl() bool
- func (agent *SBaremetalAgent) GetListenIP() (net.IP, error)
- func (agent *SBaremetalAgent) GetManager() *SBaremetalManager
- func (agent *SBaremetalAgent) GetPort() int
- func (agent *SBaremetalAgent) GetPublicAdminSession() *mcclient.ClientSession
- func (agent *SBaremetalAgent) GetZoneId() string
- func (agent *SBaremetalAgent) StartService() error
- func (agent *SBaremetalAgent) StopService() error
- func (agent *SBaremetalAgent) TuneSystem() error
- type SBaremetalInstance
- func (b *SBaremetalInstance) AdjustUEFIBootOrder(ctx context.Context) error
- func (b *SBaremetalInstance) AdjustUEFICurrentBootOrder(ctx context.Context, hostCli *ssh.Client) error
- func (b *SBaremetalInstance) AutoSaveDesc(ctx context.Context) error
- func (b *SBaremetalInstance) AutoSyncAllStatus(ctx context.Context)
- func (b *SBaremetalInstance) AutoSyncStatus(ctx context.Context)
- func (b *SBaremetalInstance) CleanUEFIInfo(ctx context.Context) error
- func (b *SBaremetalInstance) ClearSSHConfig()
- func (b *SBaremetalInstance) DelayedRemove(_ context.Context, _ jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (b *SBaremetalInstance) DelayedServerReset(ctx context.Context, _ jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (b *SBaremetalInstance) DelayedServerStatus(ctx context.Context, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (b *SBaremetalInstance) DelayedSyncDesc(ctx context.Context, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (b *SBaremetalInstance) DelayedSyncIPMIInfo(ctx context.Context, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (b *SBaremetalInstance) DelayedSyncStatus(ctx context.Context, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (b *SBaremetalInstance) DoNTPConfig() error
- func (b *SBaremetalInstance) DoPXEBoot() error
- func (b *SBaremetalInstance) DoPowerShutdown(soft bool) error
- func (b *SBaremetalInstance) DoRedfishPowerOn() error
- func (b *SBaremetalInstance) EnablePxeBoot() bool
- func (b *SBaremetalInstance) GenerateBootISO() error
- func (b *SBaremetalInstance) GetAccessIp() string
- func (b *SBaremetalInstance) GetAccessMac() string
- func (b *SBaremetalInstance) GetAdminNic() *types.SNic
- func (b *SBaremetalInstance) GetArch() (string, error)
- func (b *SBaremetalInstance) GetBootMode() string
- func (b *SBaremetalInstance) GetClientSession() *mcclient.ClientSession
- func (b *SBaremetalInstance) GetConsoleJNLP(ctx context.Context) (string, error)
- func (b *SBaremetalInstance) GetDHCPConfig(cliMac net.HardwareAddr) (*dhcp.ResponseConfig, error)
- func (b *SBaremetalInstance) GetDHCPServerIP() (net.IP, error)
- func (b *SBaremetalInstance) GetDescFilePath() string
- func (b *SBaremetalInstance) GetDir() string
- func (b *SBaremetalInstance) GetHostSSHClient() (*ssh.Client, error)
- func (b *SBaremetalInstance) GetHostType() string
- func (b *SBaremetalInstance) GetIPMIConfig() *types.SIPMIInfo
- func (b *SBaremetalInstance) GetIPMILanChannel() uint8
- func (b *SBaremetalInstance) GetIPMINic(cliMac net.HardwareAddr) *types.SNic
- func (b *SBaremetalInstance) GetIPMINicIPAddr() string
- func (b *SBaremetalInstance) GetIPMITool() *ipmitool.LanPlusIPMI
- func (b *SBaremetalInstance) GetId() string
- func (b *SBaremetalInstance) GetImageUrl(disableImageCache bool) string
- func (b *SBaremetalInstance) GetManufacture() string
- func (b *SBaremetalInstance) GetMemGb() string
- func (b *SBaremetalInstance) GetModel() string
- func (b *SBaremetalInstance) GetName() string
- func (b *SBaremetalInstance) GetNicByMac(mac net.HardwareAddr) *types.SNic
- func (b *SBaremetalInstance) GetNics() []types.SNic
- func (b *SBaremetalInstance) GetNodeCount() string
- func (b *SBaremetalInstance) GetNotifyUrl() string
- func (b *SBaremetalInstance) GetPXEDHCPConfig(arch uint16) (*dhcp.ResponseConfig, error)
- func (b *SBaremetalInstance) GetPowerStatus() (string, error)
- func (b *SBaremetalInstance) GetPublicClientSession() *mcclient.ClientSession
- func (b *SBaremetalInstance) GetRawIPMIConfig() *types.SIPMIInfo
- func (b *SBaremetalInstance) GetRedfishCli(ctx context.Context) redfish.IRedfishDriver
- func (b *SBaremetalInstance) GetRegion() string
- func (b *SBaremetalInstance) GetRegionId() string
- func (b *SBaremetalInstance) GetSSHConfig() (*types.SSHConfig, error)
- func (b *SBaremetalInstance) GetSSHConfigFilePath() string
- func (b *SBaremetalInstance) GetSerialNumber() string
- func (b *SBaremetalInstance) GetServer() baremetaltypes.IBaremetalServer
- func (b *SBaremetalInstance) GetServerDescFilePath() string
- func (b *SBaremetalInstance) GetServerId() string
- func (b *SBaremetalInstance) GetServerName() string
- func (b *SBaremetalInstance) GetServerSSHClient() (*ssh.Client, error)
- func (b *SBaremetalInstance) GetStatus() string
- func (b *SBaremetalInstance) GetStorageCacheId() string
- func (b *SBaremetalInstance) GetStorageDriver() string
- func (b *SBaremetalInstance) GetTFTPResponse() string
- func (b *SBaremetalInstance) GetTask() tasks.ITask
- func (b *SBaremetalInstance) GetTaskQueue() *tasks.TaskQueue
- func (b *SBaremetalInstance) GetUEFIInfo() (*types.EFIBootMgrInfo, error)
- func (b *SBaremetalInstance) GetZoneId() string
- func (b *SBaremetalInstance) GetZoneName() string
- func (b *SBaremetalInstance) HasBMC() bool
- func (b *SBaremetalInstance) InitAdminNetif(ctx context.Context, cliMac net.HardwareAddr, wireId string, ...) error
- func (b *SBaremetalInstance) InitializeServer(s *mcclient.ClientSession, name string) error
- func (b *SBaremetalInstance) IsHypervisorHost() bool
- func (b *SBaremetalInstance) IsMaintenance() bool
- func (b *SBaremetalInstance) Keyword() string
- func (b *SBaremetalInstance) NeedPXEBoot() bool
- func (b *SBaremetalInstance) RegisterNetif(ctx context.Context, cliMac net.HardwareAddr, wireId string) error
- func (b *SBaremetalInstance) RemoveServer()
- func (b *SBaremetalInstance) SSHReachable() (bool, error)
- func (b *SBaremetalInstance) SSHReboot(ctx context.Context) error
- func (b *SBaremetalInstance) SSHShutdown() error
- func (b *SBaremetalInstance) SaveDesc(ctx context.Context, desc jsonutils.JSONObject) error
- func (b *SBaremetalInstance) SaveSSHConfig(remoteAddr string, key string) error
- func (b *SBaremetalInstance) SendNicInfo(ctx context.Context, nic *types.SNicDevInfo, idx int, nicType compute.TNicType, ...) error
- func (b *SBaremetalInstance) SendUEFIInfo(ctx context.Context, mgr *uefi.BootMgr) error
- func (b *SBaremetalInstance) ServerLoadDesc(ctx context.Context) error
- func (b *SBaremetalInstance) SetExistingIPMIIPAddr(ipAddr string)
- func (b *SBaremetalInstance) SetTask(task tasks.ITask)
- func (b *SBaremetalInstance) StartBaremetalCdromTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
- func (b *SBaremetalInstance) StartBaremetalIpmiProbeTask(ctx context.Context, userCred mcclient.TokenCredential, taskId string, ...) error
- func (b *SBaremetalInstance) StartBaremetalMaintenanceTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject)
- func (b *SBaremetalInstance) StartBaremetalReprepareTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject)
- func (b *SBaremetalInstance) StartBaremetalResetBMCTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
- func (b *SBaremetalInstance) StartBaremetalUnmaintenanceTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject)
- func (b *SBaremetalInstance) StartNewTask(factory tasks.TaskFactory, userCred mcclient.TokenCredential, taskId string, ...)
- func (b *SBaremetalInstance) StartServerCreateTask(ctx context.Context, userCred mcclient.TokenCredential, taskId string, ...) error
- func (b *SBaremetalInstance) StartServerDeployTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
- func (b *SBaremetalInstance) StartServerDestroyTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject)
- func (b *SBaremetalInstance) StartServerRebuildTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
- func (b *SBaremetalInstance) StartServerStartTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
- func (b *SBaremetalInstance) StartServerStopTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
- func (b *SBaremetalInstance) Stop()
- func (b *SBaremetalInstance) SyncAllStatus(ctx context.Context, status string)
- func (b *SBaremetalInstance) SyncSSHConfig(conf types.SSHConfig) error
- func (b *SBaremetalInstance) SyncServerStatus(status string)
- func (b *SBaremetalInstance) SyncStatus(ctx context.Context, status string, reason string)
- func (b *SBaremetalInstance) SyncStatusBackground()
- func (b *SBaremetalInstance) TestSSHConfig() bool
- type SBaremetalManager
- func (m *SBaremetalManager) AddBaremetal(ctx context.Context, desc jsonutils.JSONObject) (pxe.IBaremetalInstance, error)
- func (m *SBaremetalManager) CleanBaremetal(bmId string)
- func (m *SBaremetalManager) GetBaremetalById(bmId string) *SBaremetalInstance
- func (m *SBaremetalManager) GetBaremetalByMac(mac net.HardwareAddr) pxe.IBaremetalInstance
- func (m *SBaremetalManager) GetBaremetals() []*SBaremetalInstance
- func (m *SBaremetalManager) GetClientSession() *mcclient.ClientSession
- func (m *SBaremetalManager) GetPublicClientSession() *mcclient.ClientSession
- func (m *SBaremetalManager) GetZoneId() string
- func (m *SBaremetalManager) GetZoneName() string
- func (m *SBaremetalManager) InitBaremetal(ctx context.Context, bmId string, update bool) error
- func (m *SBaremetalManager) RegisterBaremetal(ctx context.Context, userCred mcclient.TokenCredential, input *BmRegisterInput)
- func (m *SBaremetalManager) Stop()
- type SBaremetalServer
- func (s *SBaremetalServer) DoDeploy(tool *disktool.SSHPartitionTool, term *ssh.Client, data jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (s *SBaremetalServer) DoDiskConfig(term *ssh.Client) (*disktool.SSHPartitionTool, error)
- func (s *SBaremetalServer) DoDiskUnconfig(term *ssh.Client) error
- func (s *SBaremetalServer) DoEraseDisk(term *ssh.Client) error
- func (s *SBaremetalServer) DoPartitionDisk(tool *disktool.SSHPartitionTool, term *ssh.Client, disableImageCache bool) ([]*disktool.Partition, error)
- func (s *SBaremetalServer) DoRebuildRootDisk(tool *disktool.SSHPartitionTool, term *ssh.Client, disableImageCache bool) ([]*disktool.Partition, error)
- func (s *SBaremetalServer) GetDiskConfig() ([]*api.BaremetalDiskConfig, error)
- func (server *SBaremetalServer) GetId() string
- func (s *SBaremetalServer) GetMetadata() (*jsonutils.JSONDict, error)
- func (server *SBaremetalServer) GetName() string
- func (s *SBaremetalServer) GetNicByMac(mac net.HardwareAddr) *types.SNic
- func (s *SBaremetalServer) GetNics() []types.SServerNic
- func (s *SBaremetalServer) GetRootDiskMatcher() (*api.BaremetalRootDiskMatcher, error)
- func (s *SBaremetalServer) GetRootTemplateId() string
- func (s *SBaremetalServer) NewConfigedSSHPartitionTool(term *ssh.Client) (*disktool.SSHPartitionTool, error)
- func (s *SBaremetalServer) RemoveDesc()
- func (server *SBaremetalServer) SaveDesc(desc jsonutils.JSONObject) error
- func (s *SBaremetalServer) SyncPartitionSize(term *ssh.Client, parts []*disktool.Partition) ([]jsonutils.JSONObject, error)
- type SBaseBaremetalCronJob
- type SLogFetchJob
- type SSendMetricsJob
- type SStatusProbeJob
Constants ¶
View Source
const ( INIT = "init" PREPARE = "prepare" PREPARE_FAIL = "prepare_fail" READY = "ready" RUNNING = "running" MAINTAINING = "maintaining" START_MAINTAIN = "start_maintain" DELETING = "deleting" DELETE = "delete" DELETE_FAIL = "delete_fail" UNKNOWN = "unknown" SYNCING_STATUS = "syncing_status" SYNC = "sync" SYNC_FAIL = "sync_fail" START_CONVERT = "start_convert" CONVERTING = "converting" START_FAIL = "start_fail" STOP_FAIL = "stop_fail" )
View Source
const (
AGENT_TYPE_BAREMETAL = "baremetal"
)
Variables ¶
This section is empty.
Functions ¶
func DoCronJobs ¶
func DoCronJobs(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
func GetNicDHCPConfig ¶
func PowerStatusToServerStatus ¶
func PowerStatusToServerStatus(bm *SBaremetalInstance, status string) string
func Start ¶
func Start(app *appsrv.Application) error
Types ¶
type BmRegisterInput ¶
type BmRegisterInput struct { // context with timeout Ctx context.Context R *http.Request W http.ResponseWriter // For notify web server close this connection C chan struct{} // remote server ssh info SshPort int SshPasswd string Hostname string RemoteIp string // ipmi info Username string Password string IpAddr string }
type IBaremetalCronJob ¶
type IBaremetalCronJob interface { Name() string NeedsToRun(now time.Time) bool StartRun() Do(ctx context.Context, now time.Time) error StopRun() }
func NewLogFetchJob ¶
func NewLogFetchJob(baremetal *SBaremetalInstance, interval time.Duration) IBaremetalCronJob
func NewSendMetricsJob ¶
func NewSendMetricsJob(baremetal *SBaremetalInstance, interval time.Duration) IBaremetalCronJob
func NewStatusProbeJob ¶
func NewStatusProbeJob(baremetal *SBaremetalInstance, interval time.Duration) IBaremetalCronJob
type SBaremetalAgent ¶
type SBaremetalAgent struct { agent.SBaseAgent PXEServer *pxe.Server Manager *SBaremetalManager }
BaremetalAgent has two types of address - AccessAddress/Address: this is the address controller to accesss the agent - ListenAddress: this is the address baremetal to access the agent
func GetBaremetalAgent ¶
func GetBaremetalAgent() *SBaremetalAgent
func (*SBaremetalAgent) GetAccessIP ¶
func (agent *SBaremetalAgent) GetAccessIP() (net.IP, error)
func (*SBaremetalAgent) GetAdminSession ¶
func (agent *SBaremetalAgent) GetAdminSession() *mcclient.ClientSession
func (*SBaremetalAgent) GetAgentType ¶
func (agent *SBaremetalAgent) GetAgentType() string
func (*SBaremetalAgent) GetDHCPServerIP ¶
func (agent *SBaremetalAgent) GetDHCPServerIP() (net.IP, error)
func (*SBaremetalAgent) GetDHCPServerListenIP ¶
func (agent *SBaremetalAgent) GetDHCPServerListenIP() (net.IP, error)
func (*SBaremetalAgent) GetEnableSsl ¶
func (agent *SBaremetalAgent) GetEnableSsl() bool
func (*SBaremetalAgent) GetListenIP ¶
func (agent *SBaremetalAgent) GetListenIP() (net.IP, error)
func (*SBaremetalAgent) GetManager ¶
func (agent *SBaremetalAgent) GetManager() *SBaremetalManager
func (*SBaremetalAgent) GetPort ¶
func (agent *SBaremetalAgent) GetPort() int
func (*SBaremetalAgent) GetPublicAdminSession ¶
func (agent *SBaremetalAgent) GetPublicAdminSession() *mcclient.ClientSession
func (*SBaremetalAgent) GetZoneId ¶
func (agent *SBaremetalAgent) GetZoneId() string
func (*SBaremetalAgent) StartService ¶
func (agent *SBaremetalAgent) StartService() error
func (*SBaremetalAgent) StopService ¶
func (agent *SBaremetalAgent) StopService() error
func (*SBaremetalAgent) TuneSystem ¶
func (agent *SBaremetalAgent) TuneSystem() error
type SBaremetalInstance ¶
type SBaremetalInstance struct {
// contains filtered or unexported fields
}
func (*SBaremetalInstance) AdjustUEFIBootOrder ¶
func (b *SBaremetalInstance) AdjustUEFIBootOrder(ctx context.Context) error
func (*SBaremetalInstance) AdjustUEFICurrentBootOrder ¶
func (*SBaremetalInstance) AutoSaveDesc ¶
func (b *SBaremetalInstance) AutoSaveDesc(ctx context.Context) error
func (*SBaremetalInstance) AutoSyncAllStatus ¶
func (b *SBaremetalInstance) AutoSyncAllStatus(ctx context.Context)
func (*SBaremetalInstance) AutoSyncStatus ¶
func (b *SBaremetalInstance) AutoSyncStatus(ctx context.Context)
func (*SBaremetalInstance) CleanUEFIInfo ¶
func (b *SBaremetalInstance) CleanUEFIInfo(ctx context.Context) error
func (*SBaremetalInstance) ClearSSHConfig ¶
func (b *SBaremetalInstance) ClearSSHConfig()
func (*SBaremetalInstance) DelayedRemove ¶
func (b *SBaremetalInstance) DelayedRemove(_ context.Context, _ jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaremetalInstance) DelayedServerReset ¶
func (b *SBaremetalInstance) DelayedServerReset(ctx context.Context, _ jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaremetalInstance) DelayedServerStatus ¶
func (b *SBaremetalInstance) DelayedServerStatus(ctx context.Context, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaremetalInstance) DelayedSyncDesc ¶
func (b *SBaremetalInstance) DelayedSyncDesc(ctx context.Context, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaremetalInstance) DelayedSyncIPMIInfo ¶
func (b *SBaremetalInstance) DelayedSyncIPMIInfo(ctx context.Context, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaremetalInstance) DelayedSyncStatus ¶
func (b *SBaremetalInstance) DelayedSyncStatus(ctx context.Context, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaremetalInstance) DoNTPConfig ¶
func (b *SBaremetalInstance) DoNTPConfig() error
func (*SBaremetalInstance) DoPXEBoot ¶
func (b *SBaremetalInstance) DoPXEBoot() error
func (*SBaremetalInstance) DoPowerShutdown ¶
func (b *SBaremetalInstance) DoPowerShutdown(soft bool) error
func (*SBaremetalInstance) DoRedfishPowerOn ¶
func (b *SBaremetalInstance) DoRedfishPowerOn() error
func (*SBaremetalInstance) EnablePxeBoot ¶
func (b *SBaremetalInstance) EnablePxeBoot() bool
func (*SBaremetalInstance) GenerateBootISO ¶
func (b *SBaremetalInstance) GenerateBootISO() error
func (*SBaremetalInstance) GetAccessIp ¶
func (b *SBaremetalInstance) GetAccessIp() string
func (*SBaremetalInstance) GetAccessMac ¶
func (b *SBaremetalInstance) GetAccessMac() string
func (*SBaremetalInstance) GetAdminNic ¶
func (b *SBaremetalInstance) GetAdminNic() *types.SNic
func (*SBaremetalInstance) GetArch ¶
func (b *SBaremetalInstance) GetArch() (string, error)
func (*SBaremetalInstance) GetBootMode ¶
func (b *SBaremetalInstance) GetBootMode() string
func (*SBaremetalInstance) GetClientSession ¶
func (b *SBaremetalInstance) GetClientSession() *mcclient.ClientSession
func (*SBaremetalInstance) GetConsoleJNLP ¶
func (b *SBaremetalInstance) GetConsoleJNLP(ctx context.Context) (string, error)
func (*SBaremetalInstance) GetDHCPConfig ¶
func (b *SBaremetalInstance) GetDHCPConfig(cliMac net.HardwareAddr) (*dhcp.ResponseConfig, error)
func (*SBaremetalInstance) GetDHCPServerIP ¶
func (b *SBaremetalInstance) GetDHCPServerIP() (net.IP, error)
func (*SBaremetalInstance) GetDescFilePath ¶
func (b *SBaremetalInstance) GetDescFilePath() string
func (*SBaremetalInstance) GetDir ¶
func (b *SBaremetalInstance) GetDir() string
func (*SBaremetalInstance) GetHostSSHClient ¶
func (b *SBaremetalInstance) GetHostSSHClient() (*ssh.Client, error)
func (*SBaremetalInstance) GetHostType ¶
func (b *SBaremetalInstance) GetHostType() string
func (*SBaremetalInstance) GetIPMIConfig ¶
func (b *SBaremetalInstance) GetIPMIConfig() *types.SIPMIInfo
func (*SBaremetalInstance) GetIPMILanChannel ¶
func (b *SBaremetalInstance) GetIPMILanChannel() uint8
func (*SBaremetalInstance) GetIPMINic ¶
func (b *SBaremetalInstance) GetIPMINic(cliMac net.HardwareAddr) *types.SNic
func (*SBaremetalInstance) GetIPMINicIPAddr ¶
func (b *SBaremetalInstance) GetIPMINicIPAddr() string
func (*SBaremetalInstance) GetIPMITool ¶
func (b *SBaremetalInstance) GetIPMITool() *ipmitool.LanPlusIPMI
func (*SBaremetalInstance) GetId ¶
func (b *SBaremetalInstance) GetId() string
func (*SBaremetalInstance) GetImageUrl ¶
func (b *SBaremetalInstance) GetImageUrl(disableImageCache bool) string
func (*SBaremetalInstance) GetManufacture ¶
func (b *SBaremetalInstance) GetManufacture() string
func (*SBaremetalInstance) GetMemGb ¶
func (b *SBaremetalInstance) GetMemGb() string
func (*SBaremetalInstance) GetModel ¶
func (b *SBaremetalInstance) GetModel() string
func (*SBaremetalInstance) GetName ¶
func (b *SBaremetalInstance) GetName() string
func (*SBaremetalInstance) GetNicByMac ¶
func (b *SBaremetalInstance) GetNicByMac(mac net.HardwareAddr) *types.SNic
func (*SBaremetalInstance) GetNics ¶
func (b *SBaremetalInstance) GetNics() []types.SNic
func (*SBaremetalInstance) GetNodeCount ¶
func (b *SBaremetalInstance) GetNodeCount() string
func (*SBaremetalInstance) GetNotifyUrl ¶
func (b *SBaremetalInstance) GetNotifyUrl() string
func (*SBaremetalInstance) GetPXEDHCPConfig ¶
func (b *SBaremetalInstance) GetPXEDHCPConfig(arch uint16) (*dhcp.ResponseConfig, error)
func (*SBaremetalInstance) GetPowerStatus ¶
func (b *SBaremetalInstance) GetPowerStatus() (string, error)
func (*SBaremetalInstance) GetPublicClientSession ¶
func (b *SBaremetalInstance) GetPublicClientSession() *mcclient.ClientSession
func (*SBaremetalInstance) GetRawIPMIConfig ¶
func (b *SBaremetalInstance) GetRawIPMIConfig() *types.SIPMIInfo
func (*SBaremetalInstance) GetRedfishCli ¶
func (b *SBaremetalInstance) GetRedfishCli(ctx context.Context) redfish.IRedfishDriver
func (*SBaremetalInstance) GetRegion ¶
func (b *SBaremetalInstance) GetRegion() string
func (*SBaremetalInstance) GetRegionId ¶
func (b *SBaremetalInstance) GetRegionId() string
func (*SBaremetalInstance) GetSSHConfig ¶
func (b *SBaremetalInstance) GetSSHConfig() (*types.SSHConfig, error)
func (*SBaremetalInstance) GetSSHConfigFilePath ¶
func (b *SBaremetalInstance) GetSSHConfigFilePath() string
func (*SBaremetalInstance) GetSerialNumber ¶
func (b *SBaremetalInstance) GetSerialNumber() string
func (*SBaremetalInstance) GetServer ¶
func (b *SBaremetalInstance) GetServer() baremetaltypes.IBaremetalServer
func (*SBaremetalInstance) GetServerDescFilePath ¶
func (b *SBaremetalInstance) GetServerDescFilePath() string
func (*SBaremetalInstance) GetServerId ¶
func (b *SBaremetalInstance) GetServerId() string
func (*SBaremetalInstance) GetServerName ¶
func (b *SBaremetalInstance) GetServerName() string
func (*SBaremetalInstance) GetServerSSHClient ¶
func (b *SBaremetalInstance) GetServerSSHClient() (*ssh.Client, error)
func (*SBaremetalInstance) GetStatus ¶
func (b *SBaremetalInstance) GetStatus() string
func (*SBaremetalInstance) GetStorageCacheId ¶
func (b *SBaremetalInstance) GetStorageCacheId() string
func (*SBaremetalInstance) GetStorageDriver ¶
func (b *SBaremetalInstance) GetStorageDriver() string
func (*SBaremetalInstance) GetTFTPResponse ¶
func (b *SBaremetalInstance) GetTFTPResponse() string
func (*SBaremetalInstance) GetTask ¶
func (b *SBaremetalInstance) GetTask() tasks.ITask
func (*SBaremetalInstance) GetTaskQueue ¶
func (b *SBaremetalInstance) GetTaskQueue() *tasks.TaskQueue
func (*SBaremetalInstance) GetUEFIInfo ¶
func (b *SBaremetalInstance) GetUEFIInfo() (*types.EFIBootMgrInfo, error)
func (*SBaremetalInstance) GetZoneId ¶
func (b *SBaremetalInstance) GetZoneId() string
func (*SBaremetalInstance) GetZoneName ¶
func (b *SBaremetalInstance) GetZoneName() string
func (*SBaremetalInstance) HasBMC ¶
func (b *SBaremetalInstance) HasBMC() bool
func (*SBaremetalInstance) InitAdminNetif ¶
func (b *SBaremetalInstance) InitAdminNetif( ctx context.Context, cliMac net.HardwareAddr, wireId string, nicType compute.TNicType, netType api.TNetworkType, isDoImport bool, importIpAddr string, ) error
func (*SBaremetalInstance) InitializeServer ¶
func (b *SBaremetalInstance) InitializeServer(s *mcclient.ClientSession, name string) error
func (*SBaremetalInstance) IsHypervisorHost ¶
func (b *SBaremetalInstance) IsHypervisorHost() bool
func (*SBaremetalInstance) IsMaintenance ¶
func (b *SBaremetalInstance) IsMaintenance() bool
func (*SBaremetalInstance) Keyword ¶
func (b *SBaremetalInstance) Keyword() string
func (*SBaremetalInstance) NeedPXEBoot ¶
func (b *SBaremetalInstance) NeedPXEBoot() bool
func (*SBaremetalInstance) RegisterNetif ¶
func (b *SBaremetalInstance) RegisterNetif(ctx context.Context, cliMac net.HardwareAddr, wireId string) error
func (*SBaremetalInstance) RemoveServer ¶
func (b *SBaremetalInstance) RemoveServer()
func (*SBaremetalInstance) SSHReachable ¶
func (b *SBaremetalInstance) SSHReachable() (bool, error)
func (*SBaremetalInstance) SSHReboot ¶
func (b *SBaremetalInstance) SSHReboot(ctx context.Context) error
func (*SBaremetalInstance) SSHShutdown ¶
func (b *SBaremetalInstance) SSHShutdown() error
func (*SBaremetalInstance) SaveDesc ¶
func (b *SBaremetalInstance) SaveDesc(ctx context.Context, desc jsonutils.JSONObject) error
func (*SBaremetalInstance) SaveSSHConfig ¶
func (b *SBaremetalInstance) SaveSSHConfig(remoteAddr string, key string) error
func (*SBaremetalInstance) SendNicInfo ¶
func (*SBaremetalInstance) SendUEFIInfo ¶
func (*SBaremetalInstance) ServerLoadDesc ¶
func (b *SBaremetalInstance) ServerLoadDesc(ctx context.Context) error
func (*SBaremetalInstance) SetExistingIPMIIPAddr ¶
func (b *SBaremetalInstance) SetExistingIPMIIPAddr(ipAddr string)
func (*SBaremetalInstance) SetTask ¶
func (b *SBaremetalInstance) SetTask(task tasks.ITask)
func (*SBaremetalInstance) StartBaremetalCdromTask ¶
func (b *SBaremetalInstance) StartBaremetalCdromTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
func (*SBaremetalInstance) StartBaremetalIpmiProbeTask ¶
func (b *SBaremetalInstance) StartBaremetalIpmiProbeTask(ctx context.Context, userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
func (*SBaremetalInstance) StartBaremetalMaintenanceTask ¶
func (b *SBaremetalInstance) StartBaremetalMaintenanceTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject)
func (*SBaremetalInstance) StartBaremetalReprepareTask ¶
func (b *SBaremetalInstance) StartBaremetalReprepareTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject)
func (*SBaremetalInstance) StartBaremetalResetBMCTask ¶
func (b *SBaremetalInstance) StartBaremetalResetBMCTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
func (*SBaremetalInstance) StartBaremetalUnmaintenanceTask ¶
func (b *SBaremetalInstance) StartBaremetalUnmaintenanceTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject)
func (*SBaremetalInstance) StartNewTask ¶
func (b *SBaremetalInstance) StartNewTask(factory tasks.TaskFactory, userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject)
func (*SBaremetalInstance) StartServerCreateTask ¶
func (b *SBaremetalInstance) StartServerCreateTask(ctx context.Context, userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
func (*SBaremetalInstance) StartServerDeployTask ¶
func (b *SBaremetalInstance) StartServerDeployTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
func (*SBaremetalInstance) StartServerDestroyTask ¶
func (b *SBaremetalInstance) StartServerDestroyTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject)
func (*SBaremetalInstance) StartServerRebuildTask ¶
func (b *SBaremetalInstance) StartServerRebuildTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
func (*SBaremetalInstance) StartServerStartTask ¶
func (b *SBaremetalInstance) StartServerStartTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
func (*SBaremetalInstance) StartServerStopTask ¶
func (b *SBaremetalInstance) StartServerStopTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error
func (*SBaremetalInstance) Stop ¶
func (b *SBaremetalInstance) Stop()
func (*SBaremetalInstance) SyncAllStatus ¶
func (b *SBaremetalInstance) SyncAllStatus(ctx context.Context, status string)
func (*SBaremetalInstance) SyncSSHConfig ¶
func (b *SBaremetalInstance) SyncSSHConfig(conf types.SSHConfig) error
func (*SBaremetalInstance) SyncServerStatus ¶
func (b *SBaremetalInstance) SyncServerStatus(status string)
func (*SBaremetalInstance) SyncStatus ¶
func (b *SBaremetalInstance) SyncStatus(ctx context.Context, status string, reason string)
func (*SBaremetalInstance) SyncStatusBackground ¶
func (b *SBaremetalInstance) SyncStatusBackground()
func (*SBaremetalInstance) TestSSHConfig ¶
func (b *SBaremetalInstance) TestSSHConfig() bool
type SBaremetalManager ¶
type SBaremetalManager struct { Agent *SBaremetalAgent // contains filtered or unexported fields }
func GetBaremetalManager ¶
func GetBaremetalManager() *SBaremetalManager
func NewBaremetalManager ¶
func NewBaremetalManager(agent *SBaremetalAgent) (*SBaremetalManager, error)
func (*SBaremetalManager) AddBaremetal ¶
func (m *SBaremetalManager) AddBaremetal(ctx context.Context, desc jsonutils.JSONObject) (pxe.IBaremetalInstance, error)
func (*SBaremetalManager) CleanBaremetal ¶
func (m *SBaremetalManager) CleanBaremetal(bmId string)
func (*SBaremetalManager) GetBaremetalById ¶
func (m *SBaremetalManager) GetBaremetalById(bmId string) *SBaremetalInstance
func (*SBaremetalManager) GetBaremetalByMac ¶
func (m *SBaremetalManager) GetBaremetalByMac(mac net.HardwareAddr) pxe.IBaremetalInstance
func (*SBaremetalManager) GetBaremetals ¶
func (m *SBaremetalManager) GetBaremetals() []*SBaremetalInstance
func (*SBaremetalManager) GetClientSession ¶
func (m *SBaremetalManager) GetClientSession() *mcclient.ClientSession
func (*SBaremetalManager) GetPublicClientSession ¶
func (m *SBaremetalManager) GetPublicClientSession() *mcclient.ClientSession
func (*SBaremetalManager) GetZoneId ¶
func (m *SBaremetalManager) GetZoneId() string
func (*SBaremetalManager) GetZoneName ¶
func (m *SBaremetalManager) GetZoneName() string
func (*SBaremetalManager) InitBaremetal ¶
func (*SBaremetalManager) RegisterBaremetal ¶
func (m *SBaremetalManager) RegisterBaremetal(ctx context.Context, userCred mcclient.TokenCredential, input *BmRegisterInput)
delay task
func (*SBaremetalManager) Stop ¶
func (m *SBaremetalManager) Stop()
type SBaremetalServer ¶
type SBaremetalServer struct {
// contains filtered or unexported fields
}
func (*SBaremetalServer) DoDeploy ¶
func (s *SBaremetalServer) DoDeploy(tool *disktool.SSHPartitionTool, term *ssh.Client, data jsonutils.JSONObject, isInit bool) (jsonutils.JSONObject, error)
func (*SBaremetalServer) DoDiskConfig ¶
func (s *SBaremetalServer) DoDiskConfig(term *ssh.Client) (*disktool.SSHPartitionTool, error)
func (*SBaremetalServer) DoDiskUnconfig ¶
func (s *SBaremetalServer) DoDiskUnconfig(term *ssh.Client) error
func (*SBaremetalServer) DoEraseDisk ¶
func (s *SBaremetalServer) DoEraseDisk(term *ssh.Client) error
func (*SBaremetalServer) DoPartitionDisk ¶
func (s *SBaremetalServer) DoPartitionDisk(tool *disktool.SSHPartitionTool, term *ssh.Client, disableImageCache bool) ([]*disktool.Partition, error)
func (*SBaremetalServer) DoRebuildRootDisk ¶
func (s *SBaremetalServer) DoRebuildRootDisk(tool *disktool.SSHPartitionTool, term *ssh.Client, disableImageCache bool) ([]*disktool.Partition, error)
func (*SBaremetalServer) GetDiskConfig ¶
func (s *SBaremetalServer) GetDiskConfig() ([]*api.BaremetalDiskConfig, error)
func (*SBaremetalServer) GetId ¶
func (server *SBaremetalServer) GetId() string
func (*SBaremetalServer) GetMetadata ¶
func (s *SBaremetalServer) GetMetadata() (*jsonutils.JSONDict, error)
func (*SBaremetalServer) GetName ¶
func (server *SBaremetalServer) GetName() string
func (*SBaremetalServer) GetNicByMac ¶
func (s *SBaremetalServer) GetNicByMac(mac net.HardwareAddr) *types.SNic
func (*SBaremetalServer) GetNics ¶
func (s *SBaremetalServer) GetNics() []types.SServerNic
func (*SBaremetalServer) GetRootDiskMatcher ¶
func (s *SBaremetalServer) GetRootDiskMatcher() (*api.BaremetalRootDiskMatcher, error)
func (*SBaremetalServer) GetRootTemplateId ¶
func (s *SBaremetalServer) GetRootTemplateId() string
func (*SBaremetalServer) NewConfigedSSHPartitionTool ¶
func (s *SBaremetalServer) NewConfigedSSHPartitionTool(term *ssh.Client) (*disktool.SSHPartitionTool, error)
func (*SBaremetalServer) RemoveDesc ¶
func (s *SBaremetalServer) RemoveDesc()
func (*SBaremetalServer) SaveDesc ¶
func (server *SBaremetalServer) SaveDesc(desc jsonutils.JSONObject) error
func (*SBaremetalServer) SyncPartitionSize ¶
func (s *SBaremetalServer) SyncPartitionSize(term *ssh.Client, parts []*disktool.Partition) ([]jsonutils.JSONObject, error)
type SBaseBaremetalCronJob ¶
type SBaseBaremetalCronJob struct {
// contains filtered or unexported fields
}
func (*SBaseBaremetalCronJob) NeedsToRun ¶
func (job *SBaseBaremetalCronJob) NeedsToRun(now time.Time) bool
func (*SBaseBaremetalCronJob) StartRun ¶
func (job *SBaseBaremetalCronJob) StartRun()
func (*SBaseBaremetalCronJob) StopRun ¶
func (job *SBaseBaremetalCronJob) StopRun()
type SLogFetchJob ¶
type SLogFetchJob struct {
SBaseBaremetalCronJob
}
func (*SLogFetchJob) Name ¶
func (job *SLogFetchJob) Name() string
type SSendMetricsJob ¶
type SSendMetricsJob struct {
SBaseBaremetalCronJob
}
func (*SSendMetricsJob) Name ¶
func (job *SSendMetricsJob) Name() string
type SStatusProbeJob ¶
type SStatusProbeJob struct {
SBaseBaremetalCronJob
}
func (*SStatusProbeJob) Name ¶
func (job *SStatusProbeJob) Name() string
Click to show internal directories.
Click to hide internal directories.