Skip to content

Commit

Permalink
Split sap system database aggregates (#2445)
Browse files Browse the repository at this point in the history
* Add new database aggregate code

* Remove database logic from sap system aggregate

* Redirect router commands to database aggregate

* Adapt deregistration process manager

* Adapt enrichment protocol

* Adapt sap system discovery policy

* Adapt remaining code alias and tests

* Adapt related e2e tests

* Update the aggregates docstring

* Leftover dosctring and pattern matching entries
  • Loading branch information
arbulu89 committed Mar 27, 2024
1 parent 1f10bf6 commit 26ddff0
Show file tree
Hide file tree
Showing 24 changed files with 2,936 additions and 4,005 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Trento.SapSystems.Commands.DeregisterDatabaseInstance do
defmodule Trento.Databases.Commands.DeregisterDatabaseInstance do
@moduledoc """
Deregister (decommission) a database instance from the monitoring system.
"""
Expand All @@ -10,7 +10,7 @@ defmodule Trento.SapSystems.Commands.DeregisterDatabaseInstance do
defcommand do
field :instance_number, :string
field :host_id, Ecto.UUID
field :sap_system_id, Ecto.UUID
field :database_id, Ecto.UUID
field :deregistered_at, :utc_datetime_usec
end
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Trento.SapSystems.Commands.MarkDatabaseInstanceAbsent do
defmodule Trento.Databases.Commands.MarkDatabaseInstanceAbsent do
@moduledoc """
Mark a database instance as absent
"""
Expand All @@ -9,7 +9,7 @@ defmodule Trento.SapSystems.Commands.MarkDatabaseInstanceAbsent do
defcommand do
field :instance_number, :string
field :host_id, Ecto.UUID
field :sap_system_id, Ecto.UUID
field :database_id, Ecto.UUID
field :absent_at, :utc_datetime_usec
end
end
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
defmodule Trento.SapSystems.Commands.RegisterDatabaseInstance do
defmodule Trento.Databases.Commands.RegisterDatabaseInstance do
@moduledoc """
Register a database instance to the monitoring system.
"""

@required_fields [
:sap_system_id,
:database_id,
:sid,
:tenant,
:host_id,
Expand All @@ -20,7 +20,7 @@ defmodule Trento.SapSystems.Commands.RegisterDatabaseInstance do
require Trento.Enums.Health, as: Health

defcommand do
field :sap_system_id, Ecto.UUID
field :database_id, Ecto.UUID
field :sid, :string
field :tenant, :string
field :host_id, Ecto.UUID
Expand Down
Loading

0 comments on commit 26ddff0

Please sign in to comment.