Skip to content

Commit dcd9a2d

Browse files
authored
Merge pull request #10457 from Icinga/remove-superfluous-dsl-functions
Drop superfluous (broken) DSL functions
2 parents e5d0f39 + bc5db98 commit dcd9a2d

File tree

6 files changed

+2
-45
lines changed

6 files changed

+2
-45
lines changed

lib/base/scriptutils.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "base/objectlock.hpp"
1212
#include "base/configtype.hpp"
1313
#include "base/application.hpp"
14-
#include "base/dependencygraph.hpp"
1514
#include "base/initialize.hpp"
1615
#include "base/namespace.hpp"
1716
#include "config/configitem.hpp"
@@ -49,7 +48,6 @@ REGISTER_SAFE_FUNCTION(System, basename, &Utility::BaseName, "path");
4948
REGISTER_SAFE_FUNCTION(System, dirname, &Utility::DirName, "path");
5049
REGISTER_SAFE_FUNCTION(System, getenv, &ScriptUtils::GetEnv, "value");
5150
REGISTER_SAFE_FUNCTION(System, msi_get_component_path, &ScriptUtils::MsiGetComponentPathShim, "component");
52-
REGISTER_SAFE_FUNCTION(System, track_parents, &ScriptUtils::TrackParents, "child");
5351
REGISTER_SAFE_FUNCTION(System, escape_shell_cmd, &Utility::EscapeShellCmd, "cmd");
5452
REGISTER_SAFE_FUNCTION(System, escape_shell_arg, &Utility::EscapeShellArg, "arg");
5553
#ifdef _WIN32
@@ -518,11 +516,6 @@ String ScriptUtils::MsiGetComponentPathShim(const String& component)
518516
#endif /* _WIN32 */
519517
}
520518

521-
Array::Ptr ScriptUtils::TrackParents(const Object::Ptr& child)
522-
{
523-
return Array::FromVector(DependencyGraph::GetChildren(dynamic_pointer_cast<ConfigObject>(child)));
524-
}
525-
526519
double ScriptUtils::Ptr(const Object::Ptr& object)
527520
{
528521
return reinterpret_cast<intptr_t>(object.get());

lib/base/scriptutils.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class ScriptUtils
3939
static Array::Ptr GetObjects(const Type::Ptr& type);
4040
static void Assert(const Value& arg);
4141
static String MsiGetComponentPathShim(const String& component);
42-
static Array::Ptr TrackParents(const Object::Ptr& parent);
4342
static double Ptr(const Object::Ptr& object);
4443
static Value Glob(const std::vector<Value>& args);
4544
static Value GlobRecursive(const std::vector<Value>& args);

lib/icinga/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ set(icinga_SOURCES
3030
checkable.cpp checkable.hpp checkable-ti.hpp
3131
checkable-check.cpp checkable-comment.cpp checkable-dependency.cpp
3232
checkable-downtime.cpp checkable-event.cpp checkable-flapping.cpp
33-
checkable-notification.cpp checkable-script.cpp
33+
checkable-notification.cpp
3434
checkcommand.cpp checkcommand.hpp checkcommand-ti.hpp
3535
checkresult.cpp checkresult.hpp checkresult-ti.hpp
3636
cib.cpp cib.hpp

lib/icinga/checkable-script.cpp

Lines changed: 0 additions & 33 deletions
This file was deleted.

lib/icinga/checkable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
using namespace icinga;
1414

15-
REGISTER_TYPE_WITH_PROTOTYPE(Checkable, Checkable::GetPrototype());
15+
REGISTER_TYPE(Checkable);
1616
INITIALIZE_ONCE(&Checkable::StaticInitialize);
1717

1818
const std::map<String, int> Checkable::m_FlappingStateFilterMap ({

lib/icinga/checkable.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ class Checkable : public ObjectImpl<Checkable>
216216
static int GetPendingChecks();
217217
static void AquirePendingCheckSlot(int maxPendingChecks);
218218

219-
static Object::Ptr GetPrototype();
220-
221219
protected:
222220
void Start(bool runtimeCreated) override;
223221
void OnConfigLoaded() override;

0 commit comments

Comments
 (0)