Skip to content

Commit

Permalink
fix: style
Browse files Browse the repository at this point in the history
  • Loading branch information
msekania committed Feb 19, 2024
1 parent 881f9af commit 24ecf8e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plugins/modules/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ class ClusterHostHTTPCodes:
200: (True, False, "Cluster host edited"),
412: (True, False, "eTag changed, because cluster host nodes were modified"),
}
modify = {200: (True, False, "Cluster host nodes modified"),}
modify = {
200: (True, False, "Cluster host nodes modified"),
}
delete = {204: (True, False, "Cluster host deleted")}


Expand Down Expand Up @@ -351,7 +353,10 @@ def _detect_changes(self):

desired_nodes = desired_attributes.get("nodes")

if len([el for el in current_nodes if el not in desired_nodes]) > 0 or len([el for el in desired_nodes if el not in current_nodes]) > 0:
if (
len([el for el in current_nodes if el not in desired_nodes]) > 0
or len([el for el in desired_nodes if el not in current_nodes]) > 0
):
changes.append("nodes")
else:
desired_attributes.pop("nodes")
Expand Down Expand Up @@ -512,14 +517,9 @@ def edit(self):
)

result_nodes = result_nodes._replace(
msg=result_nodes.msg
+ ". Nodes modified to: %s" % tmp.get("nodes")
msg=result_nodes.msg + ". Nodes modified to: %s" % tmp.get("nodes")
)

if not data.get("update_attributes"):
data["update_attributes"] = data.pop("attributes")


result = self._fetch(
code_mapping=ClusterHostHTTPCodes.edit,
endpoint=self._build_default_endpoint(),
Expand Down

0 comments on commit 24ecf8e

Please sign in to comment.