os

package
v0.0.0-...-73e0568 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package os is a generated GoMock package.

Index

Constants

View Source
const (
	GreenbootFailScript = `` /* 284-byte string literal not displayed */

	GreenbootHealthCheckScript = `` /* 888-byte string literal not displayed */

)
View Source
const (
	UnknownOsImageId                 = "unknown"
	GreenbootHealthCheckFileName     = "/etc/greenboot/check/required.d/greenboot-health-check.sh"
	GreenbooFailFileName             = "/etc/greenboot/red.d/bootfail.sh"
	TimeoutToGracefulRebootInSeconds = 10
	EdgeConfFileName                 = "/etc/ostree/remotes.d/edge.conf"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployments

type Deployments struct {
	Checksum  string `json:"checksum"`
	Timestamp int    `json:"timestamp"`
	Booted    bool   `json:"booted"`
}

type MockOsExecCommands

type MockOsExecCommands struct {
	// contains filtered or unexported fields
}

MockOsExecCommands is a mock of OsExecCommands interface.

func NewMockOsExecCommands

func NewMockOsExecCommands(ctrl *gomock.Controller) *MockOsExecCommands

NewMockOsExecCommands creates a new mock instance.

func (*MockOsExecCommands) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockOsExecCommands) EnsureScriptExists

func (m *MockOsExecCommands) EnsureScriptExists(arg0, arg1 string) error

EnsureScriptExists mocks base method.

func (*MockOsExecCommands) IsRpmOstreeAvailable

func (m *MockOsExecCommands) IsRpmOstreeAvailable() bool

IsRpmOstreeAvailable mocks base method.

func (*MockOsExecCommands) RpmOstreeStatus

func (m *MockOsExecCommands) RpmOstreeStatus() ([]byte, error)

RpmOstreeStatus mocks base method.

func (*MockOsExecCommands) RpmOstreeUpdatePreview

func (m *MockOsExecCommands) RpmOstreeUpdatePreview() ([]byte, error)

RpmOstreeUpdatePreview mocks base method.

func (*MockOsExecCommands) RpmOstreeUpgrade

func (m *MockOsExecCommands) RpmOstreeUpgrade() error

RpmOstreeUpgrade mocks base method.

func (*MockOsExecCommands) SystemReboot

func (m *MockOsExecCommands) SystemReboot() error

SystemReboot mocks base method.

func (*MockOsExecCommands) UpdateUrlInEdgeRemote

func (m *MockOsExecCommands) UpdateUrlInEdgeRemote(arg0, arg1 string) error

UpdateUrlInEdgeRemote mocks base method.

type MockOsExecCommandsMockRecorder

type MockOsExecCommandsMockRecorder struct {
	// contains filtered or unexported fields
}

MockOsExecCommandsMockRecorder is the mock recorder for MockOsExecCommands.

func (*MockOsExecCommandsMockRecorder) EnsureScriptExists

func (mr *MockOsExecCommandsMockRecorder) EnsureScriptExists(arg0, arg1 interface{}) *gomock.Call

EnsureScriptExists indicates an expected call of EnsureScriptExists.

func (*MockOsExecCommandsMockRecorder) IsRpmOstreeAvailable

func (mr *MockOsExecCommandsMockRecorder) IsRpmOstreeAvailable() *gomock.Call

IsRpmOstreeAvailable indicates an expected call of IsRpmOstreeAvailable.

func (*MockOsExecCommandsMockRecorder) RpmOstreeStatus

func (mr *MockOsExecCommandsMockRecorder) RpmOstreeStatus() *gomock.Call

RpmOstreeStatus indicates an expected call of RpmOstreeStatus.

func (*MockOsExecCommandsMockRecorder) RpmOstreeUpdatePreview

func (mr *MockOsExecCommandsMockRecorder) RpmOstreeUpdatePreview() *gomock.Call

RpmOstreeUpdatePreview indicates an expected call of RpmOstreeUpdatePreview.

func (*MockOsExecCommandsMockRecorder) RpmOstreeUpgrade

func (mr *MockOsExecCommandsMockRecorder) RpmOstreeUpgrade() *gomock.Call

RpmOstreeUpgrade indicates an expected call of RpmOstreeUpgrade.

func (*MockOsExecCommandsMockRecorder) SystemReboot

func (mr *MockOsExecCommandsMockRecorder) SystemReboot() *gomock.Call

SystemReboot indicates an expected call of SystemReboot.

func (*MockOsExecCommandsMockRecorder) UpdateUrlInEdgeRemote

func (mr *MockOsExecCommandsMockRecorder) UpdateUrlInEdgeRemote(arg0, arg1 interface{}) *gomock.Call

UpdateUrlInEdgeRemote indicates an expected call of UpdateUrlInEdgeRemote.

type OS

type OS struct {
	AutomaticallyUpgrade            bool
	OsCommit                        string
	RequestedOsCommit               string
	HostedObjectsURL                string
	LastUpgradeStatus               string
	LastUpgradeTime                 string
	GracefulRebootChannel           chan struct{}
	GracefulRebootCompletionChannel chan struct{}

	Enabled bool
	// contains filtered or unexported fields
}

func NewOS

func NewOS(gracefulRebootChannel chan struct{}, osExecCommands OsExecCommands) *OS

func (*OS) GetUpgradeStatus

func (o *OS) GetUpgradeStatus() *models.UpgradeStatus

func (*OS) Init

func (o *OS) Init(config models.DeviceConfigurationMessage) error

func (*OS) Update

func (o *OS) Update(configuration models.DeviceConfigurationMessage) error

type OsExecCommands

type OsExecCommands interface {
	IsRpmOstreeAvailable() bool
	RpmOstreeStatus() ([]byte, error)
	RpmOstreeUpdatePreview() ([]byte, error)
	RpmOstreeUpgrade() error
	SystemReboot() error
	EnsureScriptExists(fileName string, script string) error
	UpdateUrlInEdgeRemote(newURL string, remoteFileName string) error
}

func NewOsExecCommands

func NewOsExecCommands() OsExecCommands

type StatusStruct

type StatusStruct struct {
	Deployments []*Deployments `json:"deployments"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL