Skip to content

Commit

Permalink
enh(broker): HostDependencies and ServiceDependencies are not used by…
Browse files Browse the repository at this point in the history
… broker.
  • Loading branch information
bouda1 committed Jul 24, 2024
1 parent 120986a commit 420cd93
Show file tree
Hide file tree
Showing 31 changed files with 171 additions and 1,950 deletions.
4 changes: 2 additions & 2 deletions CMakeListsLinux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# Global settings.
#


option(WITH_ASAN
"Add the libasan to check memory leaks and other memory issues." OFF)

Expand Down Expand Up @@ -164,7 +163,8 @@ include_directories(${CMAKE_SOURCE_DIR}
${VCPKG_INCLUDE_DIR}
fmt::fmt
spdlog::spdlog
${CMAKE_SOURCE_DIR}/clib/inc)
${CMAKE_SOURCE_DIR}/clib/inc
${CMAKE_CURRENT_BINARY_DIR})

add_subdirectory(clib)
add_subdirectory(common)
Expand Down
162 changes: 77 additions & 85 deletions broker/core/sql/inc/com/centreon/broker/sql/mysql_error.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,87 +33,83 @@ namespace database {
class mysql_error {
public:
enum code {
empty,
clean_hosts_services,
clean_hostgroup_members,
clean_servicegroup_members,
clean_empty_hostgroups,
clean_empty_servicegroups,
clean_host_dependencies,
clean_service_dependencies,
clean_host_parents,
clean_modules,
clean_downtimes,
clean_comments,
clean_customvariables,
restore_instances,
update_customvariables,
update_logs,
update_metrics,
insert_data,
delete_metric,
delete_index,
flag_index_data,
delete_hosts,
delete_modules,
update_index_state,
delete_availabilities,
insert_availability,
rebuild_ba,
close_event,
close_ba_events,
close_kpi_events,
delete_ba_durations,
store_host_state,
store_acknowledgement,
store_comment,
remove_customvariable,
store_customvariable,
store_downtime,
store_eventhandler,
store_flapping,
store_host_check,
store_host_dependency,
store_host_group,
store_host_group_member,
delete_host_group_member,
store_host,
store_host_parentship,
store_host_status,
store_poller,
update_poller,
store_module,
store_service_check_command,
store_service_dependency,
store_service_group,
store_service_group_member,
delete_service_group_member,
store_service,
store_service_status,
update_ba,
update_kpi,
update_kpi_event,
insert_kpi_event,
insert_ba,
insert_bv,
insert_dimension_ba_bv,
truncate_dimension_table,
insert_dimension_kpi,
insert_timeperiod,
insert_timeperiod_exception,
insert_exclusion_timeperiod,
insert_relation_ba_timeperiod,
store_severity,
clean_severities,
store_tag,
clean_resources_tags,
update_index_data,
update_resources,
store_host_resources,
store_tags_resources_tags,
delete_resources_tags,
clean_resources,
delete_poller,
empty = 0,
clean_hosts_services = 1,
clean_hostgroup_members = 2,
clean_servicegroup_members = 3,
clean_empty_hostgroups = 4,
clean_empty_servicegroups = 5,
clean_host_parents = 6,
clean_modules = 7,
clean_downtimes = 8,
clean_comments = 9,
clean_customvariables = 10,
restore_instances = 11,
update_customvariables = 12,
update_logs = 13,
update_metrics = 14,
insert_data = 15,
delete_metric = 16,
delete_index = 17,
flag_index_data = 18,
delete_hosts = 19,
delete_modules = 20,
update_index_state = 21,
delete_availabilities = 22,
insert_availability = 23,
rebuild_ba = 24,
close_event = 25,
close_ba_events = 26,
close_kpi_events = 27,
delete_ba_durations = 28,
store_host_state = 29,
store_acknowledgement = 30,
store_comment = 31,
remove_customvariable = 32,
store_customvariable = 33,
store_downtime = 34,
store_eventhandler = 35,
store_flapping = 36,
store_host_check = 37,
store_host_group = 38,
store_host_group_member = 39,
delete_host_group_member = 40,
store_host = 41,
store_host_parentship = 42,
store_host_status = 43,
store_poller = 44,
update_poller = 45,
store_module = 46,
store_service_check_command = 47,
store_service_group = 48,
store_service_group_member = 49,
delete_service_group_member = 50,
store_service = 51,
store_service_status = 52,
update_ba = 53,
update_kpi = 54,
update_kpi_event = 55,
insert_kpi_event = 56,
insert_ba = 57,
insert_bv = 58,
insert_dimension_ba_bv = 59,
truncate_dimension_table = 60,
insert_dimension_kpi = 61,
insert_timeperiod = 62,
insert_timeperiod_exception = 63,
insert_exclusion_timeperiod = 64,
insert_relation_ba_timeperiod = 65,
store_severity = 66,
clean_severities = 67,
store_tag = 68,
clean_resources_tags = 69,
update_index_data = 70,
update_resources = 71,
store_host_resources = 72,
store_tags_resources_tags = 73,
delete_resources_tags = 74,
clean_resources = 75,
delete_poller = 76,
};

static constexpr const char* msg[]{
Expand All @@ -123,8 +119,6 @@ class mysql_error {
"could not clean service groups memberships table: ",
"could not remove empty host groups: ",
"could not remove empty service groups: ",
"could not clean host dependencies table: ",
"could not clean service dependencies table: ",
"could not clean host parents table: ",
"could not clean modules table: ",
"could not clean downtimes table: ",
Expand Down Expand Up @@ -158,7 +152,6 @@ class mysql_error {
"could not store event handler: ",
"could not store flapping status: ",
"could not store host check: ",
"could not store host dependency: ",
"could not store host group: ",
"could not store host group membership: ",
"could not delete membership of host to host group: ",
Expand All @@ -169,7 +162,6 @@ class mysql_error {
"could not update poller: ",
"could not store module: ",
"could not store service check command: ",
"could not store service dependency: ",
"could not store service group: ",
"could not store service group membership: ",
"could not delete membersjip of service to service group: ",
Expand Down
8 changes: 0 additions & 8 deletions broker/neb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ set(NEB_SOURCES
${SRC_DIR}/comment.cc
${SRC_DIR}/custom_variable.cc
${SRC_DIR}/custom_variable_status.cc
${SRC_DIR}/dependency.cc
${SRC_DIR}/downtime.cc
${SRC_DIR}/group.cc
${SRC_DIR}/group_member.cc
${SRC_DIR}/host.cc
${SRC_DIR}/host_check.cc
${SRC_DIR}/host_dependency.cc
${SRC_DIR}/host_group.cc
${SRC_DIR}/host_group_member.cc
${SRC_DIR}/host_parent.cc
Expand All @@ -51,7 +49,6 @@ set(NEB_SOURCES
${SRC_DIR}/responsive_instance.cc
${SRC_DIR}/service.cc
${SRC_DIR}/service_check.cc
${SRC_DIR}/service_dependency.cc
${SRC_DIR}/service_group.cc
${SRC_DIR}/service_group_member.cc
${SRC_DIR}/service_status.cc
Expand All @@ -61,14 +58,12 @@ set(NEB_SOURCES
${INC_DIR}/com/centreon/broker/neb/comment.hh
${INC_DIR}/com/centreon/broker/neb/custom_variable.hh
${INC_DIR}/com/centreon/broker/neb/custom_variable_status.hh
${INC_DIR}/com/centreon/broker/neb/dependency.hh
${INC_DIR}/com/centreon/broker/neb/downtime.hh
${INC_DIR}/com/centreon/broker/neb/events.hh
${INC_DIR}/com/centreon/broker/neb/group.hh
${INC_DIR}/com/centreon/broker/neb/group_member.hh
${INC_DIR}/com/centreon/broker/neb/host.hh
${INC_DIR}/com/centreon/broker/neb/host_check.hh
${INC_DIR}/com/centreon/broker/neb/host_dependency.hh
${INC_DIR}/com/centreon/broker/neb/host_group.hh
${INC_DIR}/com/centreon/broker/neb/host_group_member.hh
${INC_DIR}/com/centreon/broker/neb/host_parent.hh
Expand All @@ -83,7 +78,6 @@ set(NEB_SOURCES
${INC_DIR}/com/centreon/broker/neb/responsive_instance.hh
${INC_DIR}/com/centreon/broker/neb/service.hh
${INC_DIR}/com/centreon/broker/neb/service_check.hh
${INC_DIR}/com/centreon/broker/neb/service_dependency.hh
${INC_DIR}/com/centreon/broker/neb/service_group.hh
${INC_DIR}/com/centreon/broker/neb/service_group_member.hh
${INC_DIR}/com/centreon/broker/neb/service_status.hh
Expand Down Expand Up @@ -183,7 +177,6 @@ if(WITH_TESTING)
${TEST_DIR}/custom_variable_status.cc
${TEST_DIR}/host.cc
${TEST_DIR}/host_check.cc
${TEST_DIR}/host_dependency.cc
${TEST_DIR}/host_parent.cc
${TEST_DIR}/host_status.cc
${TEST_DIR}/instance.cc
Expand All @@ -193,7 +186,6 @@ if(WITH_TESTING)
${TEST_DIR}/randomize.hh
${TEST_DIR}/service.cc
${TEST_DIR}/service_check.cc
${TEST_DIR}/service_dependency.cc
${TEST_DIR}/service_status.cc
${TEST_DIR}/set_log_data.cc
PARENT_SCOPE)
Expand Down
2 changes: 0 additions & 2 deletions broker/neb/inc/com/centreon/broker/neb/callbacks.hh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ int callback_comment(int callback_type, void* data);
int callback_pb_comment(int callback_type, void* data);
int callback_custom_variable(int callback_type, void* data);
int callback_pb_custom_variable(int callback_type, void* data);
int callback_dependency(int callback_type, void* data);
int callback_pb_dependency(int callback_type, void* data);
int callback_downtime(int callback_type, void* data);
int callback_pb_downtime(int callback_type, void* data);
int callback_external_command(int callback_type, void* data);
Expand Down
59 changes: 0 additions & 59 deletions broker/neb/inc/com/centreon/broker/neb/dependency.hh

This file was deleted.

2 changes: 0 additions & 2 deletions broker/neb/inc/com/centreon/broker/neb/events.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "com/centreon/broker/neb/downtime.hh"
#include "com/centreon/broker/neb/host.hh"
#include "com/centreon/broker/neb/host_check.hh"
#include "com/centreon/broker/neb/host_dependency.hh"
#include "com/centreon/broker/neb/host_group.hh"
#include "com/centreon/broker/neb/host_group_member.hh"
#include "com/centreon/broker/neb/host_parent.hh"
Expand All @@ -38,7 +37,6 @@
#include "com/centreon/broker/neb/responsive_instance.hh"
#include "com/centreon/broker/neb/service.hh"
#include "com/centreon/broker/neb/service_check.hh"
#include "com/centreon/broker/neb/service_dependency.hh"
#include "com/centreon/broker/neb/service_group.hh"
#include "com/centreon/broker/neb/service_group_member.hh"
#include "com/centreon/broker/neb/service_status.hh"
Expand Down
Loading

0 comments on commit 420cd93

Please sign in to comment.