v0_5

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clevis

type Clevis struct {
	Custom    ClevisCustom `yaml:"custom"`
	Tang      []Tang       `yaml:"tang"`
	Threshold *int         `yaml:"threshold"`
	Tpm2      *bool        `yaml:"tpm2"`
}

type ClevisCustom

type ClevisCustom struct {
	Config       *string `yaml:"config"`
	NeedsNetwork *bool   `yaml:"needs_network"`
	Pin          *string `yaml:"pin"`
}

type Config

type Config struct {
	Version         string          `yaml:"version"`
	Variant         string          `yaml:"variant"`
	Ignition        Ignition        `yaml:"ignition"`
	KernelArguments KernelArguments `yaml:"kernel_arguments"`
	Passwd          Passwd          `yaml:"passwd"`
	Storage         Storage         `yaml:"storage"`
	Systemd         Systemd         `yaml:"systemd"`
}

func (Config) ToIgn3_4Unvalidated

func (c Config) ToIgn3_4Unvalidated(options common.TranslateOptions) (types.Config, translate.TranslationSet, report.Report)

ToIgn3_4Unvalidated translates the config to an Ignition config. It also returns the set of translations it did so paths in the resultant config can be tracked back to their source in the source config. No config validation is performed on input or output.

type Device

type Device string

type Directory

type Directory struct {
	Group     NodeGroup `yaml:"group"`
	Overwrite *bool     `yaml:"overwrite"`
	Path      string    `yaml:"path"`
	User      NodeUser  `yaml:"user"`
	Mode      *int      `yaml:"mode"`
}

func (Directory) Validate

func (d Directory) Validate(c path.ContextPath) (r report.Report)

type Disk

type Disk struct {
	Device     string      `yaml:"device"`
	Partitions []Partition `yaml:"partitions"`
	WipeTable  *bool       `yaml:"wipe_table"`
}

type Dropin

type Dropin struct {
	Contents      *string `yaml:"contents"`
	ContentsLocal *string `yaml:"contents_local"`
	Name          string  `yaml:"name"`
}

func (Dropin) Validate

func (rs Dropin) Validate(c path.ContextPath) (r report.Report)

type File

type File struct {
	Group     NodeGroup  `yaml:"group"`
	Overwrite *bool      `yaml:"overwrite"`
	Path      string     `yaml:"path"`
	User      NodeUser   `yaml:"user"`
	Append    []Resource `yaml:"append"`
	Contents  Resource   `yaml:"contents"`
	Mode      *int       `yaml:"mode"`
}

func (File) Validate

func (f File) Validate(c path.ContextPath) (r report.Report)

type Filesystem

type Filesystem struct {
	Device         string   `yaml:"device"`
	Format         *string  `yaml:"format"`
	Label          *string  `yaml:"label"`
	MountOptions   []string `yaml:"mount_options"`
	Options        []string `yaml:"options"`
	Path           *string  `yaml:"path"`
	UUID           *string  `yaml:"uuid"`
	WipeFilesystem *bool    `yaml:"wipe_filesystem"`
	WithMountUnit  *bool    `yaml:"with_mount_unit" butane:"auto_skip"` // Added, not in Ignition spec
}

func (Filesystem) Validate

func (fs Filesystem) Validate(c path.ContextPath) (r report.Report)

type Group

type Group string

type HTTPHeader

type HTTPHeader struct {
	Name  string  `yaml:"name"`
	Value *string `yaml:"value"`
}

type HTTPHeaders

type HTTPHeaders []HTTPHeader

type Ignition

type Ignition struct {
	Config   IgnitionConfig `yaml:"config"`
	Proxy    Proxy          `yaml:"proxy"`
	Security Security       `yaml:"security"`
	Timeouts Timeouts       `yaml:"timeouts"`
}

type IgnitionConfig

type IgnitionConfig struct {
	Merge   []Resource `yaml:"merge"`
	Replace Resource   `yaml:"replace"`
}

type KernelArgument

type KernelArgument string

type KernelArguments

type KernelArguments struct {
	ShouldExist    []KernelArgument `yaml:"should_exist"`
	ShouldNotExist []KernelArgument `yaml:"should_not_exist"`
}
type Link struct {
	Group     NodeGroup `yaml:"group"`
	Overwrite *bool     `yaml:"overwrite"`
	Path      string    `yaml:"path"`
	User      NodeUser  `yaml:"user"`
	Hard      *bool     `yaml:"hard"`
	Target    *string   `yaml:"target"`
}

type Luks

type Luks struct {
	Clevis      Clevis   `yaml:"clevis"`
	Device      *string  `yaml:"device"`
	Discard     *bool    `yaml:"discard"`
	KeyFile     Resource `yaml:"key_file"`
	Label       *string  `yaml:"label"`
	Name        string   `yaml:"name"`
	OpenOptions []string `yaml:"open_options"`
	Options     []string `yaml:"options"`
	UUID        *string  `yaml:"uuid"`
	WipeVolume  *bool    `yaml:"wipe_volume"`
}

type NodeGroup

type NodeGroup struct {
	ID   *int    `yaml:"id"`
	Name *string `yaml:"name"`
}

