Documentation
¶
Overview ¶
Package isoeditor is a generated GoMock package.
Package isoeditor is a generated GoMock package.
Package isoeditor is a generated GoMock package.
Package isoeditor is a generated GoMock package.
Package isoeditor is a generated GoMock package.
Index ¶
- Constants
- func Create(outPath string, workDir string, volumeLabel string) error
- func CreateMinimalISO(extractDir, volumeID, rootFSURL, arch, minimalISOPath string) error
- func Extract(isoPath string, workDir string) error
- func GetFileFromISO(isoPath, filePath string) (filesystem.File, error)
- func GetISO9660FileSystem(d *disk.Disk) (filesystem.FileSystem, error)
- func GetISOFileInfo(filePath, isoPath string) (int64, int64, error)
- func KargsFiles(isoPath string) ([]string, error)
- func KargsToStr(args []string) (string, error)
- func NewInitRamFSStreamReader(irfsPath string, ignitionContent *IgnitionContent) (overlay.OverlayReader, error)
- func NewInitRamFSStreamReaderFromISO(isoPath string, ignitionContent *IgnitionContent) (overlay.OverlayReader, error)
- func NewInitrdAddrsizeReader(iafsPath string, initrdFile overlay.OverlayReader) (*bytes.Reader, error)
- func NewInitrdAddrsizeReaderFromISO(isoPath string, initrdFile overlay.OverlayReader) (*bytes.Reader, error)
- func NewInitrdAddrsizeReaderFromStream(irfsReader io.ReadSeekCloser, initrdFile overlay.OverlayReader) (*bytes.Reader, error)
- func ReadFileFromISO(isoPath, filePath string) ([]byte, error)
- func StrToKargs(kargsStr string) ([]string, error)
- func VolumeIdentifier(isoPath string) (string, error)
- type BoundariesFinder
- type CommonExecuter
- type Editor
- type Executer
- type FileData
- type FileReader
- type IgnitionContent
- type ImageReader
- type MockEditor
- type MockEditorMockRecorder
- type MockExecuter
- type MockExecuterMockRecorder
- type MockNmstateHandler
- type MockNmstateHandlerMockRecorder
- type MockNmstatectlExtractor
- type MockNmstatectlExtractorFactory
- type MockNmstatectlExtractorFactoryMockRecorder
- type MockNmstatectlExtractorMockRecorder
- type NmstateHandler
- type NmstatectlExtractor
- type NmstatectlExtractorFactory
- type StreamGeneratorFunc
Constants ¶
const ( AMD64CPUArchitecture = "amd64" X86CPUArchitecture = "x86_64" ARM64CPUArchitecture = "arm64" AARCH64CPUArchitecture = "aarch64" )
const ( RamDiskPaddingLength = uint64(1024 * 1024) // 1MB NmstatectlPathInRamdisk = "/usr/bin/nmstatectl" MinimalVersionForNmstatectl = "4.18.0-ec.0" RootfsImagePath = "images/pxeboot/rootfs.img" )
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create builds an iso file at outPath with the given volumeLabel using the contents of the working directory
func CreateMinimalISO ¶
CreateMinimalISO Creates the minimal iso by removing the rootfs and adding the url
func GetFileFromISO ¶
func GetFileFromISO(isoPath, filePath string) (filesystem.File, error)
Gets a readWrite seeker of a specific file from the ISO image
func GetISO9660FileSystem ¶
func GetISO9660FileSystem(d *disk.Disk) (filesystem.FileSystem, error)
Gets directly the ISO 9660 filesystem (equivalent to GetFileSystem(0)).
func KargsFiles ¶
func KargsToStr ¶
func NewInitRamFSStreamReader ¶
func NewInitRamFSStreamReader(irfsPath string, ignitionContent *IgnitionContent) (overlay.OverlayReader, error)
func NewInitRamFSStreamReaderFromISO ¶
func NewInitRamFSStreamReaderFromISO(isoPath string, ignitionContent *IgnitionContent) (overlay.OverlayReader, error)
func NewInitrdAddrsizeReader ¶
func NewInitrdAddrsizeReaderFromStream ¶
func NewInitrdAddrsizeReaderFromStream(irfsReader io.ReadSeekCloser, initrdFile overlay.OverlayReader) (*bytes.Reader, error)
func ReadFileFromISO ¶
Reads a whole specific file from the ISO image
func StrToKargs ¶
func VolumeIdentifier ¶
Types ¶
type CommonExecuter ¶
type CommonExecuter struct{}
type Editor ¶
type Editor interface {
CreateMinimalISOTemplate(fullISOPath, rootFSURL, arch, minimalISOPath, openshiftVersion, nmstatectlPath string) error
}
func NewEditor ¶
func NewEditor(dataDir string, nmstateHandler NmstateHandler) Editor
type FileData ¶
type FileData struct {
Filename string
Data io.ReadCloser
}
func NewIgnitionImageReader ¶
func NewIgnitionImageReader(isoPath string, ignitionContent *IgnitionContent) ([]FileData, error)
NewIgnitionImageReader returns the filename of the ignition image in the ISO, along with a stream of the ignition image with ignition content embedded. This can be used to overwrite the ignition image file of an ISO previously unpacked by Extract() in order to embed ignition data.
type FileReader ¶
type IgnitionContent ¶
type ImageReader ¶
type ImageReader = overlay.OverlayReader
func NewRHCOSStreamReader ¶
func NewRHCOSStreamReader(isoPath string, ignitionContent *IgnitionContent, ramdiskContent []byte, kargs []byte) (ImageReader, error)
type MockEditor ¶
type MockEditor struct {
// contains filtered or unexported fields
}
MockEditor is a mock of Editor interface.
func NewMockEditor ¶
func NewMockEditor(ctrl *gomock.Controller) *MockEditor
NewMockEditor creates a new mock instance.
func (*MockEditor) CreateMinimalISOTemplate ¶
func (m *MockEditor) CreateMinimalISOTemplate(fullISOPath, rootFSURL, arch, minimalISOPath, openshiftVersion, nmstatectlPath string) error
CreateMinimalISOTemplate mocks base method.
func (*MockEditor) EXPECT ¶
func (m *MockEditor) EXPECT() *MockEditorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockEditorMockRecorder ¶
type MockEditorMockRecorder struct {
// contains filtered or unexported fields
}
MockEditorMockRecorder is the mock recorder for MockEditor.
func (*MockEditorMockRecorder) CreateMinimalISOTemplate ¶
func (mr *MockEditorMockRecorder) CreateMinimalISOTemplate(fullISOPath, rootFSURL, arch, minimalISOPath, openshiftVersion, nmstatectlPath any) *gomock.Call
CreateMinimalISOTemplate indicates an expected call of CreateMinimalISOTemplate.
type MockExecuter ¶
type MockExecuter struct {
// contains filtered or unexported fields
}
MockExecuter is a mock of Executer interface.
func NewMockExecuter ¶
func NewMockExecuter(ctrl *gomock.Controller) *MockExecuter
NewMockExecuter creates a new mock instance.
func (*MockExecuter) EXPECT ¶
func (m *MockExecuter) EXPECT() *MockExecuterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockExecuterMockRecorder ¶
type MockExecuterMockRecorder struct {
// contains filtered or unexported fields
}
MockExecuterMockRecorder is the mock recorder for MockExecuter.
type MockNmstateHandler ¶
type MockNmstateHandler struct {
// contains filtered or unexported fields
}
MockNmstateHandler is a mock of NmstateHandler interface.
func NewMockNmstateHandler ¶
func NewMockNmstateHandler(ctrl *gomock.Controller) *MockNmstateHandler
NewMockNmstateHandler creates a new mock instance.
func (*MockNmstateHandler) BuildNmstateCpioArchive ¶
func (m *MockNmstateHandler) BuildNmstateCpioArchive(rootfsPath string) ([]byte, error)
BuildNmstateCpioArchive mocks base method.
func (*MockNmstateHandler) EXPECT ¶
func (m *MockNmstateHandler) EXPECT() *MockNmstateHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockNmstateHandlerMockRecorder ¶
type MockNmstateHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockNmstateHandlerMockRecorder is the mock recorder for MockNmstateHandler.
func (*MockNmstateHandlerMockRecorder) BuildNmstateCpioArchive ¶
func (mr *MockNmstateHandlerMockRecorder) BuildNmstateCpioArchive(rootfsPath any) *gomock.Call
BuildNmstateCpioArchive indicates an expected call of BuildNmstateCpioArchive.
type MockNmstatectlExtractor ¶
type MockNmstatectlExtractor struct {
// contains filtered or unexported fields
}
MockNmstatectlExtractor is a mock of NmstatectlExtractor interface.
func NewMockNmstatectlExtractor ¶
func NewMockNmstatectlExtractor(ctrl *gomock.Controller) *MockNmstatectlExtractor
NewMockNmstatectlExtractor creates a new mock instance.
func (*MockNmstatectlExtractor) EXPECT ¶
func (m *MockNmstatectlExtractor) EXPECT() *MockNmstatectlExtractorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockNmstatectlExtractor) ExtractNmstatectl ¶
func (m *MockNmstatectlExtractor) ExtractNmstatectl(nmstateDir string) (string, error)
ExtractNmstatectl mocks base method.
type MockNmstatectlExtractorFactory ¶
type MockNmstatectlExtractorFactory struct {
// contains filtered or unexported fields
}
MockNmstatectlExtractorFactory is a mock of NmstatectlExtractorFactory interface.
func NewMockNmstatectlExtractorFactory ¶
func NewMockNmstatectlExtractorFactory(ctrl *gomock.Controller) *MockNmstatectlExtractorFactory
NewMockNmstatectlExtractorFactory creates a new mock instance.
func (*MockNmstatectlExtractorFactory) CreateNmstatectlExtractor ¶
func (m *MockNmstatectlExtractorFactory) CreateNmstatectlExtractor(nmstateDir string) (NmstatectlExtractor, error)
CreateNmstatectlExtractor mocks base method.
func (*MockNmstatectlExtractorFactory) EXPECT ¶
func (m *MockNmstatectlExtractorFactory) EXPECT() *MockNmstatectlExtractorFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockNmstatectlExtractorFactoryMockRecorder ¶
type MockNmstatectlExtractorFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockNmstatectlExtractorFactoryMockRecorder is the mock recorder for MockNmstatectlExtractorFactory.
func (*MockNmstatectlExtractorFactoryMockRecorder) CreateNmstatectlExtractor ¶
func (mr *MockNmstatectlExtractorFactoryMockRecorder) CreateNmstatectlExtractor(nmstateDir any) *gomock.Call
CreateNmstatectlExtractor indicates an expected call of CreateNmstatectlExtractor.
type MockNmstatectlExtractorMockRecorder ¶
type MockNmstatectlExtractorMockRecorder struct {
// contains filtered or unexported fields
}
MockNmstatectlExtractorMockRecorder is the mock recorder for MockNmstatectlExtractor.
func (*MockNmstatectlExtractorMockRecorder) ExtractNmstatectl ¶
func (mr *MockNmstatectlExtractorMockRecorder) ExtractNmstatectl(nmstateDir any) *gomock.Call
ExtractNmstatectl indicates an expected call of ExtractNmstatectl.
type NmstateHandler ¶
func NewNmstateHandler ¶
func NewNmstateHandler(workDir string, executer Executer, nmstatectlExtractorFactory NmstatectlExtractorFactory) NmstateHandler
type NmstatectlExtractor ¶
type NmstatectlExtractorFactory ¶
type NmstatectlExtractorFactory interface {
CreateNmstatectlExtractor(nmstateDir string) (NmstatectlExtractor, error)
}
func NewNmstatectlExtractorFactory ¶
func NewNmstatectlExtractorFactory(executer Executer) NmstatectlExtractorFactory
type StreamGeneratorFunc ¶
type StreamGeneratorFunc func(isoPath string, ignitionContent *IgnitionContent, ramdiskContent, kargs []byte) (ImageReader, error)