Skip to content

Commit

Permalink
modifying unmanage cluster command in cleanAstra script
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Haigh <[email protected]>
  • Loading branch information
MichaelHaigh committed Jan 26, 2024
1 parent 304d9a0 commit 1773218
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/astra-cleanup/cleanAstra.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ def unmanageAllApps(apps):

def unmanageAllClusters(clusters):
for cluster in clusters["items"]:
print(f"Unmanaging cluster:\t{cluster['name']}")
runToolkitCmd(f"unmanage cluster {cluster['id']}")
if cluster["managedState"] == "managed":
print(f"Unmanaging cluster:\t{cluster['name']}")
runToolkitCmd(f"unmanage cluster {cluster['id']}", plaid_mode=False)


if __name__ == "__main__":
Expand Down

0 comments on commit 1773218

Please sign in to comment.