v24tov31

package
v0.0.0-...-110a53a Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check2_4

func Check2_4(cfg old.Config, fsMap map[string]string) error

Check2_4 returns if the config is translatable but does not do any translation. fsMap is a map from v2 filesystem names to the paths under which they should be mounted in v3.

func RemoveDuplicateFilesUnitsUsers

func RemoveDuplicateFilesUnitsUsers(cfg old.Config) (old.Config, error)

RemoveDuplicateFilesUnitsUsers is a helper function that removes duplicated files/units/users from spec v2 config, since neither spec v3 nor the translator function allow for duplicate file entries in the config. This functionality is not included in the Translate function and has some limitations, but may be useful in cases where configuration has to be sanitized before translation. For duplicates, it takes ordering into consideration by taking the file/unit contents from the slice with the highest index value, which is assumed to be the latest revision. Unit dropins are concat'ed, i.e. if no duplicate dropin of the same name exists it is added to the list of dropins of the deduplicated unit definition. The function will fail if a non-root filesystem is declared on any file. It will also fail if file appendices are encountered.

func Translate

func Translate(cfg old.Config, fsMap map[string]string) (types.Config, error)

Translate translates an Ignition spec v2.4 config to v3.1

Types

This section is empty.

Jump to

Keyboard shortcuts

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