From 2446e4c6b1353ed0ba94482de719bd83963fb6ec Mon Sep 17 00:00:00 2001 From: Xabier Arbulu Insausti Date: Thu, 3 Nov 2022 13:32:41 +0100 Subject: [PATCH] Use uuid format for id fields (#949) --- lib/trento/domain/cluster/commands/select_checks.ex | 2 +- lib/trento/domain/cluster/events/checks_selected.ex | 2 +- lib/trento/domain/cluster/events/cluster_details_updated.ex | 2 +- .../cluster/events/cluster_discovered_health_changed.ex | 2 +- lib/trento/domain/cluster/events/cluster_health_changed.ex | 2 +- lib/trento/domain/cluster/events/cluster_registered.ex | 2 +- lib/trento/domain/cluster/events/cluster_rolled_up.ex | 2 +- lib/trento/domain/cluster/events/host_added_to_cluster.ex | 4 ++-- .../domain/cluster/events/host_checks_execution_completed.ex | 4 ++-- lib/trento/domain/host/commands/update_heartbeat.ex | 2 +- .../sap_system/commands/register_application_instance.ex | 2 +- .../domain/sap_system/commands/register_database_instance.ex | 2 +- lib/trento/domain/sap_system/sap_system.ex | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/trento/domain/cluster/commands/select_checks.ex b/lib/trento/domain/cluster/commands/select_checks.ex index d191ead0ac..93741f952b 100644 --- a/lib/trento/domain/cluster/commands/select_checks.ex +++ b/lib/trento/domain/cluster/commands/select_checks.ex @@ -8,7 +8,7 @@ defmodule Trento.Domain.Commands.SelectChecks do use Trento.Command defcommand do - field :cluster_id, :string + field :cluster_id, Ecto.UUID field :checks, {:array, :string} end end diff --git a/lib/trento/domain/cluster/events/checks_selected.ex b/lib/trento/domain/cluster/events/checks_selected.ex index 24e258cd79..6fc16d1d44 100644 --- a/lib/trento/domain/cluster/events/checks_selected.ex +++ b/lib/trento/domain/cluster/events/checks_selected.ex @@ -6,7 +6,7 @@ defmodule Trento.Domain.Events.ChecksSelected do use Trento.Event defevent do - field :cluster_id, :string + field :cluster_id, Ecto.UUID field :checks, {:array, :string} end end diff --git a/lib/trento/domain/cluster/events/cluster_details_updated.ex b/lib/trento/domain/cluster/events/cluster_details_updated.ex index 9d618b6508..520c90ff28 100644 --- a/lib/trento/domain/cluster/events/cluster_details_updated.ex +++ b/lib/trento/domain/cluster/events/cluster_details_updated.ex @@ -11,7 +11,7 @@ defmodule Trento.Domain.Events.ClusterDetailsUpdated do alias Trento.Domain.HanaClusterDetails defevent do - field :cluster_id, :string + field :cluster_id, Ecto.UUID field :name, :string field :type, Ecto.Enum, values: ClusterType.values() field :sid, :string diff --git a/lib/trento/domain/cluster/events/cluster_discovered_health_changed.ex b/lib/trento/domain/cluster/events/cluster_discovered_health_changed.ex index e74d44de3b..5e2a2a1773 100644 --- a/lib/trento/domain/cluster/events/cluster_discovered_health_changed.ex +++ b/lib/trento/domain/cluster/events/cluster_discovered_health_changed.ex @@ -8,7 +8,7 @@ defmodule Trento.Domain.Events.ClusterDiscoveredHealthChanged do require Trento.Domain.Enums.Health, as: Health defevent do - field :cluster_id, :string + field :cluster_id, Ecto.UUID field :discovered_health, Ecto.Enum, values: Health.values() end end diff --git a/lib/trento/domain/cluster/events/cluster_health_changed.ex b/lib/trento/domain/cluster/events/cluster_health_changed.ex index 3c4fae1f4c..391fb4c868 100644 --- a/lib/trento/domain/cluster/events/cluster_health_changed.ex +++ b/lib/trento/domain/cluster/events/cluster_health_changed.ex @@ -8,7 +8,7 @@ defmodule Trento.Domain.Events.ClusterHealthChanged do require Trento.Domain.Enums.Health, as: Health defevent do - field :cluster_id, :string + field :cluster_id, Ecto.UUID field :health, Ecto.Enum, values: Health.values() end end diff --git a/lib/trento/domain/cluster/events/cluster_registered.ex b/lib/trento/domain/cluster/events/cluster_registered.ex index 9a2b616a57..48403216c0 100644 --- a/lib/trento/domain/cluster/events/cluster_registered.ex +++ b/lib/trento/domain/cluster/events/cluster_registered.ex @@ -12,7 +12,7 @@ defmodule Trento.Domain.Events.ClusterRegistered do alias Trento.Domain.HanaClusterDetails defevent do - field :cluster_id, :string + field :cluster_id, Ecto.UUID field :name, :string field :type, Ecto.Enum, values: ClusterType.values() field :sid, :string diff --git a/lib/trento/domain/cluster/events/cluster_rolled_up.ex b/lib/trento/domain/cluster/events/cluster_rolled_up.ex index 031f10c417..8b50549c08 100644 --- a/lib/trento/domain/cluster/events/cluster_rolled_up.ex +++ b/lib/trento/domain/cluster/events/cluster_rolled_up.ex @@ -15,7 +15,7 @@ defmodule Trento.Domain.Events.ClusterRolledUp do } defevent do - field :cluster_id, :string + field :cluster_id, Ecto.UUID field :name, :string field :type, Ecto.Enum, values: ClusterType.values() field :sid, :string diff --git a/lib/trento/domain/cluster/events/host_added_to_cluster.ex b/lib/trento/domain/cluster/events/host_added_to_cluster.ex index c569add802..626260dc72 100644 --- a/lib/trento/domain/cluster/events/host_added_to_cluster.ex +++ b/lib/trento/domain/cluster/events/host_added_to_cluster.ex @@ -6,7 +6,7 @@ defmodule Trento.Domain.Events.HostAddedToCluster do use Trento.Event defevent do - field :cluster_id, :string - field :host_id, :string + field :cluster_id, Ecto.UUID + field :host_id, Ecto.UUID end end diff --git a/lib/trento/domain/cluster/events/host_checks_execution_completed.ex b/lib/trento/domain/cluster/events/host_checks_execution_completed.ex index c6f420ea0c..fa9d56dba1 100644 --- a/lib/trento/domain/cluster/events/host_checks_execution_completed.ex +++ b/lib/trento/domain/cluster/events/host_checks_execution_completed.ex @@ -8,8 +8,8 @@ defmodule Trento.Domain.Events.HostChecksExecutionCompleted do alias Trento.Domain.CheckResult defevent do - field :cluster_id, :string - field :host_id, :string + field :cluster_id, Ecto.UUID + field :host_id, Ecto.UUID field :reachable, :boolean field :msg, :string diff --git a/lib/trento/domain/host/commands/update_heartbeat.ex b/lib/trento/domain/host/commands/update_heartbeat.ex index 21bbf28853..748a3aa6c4 100644 --- a/lib/trento/domain/host/commands/update_heartbeat.ex +++ b/lib/trento/domain/host/commands/update_heartbeat.ex @@ -8,7 +8,7 @@ defmodule Trento.Domain.Commands.UpdateHeartbeat do use Trento.Command defcommand do - field :host_id, :string + field :host_id, Ecto.UUID field :heartbeat, Ecto.Enum, values: [:passing, :critical] end end diff --git a/lib/trento/domain/sap_system/commands/register_application_instance.ex b/lib/trento/domain/sap_system/commands/register_application_instance.ex index c77a3c7db7..c074467023 100644 --- a/lib/trento/domain/sap_system/commands/register_application_instance.ex +++ b/lib/trento/domain/sap_system/commands/register_application_instance.ex @@ -29,7 +29,7 @@ defmodule Trento.Domain.Commands.RegisterApplicationInstance do field :sid, :string field :db_host, :string field :tenant, :string - field :host_id, :string + field :host_id, Ecto.UUID field :instance_number, :string field :instance_hostname, :string field :features, :string diff --git a/lib/trento/domain/sap_system/commands/register_database_instance.ex b/lib/trento/domain/sap_system/commands/register_database_instance.ex index 6640ae9a9e..bf4d9fd0a8 100644 --- a/lib/trento/domain/sap_system/commands/register_database_instance.ex +++ b/lib/trento/domain/sap_system/commands/register_database_instance.ex @@ -23,7 +23,7 @@ defmodule Trento.Domain.Commands.RegisterDatabaseInstance do field :sap_system_id, Ecto.UUID field :sid, :string field :tenant, :string - field :host_id, :string + field :host_id, Ecto.UUID field :instance_number, :string field :instance_hostname, :string field :features, :string diff --git a/lib/trento/domain/sap_system/sap_system.ex b/lib/trento/domain/sap_system/sap_system.ex index 200ed72bb8..b82a4345db 100644 --- a/lib/trento/domain/sap_system/sap_system.ex +++ b/lib/trento/domain/sap_system/sap_system.ex @@ -37,7 +37,7 @@ defmodule Trento.Domain.SapSystem do use Trento.Type deftype do - field :sap_system_id, :string + field :sap_system_id, Ecto.UUID field :sid, :string field :health, Ecto.Enum, values: Health.values()