mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-06 13:24:28 +02:00
Drop System#track_parents
DSL function
No external user needs to manipulate the actual object dependency graphs. This was maybe introduced for debugging purposes at that time but if someone messes with this in prod - good luck with that. Oh, apart from that it's broken :( and doesn't track parents as its implies but children.
This commit is contained in:
parent
9577af8e6d
commit
bc5db9834f
@ -11,7 +11,6 @@
|
||||
#include "base/objectlock.hpp"
|
||||
#include "base/configtype.hpp"
|
||||
#include "base/application.hpp"
|
||||
#include "base/dependencygraph.hpp"
|
||||
#include "base/initialize.hpp"
|
||||
#include "base/namespace.hpp"
|
||||
#include "config/configitem.hpp"
|
||||
@ -49,7 +48,6 @@ REGISTER_SAFE_FUNCTION(System, basename, &Utility::BaseName, "path");
|
||||
REGISTER_SAFE_FUNCTION(System, dirname, &Utility::DirName, "path");
|
||||
REGISTER_SAFE_FUNCTION(System, getenv, &ScriptUtils::GetEnv, "value");
|
||||
REGISTER_SAFE_FUNCTION(System, msi_get_component_path, &ScriptUtils::MsiGetComponentPathShim, "component");
|
||||
REGISTER_SAFE_FUNCTION(System, track_parents, &ScriptUtils::TrackParents, "child");
|
||||
REGISTER_SAFE_FUNCTION(System, escape_shell_cmd, &Utility::EscapeShellCmd, "cmd");
|
||||
REGISTER_SAFE_FUNCTION(System, escape_shell_arg, &Utility::EscapeShellArg, "arg");
|
||||
#ifdef _WIN32
|
||||
@ -518,11 +516,6 @@ String ScriptUtils::MsiGetComponentPathShim(const String& component)
|
||||
#endif /* _WIN32 */
|
||||
}
|
||||
|
||||
Array::Ptr ScriptUtils::TrackParents(const Object::Ptr& child)
|
||||
{
|
||||
return Array::FromVector(DependencyGraph::GetChildren(dynamic_pointer_cast<ConfigObject>(child)));
|
||||
}
|
||||
|
||||
double ScriptUtils::Ptr(const Object::Ptr& object)
|
||||
{
|
||||
return reinterpret_cast<intptr_t>(object.get());
|
||||
|
@ -39,7 +39,6 @@ public:
|
||||
static Array::Ptr GetObjects(const Type::Ptr& type);
|
||||
static void Assert(const Value& arg);
|
||||
static String MsiGetComponentPathShim(const String& component);
|
||||
static Array::Ptr TrackParents(const Object::Ptr& parent);
|
||||
static double Ptr(const Object::Ptr& object);
|
||||
static Value Glob(const std::vector<Value>& args);
|
||||
static Value GlobRecursive(const std::vector<Value>& args);
|
||||
|
Loading…
x
Reference in New Issue
Block a user