Skip to content

Commit 1c6ffd3

Browse files
committed
do not send not yet supported 'delete' action for multiple clusters
1 parent c3ddff6 commit 1c6ffd3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

verda/clusters/_clusters.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,11 @@ def action(self, id_list: list[str] | str, action: str) -> None:
208208
if action != Actions.DELETE:
209209
raise ValueError(f'Invalid action: {action}. Only DELETE is supported.')
210210

211+
# TODO(shamrin) change public API to support `delete`
212+
action = 'discontinue'
213+
211214
if isinstance(id_list, str):
212-
payload = {'actions': [{'id': id_list, 'action': 'discontinue'}]}
215+
payload = {'actions': [{'id': id_list, 'action': action}]}
213216
else:
214217
payload = {'actions': [{'id': id, 'action': action} for id in id_list]}
215218

0 commit comments

Comments
 (0)