Skip to content

Commit

Permalink
fix variable override for storing IBM cloud buckets
Browse files Browse the repository at this point in the history
Signed-off-by: vavuthu <[email protected]>
  • Loading branch information
vavuthu committed Jan 7, 2025
1 parent e865d5e commit 89e52e7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ocs_ci/utility/ibmcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -1337,15 +1337,19 @@ def delete_bucket(self, bucket_name):
def get_buckets(self):
"""
Fetches the buckets
Returns:
list: List of buckets
"""
buckets = []
bucket_list = []
logger.info("Retrieving list of buckets")
try:
buckets = self.cos_client.list_buckets()
for bucket in buckets["Buckets"]:
buckets.append(bucket["Name"])
bucket_list.append(bucket["Name"])
except ClientError as ce:
logger.error(f"CLIENT ERROR: {ce}")
except Exception as e:
logger.error(f"Unable to retrieve list buckets: {e}")
return buckets
return bucket_list

0 comments on commit 89e52e7

Please sign in to comment.