type NodeUser

type NodeUser struct {
	ID   *int    `yaml:"id"`
	Name *string `yaml:"name"`
}

type Partition

type Partition struct {
	GUID               *string `yaml:"guid"`
	Label              *string `yaml:"label"`
	Number             int     `yaml:"number"`
	Resize             *bool   `yaml:"resize"`
	ShouldExist        *bool   `yaml:"should_exist"`
	SizeMiB            *int    `yaml:"size_mib"`
	StartMiB           *int    `yaml:"start_mib"`
	TypeGUID           *string `yaml:"type_guid"`
	WipePartitionEntry *bool   `yaml:"wipe_partition_entry"`
}

type Passwd

type Passwd struct {
	Groups []PasswdGroup `yaml:"groups"`
	Users  []PasswdUser  `yaml:"users"`
}

type PasswdGroup

type PasswdGroup struct {
	Gid          *int    `yaml:"gid"`
	Name         string  `yaml:"name"`
	PasswordHash *string `yaml:"password_hash"`
	ShouldExist  *bool   `yaml:"should_exist"`
	System       *bool   `yaml:"system"`
}

type PasswdUser

type PasswdUser struct {
	Gecos                  *string            `yaml:"gecos"`
	Groups                 []Group            `yaml:"groups"`
	HomeDir                *string            `yaml:"home_dir"`
	Name                   string             `yaml:"name"`
	NoCreateHome           *bool              `yaml:"no_create_home"`
	NoLogInit              *bool              `yaml:"no_log_init"`
	NoUserGroup            *bool              `yaml:"no_user_group"`
	PasswordHash           *string            `yaml:"password_hash"`
	PrimaryGroup           *string            `yaml:"primary_group"`
	ShouldExist            *bool              `yaml:"should_exist"`
	SSHAuthorizedKeys      []SSHAuthorizedKey `yaml:"ssh_authorized_keys"`
	SSHAuthorizedKeysLocal []string           `yaml:"ssh_authorized_keys_local"`
	Shell                  *string            `yaml:"shell"`
	System                 *bool              `yaml:"system"`
	UID                    *int               `yaml:"uid"`
}

type Proxy

type Proxy struct {
	HTTPProxy  *string  `yaml:"http_proxy"`
	HTTPSProxy *string  `yaml:"https_proxy"`
	NoProxy    []string `yaml:"no_proxy"`
}

type Raid

type Raid struct {
	Devices []Device `yaml:"devices"`
	Level   *string  `yaml:"level"`
	Name    string   `yaml:"name"`
	Options []string `yaml:"options"`
	Spares  *int     `yaml:"spares"`
}

type Resource

type Resource struct {
	Compression  *string      `yaml:"compression"`
	HTTPHeaders  HTTPHeaders  `yaml:"http_headers"`
	Source       *string      `yaml:"source"`
	Inline       *string      `yaml:"inline"` // Added, not in ignition spec
	Local        *string      `yaml:"local"`  // Added, not in ignition spec
	Verification Verification `yaml:"verification"`
}

func (Resource) Validate

func (rs Resource) Validate(c path.ContextPath) (r report.Report)

type SSHAuthorizedKey

type SSHAuthorizedKey string

type Security

type Security struct {
	TLS TLS `yaml:"tls"`
}

type Storage

type Storage struct {
	Directories []Directory  `yaml:"directories"`
	Disks       []Disk       `yaml:"disks"`
	Files       []File       `yaml:"files"`
	Filesystems []Filesystem `yaml:"filesystems"`
	Links       []Link       `yaml:"links"`
	Luks        []Luks       `yaml:"luks"`
	Raid        []Raid       `yaml:"raid"`
	Trees       []Tree       `yaml:"trees" butane:"auto_skip"` // Added, not in ignition spec
}

type Systemd

type Systemd struct {
	Units []Unit `yaml:"units"`
}

type TLS

type TLS struct {
	CertificateAuthorities []Resource `yaml:"certificate_authorities"`
}

type Tang

type Tang struct {
	Thumbprint    *string `yaml:"thumbprint"`
	URL           string  `yaml:"url"`
	Advertisement *string `yaml:"advertisement"`
}

type Timeouts

type Timeouts struct {
	HTTPResponseHeaders *int `yaml:"http_response_headers"`
	HTTPTotal           *int `yaml:"http_total"`
}

type Tree

type Tree struct {
	Local string  `yaml:"local"`
	Path  *string `yaml:"path"`
}

func (Tree) Validate

func (t Tree) Validate(c path.ContextPath) (r report.Report)

type Unit

type Unit struct {
	Contents      *string  `yaml:"contents"`
	ContentsLocal *string  `yaml:"contents_local"`
	Dropins       []Dropin `yaml:"dropins"`
	Enabled       *bool    `yaml:"enabled"`
	Mask          *bool    `yaml:"mask"`
	Name          string   `yaml:"name"`
}

func (Unit) Validate

func (rs Unit) Validate(c path.ContextPath) (r report.Report)

type Verification

type Verification struct {
	Hash *string `yaml:"hash"`
}

Jump to

Keyboard shortcuts

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