Documentation ¶
Index ¶
- Constants
- func GetDistro(n *Node) error
- type Distro
- type HostSpec
- func (hs *HostSpec) AddLabels(labels ...string) error
- func (hs *HostSpec) GetAddr() string
- func (hs *HostSpec) GetHostName() string
- func (hs *HostSpec) GetLabels() []string
- func (hs *HostSpec) GetServiceType() string
- func (hs *HostSpec) GetStatus() string
- func (hs *HostSpec) MakeYmlFile(yamlWrapper wrapper.YamlInterface, ioUtilWrapper wrapper.IoUtilInterface, ...) error
- func (hs *HostSpec) SetAddr(addr string) error
- func (hs *HostSpec) SetHostName(hostName string) error
- func (hs *HostSpec) SetLabels(labels []string) error
- func (hs *HostSpec) SetServiceType() error
- func (hs *HostSpec) SetStatus(status string) error
- type Node
- func (n *Node) GetHostSpec() HostSpec
- func (n *Node) GetOs() OS
- func (n *Node) GetUserID() string
- func (n *Node) GetUserPw() string
- func (n *Node) RunSSHCmd(sshWrapper wrapper.SSHInterface, cmdQuery string) (bytes.Buffer, error)
- func (n *Node) RunScpCmd(exec wrapper.ExecInterface, srcFile, destFile string, role Role) (bytes.Buffer, error)
- func (n *Node) SetHostSpec(hostSpec *HostSpec) error
- func (n *Node) SetOs(name Distro, packager Packager, version float64) error
- func (n *Node) SetUserID(userID string) error
- func (n *Node) SetUserPw(userPw string) error
- type OS
- type Packager
- type Role
Constants ¶
View Source
const ( // HostSpecServiceType indicates host service of ceph spec yaml HostSpecServiceType = "host" // SSHCmdTimeout defines max delay time for SSH connection SSHCmdTimeout = 20 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HostSpec ¶
type HostSpec struct { // ServiceType indicates service_type field ServiceType string `yaml:"service_type"` // use const var // Addr indicates addr field Addr string `yaml:"addr"` // HostName indicates hostname field HostName string `yaml:"hostname"` // Labels indicates labels field Labels []string `yaml:"labels,omitempty"` // Status indicates status field Status string `yaml:"status,omitempty"` }
HostSpec is struct to define ceph host spec of ceph spec yaml
func (*HostSpec) GetHostName ¶
GetHostName gets value of HostName
func (*HostSpec) GetServiceType ¶
GetServiceType gets HostSpecServiceTypee
func (*HostSpec) MakeYmlFile ¶
func (hs *HostSpec) MakeYmlFile(yamlWrapper wrapper.YamlInterface, ioUtilWrapper wrapper.IoUtilInterface, fileName string) error
MakeYmlFile creates ceph host service file using HostSpec
func (*HostSpec) SetHostName ¶
SetHostName sets HostName to value
func (*HostSpec) SetServiceType ¶
SetServiceType sets ServiceType to value
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node contains node info to deploy ceph
func NewNodesFromCephCr ¶
func NewNodesFromCephCr(cephSpec hypersdsv1alpha1.CephClusterSpec) ([]*Node, error)
NewNodesFromCephCr reads node information from cephclusterspec and creates Node list
func (*Node) RunScpCmd ¶
func (n *Node) RunScpCmd(exec wrapper.ExecInterface, srcFile, destFile string, role Role) (bytes.Buffer, error)
RunScpCmd executes file copy between source node and destination node using scp
func (*Node) SetHostSpec ¶
SetHostSpec sets hostSpec to value
Click to show internal directories.
Click to hide internal directories.