qmm.ab.archives module¶
-
class
qmm.ab.archives.ABCArchiveInstance(archive_name, file_list)[source]¶ Bases:
abc.ABC-
all_ignored¶ Value is True if all files of the archive are of status
FILE_IGNORED.
-
all_matching¶ Return True if all files in the archive matches on the drive.
-
ar_type= None¶
-
find(fmd)[source]¶ Return a FileMetadata object if managed by the archive.
The comparison is done on path and crc, not origin.
Parameters: fmd (FileMetadata) – a FileMetadata object
-
folders() → Generator[qmm.bucket.FileMetadata, None, None][source]¶ Yield folders present in the archive.
-
has_conflicts¶ Value is True if conflicts exists for this archive.
-
has_ignored¶ Value is True if a file of the archive is of status
FILE_IGNORED.
-
has_matched¶ Return True if a file of the archive is of status
FILE_MATCHED.
-
has_mismatched¶ Value is True if a file of the archive is of status
FILE_MISMATCHED.
-
has_missing¶ Value is True if a file of the archive is of status
FILE_MISSING.
-
ignored() → Iterable[qmm.bucket.FileMetadata][source]¶ Yield file metadata of ignored entries of the archive.
-
matched() → Generator[qmm.bucket.FileMetadata, None, None][source]¶ Yield file metadata of matched entries of the archive.
-
mismatched() → Generator[qmm.bucket.FileMetadata, None, None][source]¶ Yield file metadata of mismatched entries of the archive.
-
missing() → Generator[qmm.bucket.FileMetadata, None, None][source]¶ Yield file metadata of missing entries of the archive.
-
reset_status()[source]¶ Called whenever the state of an archive becomes dirty, which is also the default state.
Populate ‘self._meta’ with tuples containing the ‘FileMetadata’ object of each individual file alongside the current status of that file. The status can be either
FILE_MATCHED,FILE_MISMATCHED,FILE_IGNOREDorFILE_MISSING.
-
-
class
qmm.ab.archives.ArchiveType[source]¶ Bases:
enum.IntEnumAn enumeration.
-
FILE= 1¶
-
VIRTUAL= 2¶
-