Skip to content

Commit

Permalink
Rename to maybe_put_hana_classic_architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Jul 10, 2024
1 parent 78d6bcb commit c64c876
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ defmodule Trento.Discovery.Payloads.Cluster.ClusterDiscoveryPayload do
defp enrich_cluster_and_hana_architecture_types(attrs, nil) do
attrs
|> Map.put("cluster_type", parse_cluster_type(attrs))
|> put_hana_architecture
|> maybe_put_hana_classic_architecture
end

defp parse_cluster_type(%{"crmmon" => %{"clones" => nil, "groups" => nil}}),
Expand Down Expand Up @@ -133,11 +133,11 @@ defmodule Trento.Discovery.Payloads.Cluster.ClusterDiscoveryPayload do

defp do_detect_cluster_type(_), do: ClusterType.unknown()

defp put_hana_architecture(%{"cluster_type" => type} = attrs)
defp maybe_put_hana_classic_architecture(%{"cluster_type" => type} = attrs)
when type in [ClusterType.hana_scale_up(), ClusterType.hana_scale_out()],
do: Map.put(attrs, "hana_architecture_type", HanaArchitectureType.classic())

defp put_hana_architecture(attrs), do: attrs
defp maybe_put_hana_classic_architecture(attrs), do: attrs

defp enrich_cluster_sid(%{"cluster_type" => ClusterType.unknown()} = attrs) do
attrs
Expand Down

0 comments on commit c64c876

Please sign in to comment.