forked from tern-tools/tern
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
classes: Move get_untar_dir to ImageLayer
This is work towards tern-tools#948 OCI images on disk may be represented in different ways. As such the layer tarballs may exist at the root of the working directory rather than in their own path. This change allows alternative directory paths to be used based on the image layout. - Added a new property: image_layout to the ImageLayer class. The image_layout property will contain either "docker" or "oci" with the default being "oci" - Moved get_untar_dir from rootfs.py to be a method in the ImageLayer class. get_untar_dir will now return a directory path to the expected path where the layer's contents are untarred based on the image layout. Removed an unnecessary function in rootfs.py as a result. - Modified the mount_diff_layers to accept untarred directory paths instead of tar files. - Modified the function mount_overlay_fs in multi_layer.py to collect the directory paths instead of the tar file to pass to the mount_diff_layers function. - Added a new get_untar_dir test to the ImageLayer test suite. Signed-off-by: Nisha K <[email protected]>
- Loading branch information
Nisha K
committed
Dec 7, 2021
1 parent
5011db0
commit 18d221d
Showing
4 changed files
with
65 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters