kiwi.utils Package¶
Submodules¶
kiwi.utils.checksum
Module¶
-
class
kiwi.utils.block.
BlockID
(device)[source]¶ Bases:
object
Get information from a block device
Parameters: device (str) – block device node name name -
get_blkid
(id_type)[source]¶ Retrieve information for specified metadata ID from block device
Parameters: id_type (string) – metadata ID, see man blkid for details Returns: ID of the block device Return type: str
-
get_filesystem
()[source]¶ Retrieve filesystem type from block device
Returns: filesystem type Return type: str
-
kiwi.utils.block
Module¶
-
class
kiwi.utils.checksum.
Checksum
(source_filename)[source]¶ Bases:
object
Manage checksum creation for files
Parameters: - source_filename (str) – source file name to build checksum for
- checksum_filename (str) – target file with checksum information
-
matches
(checksum, filename)[source]¶ Compare given checksum with reference checksum stored in the provided filename. If the checksum matches the method returns True, or False in case it does not match
Parameters: - checksum (str) – checksum string to compare
- filename (str) – filename containing checksum
Returns: True or False
Return type: bool
kiwi.utils.compress
Module¶
-
class
kiwi.utils.compress.
Compress
(source_filename, keep_source_on_compress=False)[source]¶ Bases:
object
File compression / decompression
Parameters: - keep_source (bool) – Request to keep the uncompressed source
- source_filename (str) – Source file name to compress
- supported_zipper (list) – List of supported compression tools
- compressed_filename (str) – Compressed file name path with compression suffix
- uncompressed_filename (str) – Uncompressed file name path
kiwi.utils.sync
Module¶
-
class
kiwi.utils.sync.
DataSync
(source_dir, target_dir)[source]¶ Bases:
object
Sync data from a source directory to a target directory using the rsync protocol
Parameters: - source_dir (str) – source directory path name
- target_dir (str) – target directory path name