Skip to content

Commit 005d450

Browse files
authored
Merge pull request #862 from Pure-Storage-Ansible/podpatch_fix
Refactor pod promotion logic in purefa_pod.py
2 parents 821d0e0 + d47c1bf commit 005d450

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minor_changes:
2+
- purefa_pod - Fixed pydantic issue from lastest SDK version

plugins/modules/purefa_pod.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,12 +851,18 @@ def update_pod(module, array):
851851
api_version
852852
):
853853
res = array.patch_pods(
854+
pod=PodPatch(
855+
requested_promotion_state="promoted"
856+
),
854857
names=[module.params["name"]],
855858
context_names=[module.params["context"]],
856859
promote_from=undo_pod[0].name,
857860
)
858861
else:
859862
res = array.patch_pods(
863+
pod=PodPatch(
864+
requested_promotion_state="promoted"
865+
),
860866
names=[module.params["name"]],
861867
promote_from=undo_pod[0].name,
862868
)
@@ -865,12 +871,18 @@ def update_pod(module, array):
865871
api_version
866872
):
867873
res = array.patch_pods(
874+
pod=PodPatch(
875+
requested_promotion_state="promoted"
876+
),
868877
names=[module.params["name"]],
869878
context_names=[module.params["context"]],
870879
promote_from=undo_pod[-1].name,
871880
)
872881
else:
873882
res = array.patch_pods(
883+
pod=PodPatch(
884+
requested_promotion_state="promoted"
885+
),
874886
names=[module.params["name"]],
875887
promote_from=undo_pod[-1].name,
876888
)

0 commit comments

Comments
 (0)