-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(engine): Service/Host/Anomalydetection configuration objects simp…
…lified REFS: MON-113242
- Loading branch information
Showing
36 changed files
with
426 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
/* | ||
** Copyright 2011-2013,2017 Centreon | ||
** | ||
** This file is part of Centreon Engine. | ||
** | ||
** Centreon Engine is free software: you can redistribute it and/or | ||
** modify it under the terms of the GNU General Public License version 2 | ||
** as published by the Free Software Foundation. | ||
** | ||
** Centreon Engine is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
** General Public License for more details. | ||
** | ||
** You should have received a copy of the GNU General Public License | ||
** along with Centreon Engine. If not, see | ||
** <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* Copyright 2011-2013,2017-2024 Centreon | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* For more information : [email protected] | ||
* | ||
*/ | ||
#ifndef CCE_CONFIGURATION_COMMAND_HH | ||
#define CCE_CONFIGURATION_COMMAND_HH | ||
|
||
|
@@ -58,8 +57,8 @@ class command : public object { | |
static std::unordered_map<std::string, setter_func> const _setters; | ||
}; | ||
|
||
typedef std::shared_ptr<command> command_ptr; | ||
typedef std::set<command> set_command; | ||
using command_ptr = std::shared_ptr<command>; | ||
using set_command = std::set<command>; | ||
} // namespace configuration | ||
|
||
} // namespace com::centreon::engine | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
/** | ||
* Copyright 2011-2013,2017 Centreon | ||
* Copyright 2011-2013,2017-2024 Centreon | ||
* | ||
* This file is part of Centreon Engine. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* Centreon Engine is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License version 2 | ||
* as published by the Free Software Foundation. | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Centreon Engine is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* For more information : [email protected] | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Centreon Engine. If not, see | ||
* <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef CCE_CONFIGURATION_CONTACTGROUP_HH | ||
#define CCE_CONFIGURATION_CONTACTGROUP_HH | ||
|
||
|
@@ -32,22 +31,22 @@ class contactgroup : public object { | |
|
||
contactgroup(key_type const& key = ""); | ||
contactgroup(contactgroup const& right); | ||
~contactgroup() throw() override; | ||
~contactgroup() noexcept override; | ||
contactgroup& operator=(contactgroup const& right); | ||
bool operator==(contactgroup const& right) const throw(); | ||
bool operator!=(contactgroup const& right) const throw(); | ||
bool operator<(contactgroup const& right) const throw(); | ||
bool operator==(contactgroup const& right) const noexcept; | ||
bool operator!=(contactgroup const& right) const noexcept; | ||
bool operator<(contactgroup const& right) const noexcept; | ||
void check_validity() const override; | ||
key_type const& key() const throw(); | ||
key_type const& key() const noexcept; | ||
void merge(object const& obj) override; | ||
bool parse(char const* key, char const* value) override; | ||
|
||
std::string const& alias() const throw(); | ||
set_string& contactgroup_members() throw(); | ||
set_string const& contactgroup_members() const throw(); | ||
std::string const& contactgroup_name() const throw(); | ||
set_string& members() throw(); | ||
set_string const& members() const throw(); | ||
std::string const& alias() const noexcept; | ||
set_string& contactgroup_members() noexcept; | ||
set_string const& contactgroup_members() const noexcept; | ||
std::string const& contactgroup_name() const noexcept; | ||
set_string& members() noexcept; | ||
set_string const& members() const noexcept; | ||
|
||
private: | ||
typedef bool (*setter_func)(contactgroup&, char const*); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
/* | ||
** Copyright 2011-2013 Merethis | ||
** | ||
** This file is part of Centreon Engine. | ||
** | ||
** Centreon Engine is free software: you can redistribute it and/or | ||
** modify it under the terms of the GNU General Public License version 2 | ||
** as published by the Free Software Foundation. | ||
** | ||
** Centreon Engine is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
** General Public License for more details. | ||
** | ||
** You should have received a copy of the GNU General Public License | ||
** along with Centreon Engine. If not, see | ||
** <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* Copyright 2011-2013 Merethis | ||
* Copyright 2014-2024 Centreon | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* For more information : [email protected] | ||
* | ||
*/ | ||
#ifndef CCE_CONFIGURATION_FILE_INFO_HH | ||
#define CCE_CONFIGURATION_FILE_INFO_HH | ||
|
||
|
@@ -59,6 +59,6 @@ class file_info { | |
}; | ||
} // namespace configuration | ||
|
||
} | ||
} // namespace com::centreon::engine | ||
|
||
#endif // !CCE_CONFIGURATION_FILE_INFO_HH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
/* | ||
** Copyright 2011-2013,2017 Centreon | ||
** | ||
** This file is part of Centreon Engine. | ||
** | ||
** Centreon Engine is free software: you can redistribute it and/or | ||
** modify it under the terms of the GNU General Public License version 2 | ||
** as published by the Free Software Foundation. | ||
** | ||
** Centreon Engine is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
** General Public License for more details. | ||
** | ||
** You should have received a copy of the GNU General Public License | ||
** along with Centreon Engine. If not, see | ||
** <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* Copyright 2011-2013,2017-2024 Centreon | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* For more information : [email protected] | ||
* | ||
*/ | ||
#ifndef CCE_CONFIGURATION_GROUP_HH | ||
#define CCE_CONFIGURATION_GROUP_HH | ||
|
||
|
@@ -29,30 +28,29 @@ typedef std::list<std::string> list_string; | |
typedef std::set<std::string> set_string; | ||
typedef std::set<std::pair<std::string, std::string> > set_pair_string; | ||
|
||
namespace com::centreon::engine { | ||
namespace com::centreon::engine::configuration { | ||
|
||
namespace configuration { | ||
template <typename T> | ||
class group { | ||
public: | ||
group(bool inherit = false); | ||
group(group const& other); | ||
~group() throw(); | ||
~group() noexcept; | ||
group& operator=(group const& other); | ||
group& operator=(std::string const& other); | ||
group& operator+=(group const& other); | ||
bool operator==(group const& other) const throw(); | ||
bool operator!=(group const& other) const throw(); | ||
bool operator<(group const& other) const throw(); | ||
T& operator*() throw() { return (_data); } | ||
T const& operator*() const throw() { return (_data); } | ||
T* operator->() throw() { return (&_data); } | ||
T const* operator->() const throw() { return (&_data); } | ||
T& get() throw() { return (_data); } | ||
T const& get() const throw() { return (_data); } | ||
bool is_inherit() const throw() { return (_is_inherit); } | ||
void is_inherit(bool enable) throw() { _is_inherit = enable; } | ||
bool is_set() const throw() { return (_is_set); } | ||
bool operator==(group const& other) const noexcept; | ||
bool operator!=(group const& other) const noexcept; | ||
bool operator<(group const& other) const noexcept; | ||
T& operator*() noexcept { return (_data); } | ||
T const& operator*() const noexcept { return (_data); } | ||
T* operator->() noexcept { return (&_data); } | ||
T const* operator->() const noexcept { return (&_data); } | ||
T& get() noexcept { return (_data); } | ||
T const& get() const noexcept { return (_data); } | ||
bool is_inherit() const noexcept { return (_is_inherit); } | ||
void is_inherit(bool enable) noexcept { _is_inherit = enable; } | ||
bool is_set() const noexcept { return (_is_set); } | ||
void reset(); | ||
|
||
private: | ||
|
@@ -61,8 +59,6 @@ class group { | |
bool _is_null; | ||
bool _is_set; | ||
}; | ||
} // namespace configuration | ||
|
||
} | ||
} // namespace com::centreon::engine::configuration | ||
|
||
#endif // !CCE_CONFIGURATION_GROUP_HH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
/* | ||
** Copyright 2011-2019 Centreon | ||
** | ||
** This file is part of Centreon Engine. | ||
** | ||
** Centreon Engine is free software: you can redistribute it and/or | ||
** modify it under the terms of the GNU General Public License version 2 | ||
** as published by the Free Software Foundation. | ||
** | ||
** Centreon Engine is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
** General Public License for more details. | ||
** | ||
** You should have received a copy of the GNU General Public License | ||
** along with Centreon Engine. If not, see | ||
** <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* Copyright 2011-2024 Centreon | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* For more information : [email protected] | ||
* | ||
*/ | ||
#ifndef CCE_CONFIGURATION_HOSTDEPENDENCY_HH | ||
#define CCE_CONFIGURATION_HOSTDEPENDENCY_HH | ||
|
||
|
@@ -102,6 +101,6 @@ typedef std::shared_ptr<hostdependency> hostdependency_ptr; | |
typedef std::set<hostdependency> set_hostdependency; | ||
} // namespace configuration | ||
|
||
} | ||
} // namespace com::centreon::engine | ||
|
||
#endif // !CCE_CONFIGURATION_HOSTDEPENDENCY_HH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
/* | ||
** Copyright 2011-2013,2017 Centreon | ||
** | ||
** This file is part of Centreon Engine. | ||
** | ||
** Centreon Engine is free software: you can redistribute it and/or | ||
** modify it under the terms of the GNU General Public License version 2 | ||
** as published by the Free Software Foundation. | ||
** | ||
** Centreon Engine is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
** General Public License for more details. | ||
** | ||
** You should have received a copy of the GNU General Public License | ||
** along with Centreon Engine. If not, see | ||
** <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* Copyright 2011-2013,2017-2024 Centreon | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* For more information : [email protected] | ||
* | ||
*/ | ||
#ifndef CCE_CONFIGURATION_HOSTESCALATION_HH | ||
#define CCE_CONFIGURATION_HOSTESCALATION_HH | ||
|
||
|
@@ -99,6 +98,6 @@ typedef std::shared_ptr<hostescalation> hostescalation_ptr; | |
typedef std::set<hostescalation> set_hostescalation; | ||
} // namespace configuration | ||
|
||
} | ||
} // namespace com::centreon::engine | ||
|
||
#endif // !CCE_CONFIGURATION_HOSTESCALATION_HH |
Oops, something went wrong.