Add transformer for container roots

This change renames the root transformer to indicate that it
operates on host paths and adds a container root transformer for
explicitly transforming container roots.

The transform.NewRootTransformer constructor still exists, but has
been marked as deprecated.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2023-11-27 10:52:04 +01:00
parent aa72dcde97
commit 879cc99aac
11 changed files with 811 additions and 127 deletions

View File

@@ -104,7 +104,7 @@ func (m command) run(c *cli.Context, opts *options) error {
return fmt.Errorf("failed to load CDI specification: %w", err)
}
err = transform.NewRootTransformer(
err = transform.NewHostRootTransformer(
opts.from,
opts.to,
).Transform(spec.Raw())