Documentation
¶
Index ¶
- Constants
- func DialWithDeadline(network string, addr string, config *ssh.ClientConfig, timeout bool) (*ssh.Client, error)
- type DiskLayout
- type PartitionEntry
- type SUT
- func (s *SUT) BootFrom() int
- func (s *SUT) ChangeBoot(b int) error
- func (s *SUT) ChangeBootOnce(b int) error
- func (s *SUT) Command(cmd string) (string, error)
- func (s *SUT) EjectCOSCD()
- func (s *SUT) EmptyDisk(disk string)
- func (s *SUT) EventuallyConnects(t ...int)
- func (s SUT) GatherAllLogs()
- func (s SUT) GatherLog(logPath string)
- func (s *SUT) GetArch() string
- func (s SUT) GetDiskLayout(disk string) DiskLayout
- func (s *SUT) GetOSRelease(ss string) string
- func (s *SUT) Reboot(t ...int)
- func (s *SUT) Reset()
- func (s *SUT) RestoreCOSCD()
- func (s *SUT) SendFile(src, dst, permission string) error
- func (s *SUT) SetCOSCDLocation()
- func (s *SUT) SquashFSRecovery() bool
Constants ¶
const ( Passive = 0 Active = iota Recovery = iota LiveCD = iota UnknownBoot = iota TimeoutRawDiskTest = 600 // Timeout to connect for recovery_raw_disk_test Ext2 = "ext2" Ext3 = "ext3" Ext4 = "ext4" )
Variables ¶
This section is empty.
Functions ¶
func DialWithDeadline ¶
func DialWithDeadline(network string, addr string, config *ssh.ClientConfig, timeout bool) (*ssh.Client, error)
DialWithDeadline Dials SSH with a deadline to avoid Read timeouts
Types ¶
type DiskLayout ¶
type DiskLayout struct {
BlockDevices []PartitionEntry `json:"blockdevices"`
}
DiskLayout is the struct that contains the disk output from lsblk
func (DiskLayout) GetPartition ¶
func (d DiskLayout) GetPartition(label string) (PartitionEntry, error)
type PartitionEntry ¶
type PartitionEntry struct { Label string `json:"label,omitempty"` Size int `json:"size,omitempty"` FsType string `json:"fstype,omitempty"` }
PartitionEntry represents a partition entry
type SUT ¶
type SUT struct { Host string Username string Password string Timeout int GreenRepo string TestVersion string CDLocation string }
func (*SUT) ChangeBoot ¶
func (*SUT) ChangeBootOnce ¶
func (*SUT) EjectCOSCD ¶
func (s *SUT) EjectCOSCD()
EjectCOSCD force removes the DVD so we can boot from disk directly on EFI VMs
func (*SUT) EmptyDisk ¶
EmptyDisk will try to trash the disk given so on reboot the disk is empty and we are forced to use the cd to boot used mainly for installer testing booting from iso
func (*SUT) EventuallyConnects ¶
func (SUT) GatherAllLogs ¶
func (s SUT) GatherAllLogs()
GatherAllLogs will try to gather as much info from the system as possible, including services, dmesg and os related info
func (SUT) GetDiskLayout ¶
func (s SUT) GetDiskLayout(disk string) DiskLayout
func (*SUT) GetOSRelease ¶
func (*SUT) Reset ¶
func (s *SUT) Reset()
Reset runs reboots cOS into Recovery and runs cos-reset. It will boot back the system from the Active partition afterwards
func (*SUT) RestoreCOSCD ¶
func (s *SUT) RestoreCOSCD()
RestoreCOSCD reattaches the cOS iso to the VM
func (*SUT) SetCOSCDLocation ¶
func (s *SUT) SetCOSCDLocation()
SetCOSCDLocation gets the location of the iso attached to the vbox vm and stores it for later remount
func (*SUT) SquashFSRecovery ¶
SquashFSRecovery returns true if we are in recovery mode and booting from squashfs