Skip to content

Commit

Permalink
Mon 11764 pb timeperiod (#188)
Browse files Browse the repository at this point in the history
* MON-11764-pb-timeperiod ecriture tests

* MON-11764 only one engine timerange

* MON-11764-pb use of precomp header

* MON-11764-pb-timeperiod no use of boost::icl at the moment

* MON-11764 update after comments
  • Loading branch information
jean-christophe81 authored Apr 12, 2022
1 parent c503fef commit 6dbe4d8
Show file tree
Hide file tree
Showing 500 changed files with 1,898 additions and 2,269 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ broker_pb2.pyc
broker_pb2_grpc.py
broker_pb2_grpc.pyc
build
build_my_host
build_centos7
cppcheck-build
cppcheck-report.txt
broker/core/inc/com/centreon/broker/database/table_max_size.hh
Expand Down
1 change: 1 addition & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ cmake
grpc:secure=True
boost:header_only=True
libssh2:shared=False

6 changes: 6 additions & 0 deletions engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ endif ()
set(INC_DIR "${PROJECT_SOURCE_DIR}/inc")
set(SCRIPT_DIR "${PROJECT_SOURCE_DIR}/scripts")
set(SRC_DIR "${PROJECT_SOURCE_DIR}/src")
set(PRECOMP_HEADER "${PROJECT_SOURCE_DIR}/precomp_inc/precomp.hh")

set(ENGINE_MODULES_DIR "${CMAKE_INSTALL_PREFIX}/lib64/centreon-engine/")

Expand Down Expand Up @@ -532,6 +533,9 @@ add_library(cce_core ${LIBRARY_TYPE} ${FILES})
add_dependencies(cce_core engine_rpc)
add_dependencies(cce_core centreon_clib)

target_precompile_headers(cce_core PRIVATE ${PRECOMP_HEADER})


# Link target with required libraries.
target_link_libraries(cce_core CONAN_PKG::nlohmann_json
${MATH_LIBRARIES}
Expand All @@ -546,6 +550,7 @@ target_link_libraries(cce_core CONAN_PKG::nlohmann_json
add_executable("centengine" "${SRC_DIR}/main.cc")
set_property(TARGET "centengine" PROPERTY ENABLE_EXPORTS "1")
add_dependencies(centengine centreon_clib)
target_precompile_headers(centengine PRIVATE ${PRECOMP_HEADER})

# Link centengine with required libraries.
target_link_libraries(centengine "-export-dynamic" centreon_clib "-Wl,-whole-archive" enginerpc cce_core "-Wl,-no-whole-archive" -L${CONAN_LIB_DIRS_GRPC} "-Wl,--whole-archive" grpc++ "-Wl,--no-whole-archive" CONAN_PKG::grpc ${absl_LIBS} CONAN_PKG::openssl ${c-ares_LIBS} CONAN_PKG::zlib dl)
Expand All @@ -554,6 +559,7 @@ target_link_libraries(centengine "-export-dynamic" centreon_clib "-Wl,-whole-arc
add_executable("centenginestats" "${SRC_DIR}/centenginestats.cc")
add_dependencies("centenginestats" centreon_clib)
target_link_libraries("centenginestats" centreon_clib)
target_precompile_headers(centenginestats PRIVATE ${PRECOMP_HEADER})

# Unit tests.
add_subdirectory(tests)
Expand Down
3 changes: 3 additions & 0 deletions engine/enginerpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ add_library(
"${INC_DIR}/enginerpc.hh"
)

target_precompile_headers(${ENGINERPC} PRIVATE ../precomp_inc/precomp.hh)


# Prettier name.
set_property(TARGET ${ENGINERPC} PROPERTY PREFIX "" PROPERTY POSITION_INDEPENDENT_CODE ON)
# Link target with libraries.
Expand Down
148 changes: 0 additions & 148 deletions engine/enginerpc/CMakeLists.txt.old

This file was deleted.

3 changes: 0 additions & 3 deletions engine/enginerpc/engine_impl.cc
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#include "com/centreon/engine/engine_impl.hh"

#include <fmt/format.h>
#include <google/protobuf/util/time_util.h>
#include <sys/types.h>
#include <unistd.h>
#include <algorithm>
#include <functional>
#include <future>

#include "com/centreon/engine/anomalydetection.hh"
Expand Down
1 change: 1 addition & 0 deletions engine/inc/com/centreon/engine/anomalydetection.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <map>
#include <mutex>

#include <nlohmann/json.hpp>
#include <tuple>

Expand Down
1 change: 0 additions & 1 deletion engine/inc/com/centreon/engine/broker/compatibility.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#define CCE_BROKER_COMPATIBILITY_HH

#include "com/centreon/engine/broker/handle.hh"
#include "com/centreon/engine/namespace.hh"

CCE_BEGIN()

Expand Down
3 changes: 0 additions & 3 deletions engine/inc/com/centreon/engine/broker/handle.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
#ifndef CCE_BROKER_HANDLE_HH
#define CCE_BROKER_HANDLE_HH

#include <memory>
#include <string>
#include "com/centreon/engine/namespace.hh"
#include "com/centreon/library.hh"

CCE_BEGIN()
Expand Down
4 changes: 0 additions & 4 deletions engine/inc/com/centreon/engine/broker/loader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
#ifndef CCE_MODULES_LOADER_HH
#define CCE_MODULES_LOADER_HH

#include <list>
#include <memory>
#include <string>
#include "com/centreon/engine/broker/handle.hh"
#include "com/centreon/engine/namespace.hh"

CCE_BEGIN()

Expand Down
1 change: 0 additions & 1 deletion engine/inc/com/centreon/engine/check_result.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <sys/time.h>

#include "com/centreon/engine/checkable.hh"
#include "com/centreon/engine/namespace.hh"

enum check_source { service_check, host_check };

Expand Down
2 changes: 0 additions & 2 deletions engine/inc/com/centreon/engine/checks/checker.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#ifndef CCE_CHECKS_CHECKER_HH
#define CCE_CHECKS_CHECKER_HH

#include <queue>

#include "com/centreon/engine/anomalydetection.hh"
#include "com/centreon/engine/commands/command.hh"

Expand Down
2 changes: 0 additions & 2 deletions engine/inc/com/centreon/engine/checks/stats.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#ifndef CCE_CHECKS_STATS_HH
#define CCE_CHECKS_STATS_HH

#include <time.h>

#define ACTIVE_SCHEDULED_SERVICE_CHECK_STATS 0
#define ACTIVE_ONDEMAND_SERVICE_CHECK_STATS 1
#define PASSIVE_SERVICE_CHECK_STATS 2
Expand Down
3 changes: 0 additions & 3 deletions engine/inc/com/centreon/engine/command_manager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@
#ifndef CCE_COMMAND_MANAGER_HH
#define CCE_COMMAND_MANAGER_HH

#include <deque>
#include <future>
#include <mutex>

#include "com/centreon/engine/engine_impl.hh"
#include "com/centreon/engine/host.hh"
#include "com/centreon/engine/namespace.hh"

/**
* @class command_manager command_manager.hh
Expand Down
5 changes: 0 additions & 5 deletions engine/inc/com/centreon/engine/commands/connector.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@
#ifndef CCE_COMMANDS_CONNECTOR_HH
#define CCE_COMMANDS_CONNECTOR_HH

#include <condition_variable>
#include <memory>
#include <mutex>
#include <string>
#include <thread>
#include "com/centreon/engine/commands/command.hh"
#include "com/centreon/engine/namespace.hh"
#include "com/centreon/process.hh"
#include "com/centreon/process_listener.hh"

Expand Down
3 changes: 0 additions & 3 deletions engine/inc/com/centreon/engine/commands/environment.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
#ifndef CCE_COMMANDS_ENVIRONMENT_HH
#define CCE_COMMANDS_ENVIRONMENT_HH

#include <string>
#include "com/centreon/engine/namespace.hh"

CCE_BEGIN()

namespace commands {
Expand Down
2 changes: 0 additions & 2 deletions engine/inc/com/centreon/engine/commands/forward.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
#ifndef CCE_COMMANDS_FORWARD_HH
#define CCE_COMMANDS_FORWARD_HH

#include <string>
#include "com/centreon/engine/commands/command.hh"
#include "com/centreon/engine/commands/connector.hh"
#include "com/centreon/engine/namespace.hh"

CCE_BEGIN()

Expand Down
4 changes: 0 additions & 4 deletions engine/inc/com/centreon/engine/commands/raw.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
#ifndef CCE_COMMANDS_RAW_HH
#define CCE_COMMANDS_RAW_HH

#include <deque>
#include <mutex>
#include <string>
#include "com/centreon/engine/commands/command.hh"
#include "com/centreon/engine/namespace.hh"
#include "com/centreon/process.hh"
#include "com/centreon/process_listener.hh"

Expand Down
3 changes: 0 additions & 3 deletions engine/inc/com/centreon/engine/comment.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

#ifndef CCE_OBJECTS_COMMENTS_HH
#define CCE_OBJECTS_COMMENTS_HH
#include <time.h>
#include <map>
#include <ostream>
#include "com/centreon/engine/contact.hh"
#include "com/centreon/engine/host.hh"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,10 @@
#ifndef CCE_CONFIGURATION_ANOMALYDETECTION_HH
#define CCE_CONFIGURATION_ANOMALYDETECTION_HH

#include <list>
#include <memory>
#include <set>
#include <utility>
#include "com/centreon/engine/common.hh"
#include "com/centreon/engine/configuration/group.hh"
#include "com/centreon/engine/configuration/object.hh"
#include "com/centreon/engine/customvariable.hh"
#include "com/centreon/engine/namespace.hh"
#include "com/centreon/engine/opt.hh"

CCE_BEGIN()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#ifndef CCE_CONFIGURATION_APPLIER_ANOMALYDETECTION_HH
#define CCE_CONFIGURATION_APPLIER_ANOMALYDETECTION_HH

#include "com/centreon/engine/namespace.hh"

CCE_BEGIN()

namespace configuration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
#ifndef CCE_CONFIGURATION_APPLIER_COMMAND_HH
#define CCE_CONFIGURATION_APPLIER_COMMAND_HH

#include <string>
#include "com/centreon/engine/namespace.hh"

CCE_BEGIN()

// Forward declarations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#ifndef CCE_CONFIGURATION_APPLIER_CONNECTOR_HH
#define CCE_CONFIGURATION_APPLIER_CONNECTOR_HH

#include "com/centreon/engine/namespace.hh"

CCE_BEGIN()

namespace configuration {
Expand Down
Loading

0 comments on commit 6dbe4d8

Please sign in to comment.