github.com/containers/podman/v4@v4.9.4/pkg/machine/ignition_schema.go (about)

     1  //go:build amd64 || arm64
     2  // +build amd64 arm64
     3  
     4  package machine
     5  
     6  /*
     7  	This file was taken from https://github.com/coreos/ignition/blob/master/config/v3_2/types/schema.go in an effort to
     8  	use more of the core-os structs but not fully commit to bringing their api in.
     9  
    10  	// generated by "schematyper --package=types config/v3_2/schema/ignition.json -o config/v3_2/types/ignition_schema.go --root-type=Config" -- DO NOT EDIT
    11  */
    12  
    13  type Clevis struct {
    14  	Custom    *Custom `json:"custom,omitempty"`
    15  	Tang      []Tang  `json:"tang,omitempty"`
    16  	Threshold *int    `json:"threshold,omitempty"`
    17  	Tpm2      *bool   `json:"tpm2,omitempty"`
    18  }
    19  
    20  type Config struct {
    21  	Ignition Ignition `json:"ignition"`
    22  	Passwd   Passwd   `json:"passwd,omitempty"`
    23  	Storage  Storage  `json:"storage,omitempty"`
    24  	Systemd  Systemd  `json:"systemd,omitempty"`
    25  }
    26  
    27  type Custom struct {
    28  	Config       string `json:"config"`
    29  	NeedsNetwork *bool  `json:"needsNetwork,omitempty"`
    30  	Pin          string `json:"pin"`
    31  }
    32  
    33  type Device string
    34  
    35  type Directory struct {
    36  	Node
    37  	DirectoryEmbedded1
    38  }
    39  
    40  type DirectoryEmbedded1 struct {
    41  	Mode *int `json:"mode,omitempty"`
    42  }
    43  
    44  type Disk struct {
    45  	Device     string      `json:"device"`
    46  	Partitions []Partition `json:"partitions,omitempty"`
    47  	WipeTable  *bool       `json:"wipeTable,omitempty"`
    48  }
    49  
    50  type Dropin struct {
    51  	Contents *string `json:"contents,omitempty"`
    52  	Name     string  `json:"name"`
    53  }
    54  
    55  type File struct {
    56  	Node
    57  	FileEmbedded1
    58  }
    59  
    60  type FileEmbedded1 struct {
    61  	Append   []Resource `json:"append,omitempty"`
    62  	Contents Resource   `json:"contents,omitempty"`
    63  	Mode     *int       `json:"mode,omitempty"`
    64  }
    65  
    66  type Filesystem struct {
    67  	Device         string             `json:"device"`
    68  	Format         *string            `json:"format,omitempty"`
    69  	Label          *string            `json:"label,omitempty"`
    70  	MountOptions   []MountOption      `json:"mountOptions,omitempty"`
    71  	Options        []FilesystemOption `json:"options,omitempty"`
    72  	Path           *string            `json:"path,omitempty"`
    73  	UUID           *string            `json:"uuid,omitempty"`
    74  	WipeFilesystem *bool              `json:"wipeFilesystem,omitempty"`
    75  }
    76  
    77  type FilesystemOption string
    78  
    79  type Group string
    80  
    81  type HTTPHeader struct {
    82  	Name  string  `json:"name"`
    83  	Value *string `json:"value,omitempty"`
    84  }
    85  
    86  type HTTPHeaders []HTTPHeader
    87  
    88  type Ignition struct {
    89  	Config   IgnitionConfig `json:"config,omitempty"`
    90  	Proxy    Proxy          `json:"proxy,omitempty"`
    91  	Security Security       `json:"security,omitempty"`
    92  	Timeouts Timeouts       `json:"timeouts,omitempty"`
    93  	Version  string         `json:"version,omitempty"`
    94  }
    95  
    96  type IgnitionConfig struct {
    97  	Merge   []Resource `json:"merge,omitempty"`
    98  	Replace Resource   `json:"replace,omitempty"`
    99  }
   100  
   101  type Link struct {
   102  	Node
   103  	LinkEmbedded1
   104  }
   105  
   106  type LinkEmbedded1 struct {
   107  	Hard   *bool  `json:"hard,omitempty"`
   108  	Target string `json:"target"`
   109  }
   110  
   111  type Luks struct {
   112  	Clevis     *Clevis      `json:"clevis,omitempty"`
   113  	Device     *string      `json:"device,omitempty"`
   114  	KeyFile    Resource     `json:"keyFile,omitempty"`
   115  	Label      *string      `json:"label,omitempty"`
   116  	Name       string       `json:"name"`
   117  	Options    []LuksOption `json:"options,omitempty"`
   118  	UUID       *string      `json:"uuid,omitempty"`
   119  	WipeVolume *bool        `json:"wipeVolume,omitempty"`
   120  }
   121  
   122  type LuksOption string
   123  
   124  type MountOption string
   125  
   126  type NoProxyItem string
   127  
   128  type Node struct {
   129  	Group     NodeGroup `json:"group,omitempty"`
   130  	Overwrite *bool     `json:"overwrite,omitempty"`
   131  	Path      string    `json:"path"`
   132  	User      NodeUser  `json:"user,omitempty"`
   133  }
   134  
   135  type NodeGroup struct {
   136  	ID   *int    `json:"id,omitempty"`
   137  	Name *string `json:"name,omitempty"`
   138  }
   139  
   140  type NodeUser struct {
   141  	ID   *int    `json:"id,omitempty"`
   142  	Name *string `json:"name,omitempty"`
   143  }
   144  
   145  type Partition struct {
   146  	GUID               *string `json:"guid,omitempty"`
   147  	Label              *string `json:"label,omitempty"`
   148  	Number             int     `json:"number,omitempty"`
   149  	Resize             *bool   `json:"resize,omitempty"`
   150  	ShouldExist        *bool   `json:"shouldExist,omitempty"`
   151  	SizeMiB            *int    `json:"sizeMiB,omitempty"`
   152  	StartMiB           *int    `json:"startMiB,omitempty"`
   153  	TypeGUID           *string `json:"typeGuid,omitempty"`
   154  	WipePartitionEntry *bool   `json:"wipePartitionEntry,omitempty"`
   155  }
   156  
   157  type Passwd struct {
   158  	Groups []PasswdGroup `json:"groups,omitempty"`
   159  	Users  []PasswdUser  `json:"users,omitempty"`
   160  }
   161  
   162  type PasswdGroup struct {
   163  	Gid          *int    `json:"gid,omitempty"`
   164  	Name         string  `json:"name"`
   165  	PasswordHash *string `json:"passwordHash,omitempty"`
   166  	ShouldExist  *bool   `json:"shouldExist,omitempty"`
   167  	System       *bool   `json:"system,omitempty"`
   168  }
   169  
   170  type PasswdUser struct {
   171  	Gecos             *string            `json:"gecos,omitempty"`
   172  	Groups            []Group            `json:"groups,omitempty"`
   173  	HomeDir           *string            `json:"homeDir,omitempty"`
   174  	Name              string             `json:"name"`
   175  	NoCreateHome      *bool              `json:"noCreateHome,omitempty"`
   176  	NoLogInit         *bool              `json:"noLogInit,omitempty"`
   177  	NoUserGroup       *bool              `json:"noUserGroup,omitempty"`
   178  	PasswordHash      *string            `json:"passwordHash,omitempty"`
   179  	PrimaryGroup      *string            `json:"primaryGroup,omitempty"`
   180  	SSHAuthorizedKeys []SSHAuthorizedKey `json:"sshAuthorizedKeys,omitempty"`
   181  	Shell             *string            `json:"shell,omitempty"`
   182  	ShouldExist       *bool              `json:"shouldExist,omitempty"`
   183  	System            *bool              `json:"system,omitempty"`
   184  	UID               *int               `json:"uid,omitempty"`
   185  }
   186  
   187  type Proxy struct {
   188  	HTTPProxy  *string       `json:"httpProxy,omitempty"`
   189  	HTTPSProxy *string       `json:"httpsProxy,omitempty"`
   190  	NoProxy    []NoProxyItem `json:"noProxy,omitempty"`
   191  }
   192  
   193  type Raid struct {
   194  	Devices []Device     `json:"devices"`
   195  	Level   string       `json:"level"`
   196  	Name    string       `json:"name"`
   197  	Options []RaidOption `json:"options,omitempty"`
   198  	Spares  *int         `json:"spares,omitempty"`
   199  }
   200  
   201  type RaidOption string
   202  
   203  type Resource struct {
   204  	Compression  *string      `json:"compression,omitempty"`
   205  	HTTPHeaders  HTTPHeaders  `json:"httpHeaders,omitempty"`
   206  	Source       *string      `json:"source,omitempty"`
   207  	Verification Verification `json:"verification,omitempty"`
   208  }
   209  
   210  type SSHAuthorizedKey string
   211  
   212  type Security struct {
   213  	TLS TLS `json:"tls,omitempty"`
   214  }
   215  
   216  type Storage struct {
   217  	Directories []Directory  `json:"directories,omitempty"`
   218  	Disks       []Disk       `json:"disks,omitempty"`
   219  	Files       []File       `json:"files,omitempty"`
   220  	Filesystems []Filesystem `json:"filesystems,omitempty"`
   221  	Links       []Link       `json:"links,omitempty"`
   222  	Luks        []Luks       `json:"luks,omitempty"`
   223  	Raid        []Raid       `json:"raid,omitempty"`
   224  }
   225  
   226  type Systemd struct {
   227  	Units []Unit `json:"units,omitempty"`
   228  }
   229  
   230  type TLS struct {
   231  	CertificateAuthorities []Resource `json:"certificateAuthorities,omitempty"`
   232  }
   233  
   234  type Tang struct {
   235  	Thumbprint *string `json:"thumbprint,omitempty"`
   236  	URL        string  `json:"url,omitempty"`
   237  }
   238  
   239  type Timeouts struct {
   240  	HTTPResponseHeaders *int `json:"httpResponseHeaders,omitempty"`
   241  	HTTPTotal           *int `json:"httpTotal,omitempty"`
   242  }
   243  
   244  type Unit struct {
   245  	Contents *string  `json:"contents,omitempty"`
   246  	Dropins  []Dropin `json:"dropins,omitempty"`
   247  	Enabled  *bool    `json:"enabled,omitempty"`
   248  	Mask     *bool    `json:"mask,omitempty"`
   249  	Name     string   `json:"name"`
   250  }
   251  
   252  type Verification struct {
   253  	Hash *string `json:"hash,omitempty"`
   254  }