feat: add archive_name param to CompressStep (singleArchiveName field)
This commit is contained in:
@@ -56,14 +56,15 @@ log = logging.getLogger("st_client")
|
||||
class CompressStep:
|
||||
"""Compress matching files to ZIP. Non-matching files pass through."""
|
||||
def __init__(self, filter="*", level="NORMAL", single_archive=False,
|
||||
on_failure="PROCEED"):
|
||||
archive_name=None, on_failure="PROCEED"):
|
||||
self.filter = filter
|
||||
self.level = level
|
||||
self.single_archive = single_archive
|
||||
self.archive_name = archive_name # Required when single_archive=True
|
||||
self.on_failure = on_failure
|
||||
|
||||
def to_api(self):
|
||||
return {
|
||||
payload = {
|
||||
"type": "Compress",
|
||||
"status": "ENABLED",
|
||||
"conditionType": "ALWAYS",
|
||||
@@ -78,6 +79,9 @@ class CompressStep:
|
||||
"singleArchiveEnabled": self.single_archive,
|
||||
"zipPassword": "",
|
||||
}
|
||||
if self.single_archive and self.archive_name:
|
||||
payload["singleArchiveName"] = self.archive_name
|
||||
return payload
|
||||
|
||||
|
||||
class PgpEncryptStep:
|
||||
|
||||
Reference in New Issue
Block a user