nodes

package
v0.0.0-...-9cb1f83 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GzipFile

func GzipFile(path string) ([]byte, error)

Gzips a file

func PackDirectoryAsISO

func PackDirectoryAsISO(path string) ([]byte, error)

Packs a directory into a gzipped ISO image

Types

type ConfigDrive

type ConfigDrive struct {
	UserData       UserDataBuilder        `json:"user_data"`
	MetaData       map[string]interface{} `json:"meta_data"`
	NetworkData    map[string]interface{} `json:"network_data"`
	Version        string                 `json:"-"`
	BuildDirectory string                 `json:"-"`
}

A ConfigDrive struct will be used to create a base64-encoded, gzipped ISO9660 image for use with Ironic.

func (ConfigDrive) ToConfigDrive

func (configDrive ConfigDrive) ToConfigDrive() (string, error)

Writes out the ConfigDrive struct to a directory structure, and then packs it as a base64-encoded gzipped ISO9660 image.

func (ConfigDrive) ToDirectory

func (configDrive ConfigDrive) ToDirectory() (string, error)

Writes out a ConfigDrive to a temporary directory, and returns the path

type ConfigDriveBuilder

type ConfigDriveBuilder interface {
	ToConfigDrive() (string, error)
}

type UserDataBuilder

type UserDataBuilder interface {
	ToUserData() ([]byte, error)
}

Interface to let us specify a raw string, or a map for the user data

type UserDataMap

type UserDataMap map[string]interface{}

func (UserDataMap) ToUserData

func (data UserDataMap) ToUserData() ([]byte, error)

Converts a UserDataMap to JSON-string

type UserDataString

type UserDataString string

func (UserDataString) ToUserData

func (data UserDataString) ToUserData() ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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