Skip to content

Commit 679e797

Browse files
mikliapkovponomaryov
authored andcommitted
fix(manager): fix handler for list-type backup_bucket_location param
backup_bucket_location parameter in Manager locations property is whether str or list. Existing implementation supported only str type what is fixed here.
1 parent f6fb104 commit 679e797

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

mgmt_cli_test.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -637,11 +637,14 @@ def get_email_data(self):
637637
@cached_property
638638
def locations(self) -> list[str]:
639639
backend = self.params.get("backup_bucket_backend")
640-
641640
region = next(iter(self.params.region_names), '')
642-
buckets = self.params.get("backup_bucket_location").format(region=region)
643-
if not isinstance(buckets, list):
644-
buckets = buckets.split()
641+
bucket_locations = self.params.get("backup_bucket_location")
642+
643+
buckets = (
644+
[bucket.format(region=region) for bucket in bucket_locations]
645+
if isinstance(bucket_locations, list)
646+
else bucket_locations.format(region=region).split()
647+
)
645648

646649
# FIXME: Make it works with multiple locations or file a bug for scylla-manager.
647650
return [f"{backend}:{location}" for location in buckets[:1]]

0 commit comments

Comments
 (0)