reboot

package
v0.0.0-...-baa747b Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: reboot.go

Generated by this command:

mockgen -source=reboot.go -package=reboot -destination=mock_reboot.go

Package reboot is a generated GoMock package.

Index

Constants

View Source
const (
	PostPivotComponent                 = "postpivot"
	InstallationConfigurationComponent = "config"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IBUAutoRollbackConfig

type IBUAutoRollbackConfig struct {
	InitMonitorEnabled bool            `json:"monitor_enabled,omitempty"`
	InitMonitorTimeout int             `json:"monitor_timeout,omitempty"`
	EnabledComponents  map[string]bool `json:"enabled_components,omitempty"`
}

type MockRebootIntf

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

MockRebootIntf is a mock of RebootIntf interface.

func NewMockRebootIntf

func NewMockRebootIntf(ctrl *gomock.Controller) *MockRebootIntf

NewMockRebootIntf creates a new mock instance.

func (*MockRebootIntf) AutoRollbackIfEnabled

func (m *MockRebootIntf) AutoRollbackIfEnabled(component, msg string)

AutoRollbackIfEnabled mocks base method.

func (*MockRebootIntf) DisableInitMonitor

func (m *MockRebootIntf) DisableInitMonitor() error

DisableInitMonitor mocks base method.

func (*MockRebootIntf) EXPECT

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

func (*MockRebootIntf) InitiateRollback

func (m *MockRebootIntf) InitiateRollback(msg string) error

InitiateRollback mocks base method.

func (*MockRebootIntf) IsOrigStaterootBooted

func (m *MockRebootIntf) IsOrigStaterootBooted(ibu *v1alpha1.ImageBasedUpgrade) (bool, error)

IsOrigStaterootBooted mocks base method.

func (*MockRebootIntf) ReadIBUAutoRollbackConfigFile

func (m *MockRebootIntf) ReadIBUAutoRollbackConfigFile() (*IBUAutoRollbackConfig, error)

ReadIBUAutoRollbackConfigFile mocks base method.

func (*MockRebootIntf) RebootToNewStateRoot

func (m *MockRebootIntf) RebootToNewStateRoot(rationale string) error

RebootToNewStateRoot mocks base method.

func (*MockRebootIntf) WriteIBUAutoRollbackConfigFile

func (m *MockRebootIntf) WriteIBUAutoRollbackConfigFile(ibu *v1alpha1.ImageBasedUpgrade) error

WriteIBUAutoRollbackConfigFile mocks base method.

type MockRebootIntfMockRecorder

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

MockRebootIntfMockRecorder is the mock recorder for MockRebootIntf.

func (*MockRebootIntfMockRecorder) AutoRollbackIfEnabled

func (mr *MockRebootIntfMockRecorder) AutoRollbackIfEnabled(component, msg any) *gomock.Call

AutoRollbackIfEnabled indicates an expected call of AutoRollbackIfEnabled.

func (*MockRebootIntfMockRecorder) DisableInitMonitor

func (mr *MockRebootIntfMockRecorder) DisableInitMonitor() *gomock.Call

DisableInitMonitor indicates an expected call of DisableInitMonitor.

func (*MockRebootIntfMockRecorder) InitiateRollback

func (mr *MockRebootIntfMockRecorder) InitiateRollback(msg any) *gomock.Call

InitiateRollback indicates an expected call of InitiateRollback.

func (*MockRebootIntfMockRecorder) IsOrigStaterootBooted

func (mr *MockRebootIntfMockRecorder) IsOrigStaterootBooted(ibu any) *gomock.Call

IsOrigStaterootBooted indicates an expected call of IsOrigStaterootBooted.

func (*MockRebootIntfMockRecorder) ReadIBUAutoRollbackConfigFile

func (mr *MockRebootIntfMockRecorder) ReadIBUAutoRollbackConfigFile() *gomock.Call

ReadIBUAutoRollbackConfigFile indicates an expected call of ReadIBUAutoRollbackConfigFile.

func (*MockRebootIntfMockRecorder) RebootToNewStateRoot

func (mr *MockRebootIntfMockRecorder) RebootToNewStateRoot(rationale any) *gomock.Call

RebootToNewStateRoot indicates an expected call of RebootToNewStateRoot.

func (*MockRebootIntfMockRecorder) WriteIBUAutoRollbackConfigFile

func (mr *MockRebootIntfMockRecorder) WriteIBUAutoRollbackConfigFile(ibu any) *gomock.Call

WriteIBUAutoRollbackConfigFile indicates an expected call of WriteIBUAutoRollbackConfigFile.

type RebootClient

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

func (*RebootClient) AutoRollbackIfEnabled

func (c *RebootClient) AutoRollbackIfEnabled(component, msg string)

func (*RebootClient) DisableInitMonitor

func (c *RebootClient) DisableInitMonitor() error

func (*RebootClient) InitiateRollback

func (c *RebootClient) InitiateRollback(msg string) error

func (*RebootClient) IsOrigStaterootBooted

func (c *RebootClient) IsOrigStaterootBooted(ibu *v1alpha1.ImageBasedUpgrade) (bool, error)

func (*RebootClient) ReadIBUAutoRollbackConfigFile

func (c *RebootClient) ReadIBUAutoRollbackConfigFile() (*IBUAutoRollbackConfig, error)

func (*RebootClient) RebootToNewStateRoot

func (c *RebootClient) RebootToNewStateRoot(rationale string) error

func (*RebootClient) WriteIBUAutoRollbackConfigFile

func (c *RebootClient) WriteIBUAutoRollbackConfigFile(ibu *lcav1alpha1.ImageBasedUpgrade) error

type RebootIntf

type RebootIntf interface {
	WriteIBUAutoRollbackConfigFile(ibu *lcav1alpha1.ImageBasedUpgrade) error
	ReadIBUAutoRollbackConfigFile() (*IBUAutoRollbackConfig, error)
	DisableInitMonitor() error
	RebootToNewStateRoot(rationale string) error
	IsOrigStaterootBooted(ibu *v1alpha1.ImageBasedUpgrade) (bool, error)
	InitiateRollback(msg string) error
	AutoRollbackIfEnabled(component, msg string)
}

RebootIntf is an interface for LCA reboot and rollback commands.

func NewRebootClient

func NewRebootClient(log *logr.Logger,
	hostCommandsExecutor ops.Execute,
	rpmOstreeClient rpmostreeclient.IClient,
	ostreeClient ostreeclient.IClient,
	ops ops.Ops) RebootIntf

NewRebootClient creates and returns a RebootIntf interface for reboot and rollback commands

Jump to

Keyboard shortcuts

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