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:
|
class CompressStep:
|
||||||
"""Compress matching files to ZIP. Non-matching files pass through."""
|
"""Compress matching files to ZIP. Non-matching files pass through."""
|
||||||
def __init__(self, filter="*", level="NORMAL", single_archive=False,
|
def __init__(self, filter="*", level="NORMAL", single_archive=False,
|
||||||
on_failure="PROCEED"):
|
archive_name=None, on_failure="PROCEED"):
|
||||||
self.filter = filter
|
self.filter = filter
|
||||||
self.level = level
|
self.level = level
|
||||||
self.single_archive = single_archive
|
self.single_archive = single_archive
|
||||||
|
self.archive_name = archive_name # Required when single_archive=True
|
||||||
self.on_failure = on_failure
|
self.on_failure = on_failure
|
||||||
|
|
||||||
def to_api(self):
|
def to_api(self):
|
||||||
return {
|
payload = {
|
||||||
"type": "Compress",
|
"type": "Compress",
|
||||||
"status": "ENABLED",
|
"status": "ENABLED",
|
||||||
"conditionType": "ALWAYS",
|
"conditionType": "ALWAYS",
|
||||||
@@ -78,6 +79,9 @@ class CompressStep:
|
|||||||
"singleArchiveEnabled": self.single_archive,
|
"singleArchiveEnabled": self.single_archive,
|
||||||
"zipPassword": "",
|
"zipPassword": "",
|
||||||
}
|
}
|
||||||
|
if self.single_archive and self.archive_name:
|
||||||
|
payload["singleArchiveName"] = self.archive_name
|
||||||
|
return payload
|
||||||
|
|
||||||
|
|
||||||
class PgpEncryptStep:
|
class PgpEncryptStep:
|
||||||
|
|||||||
Reference in New Issue
Block a user