Skip to content

Drop superfluous (broken) DSL functions #10457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions lib/base/scriptutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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());
Expand Down
1 change: 0 additions & 1 deletion lib/base/scriptutils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class ScriptUtils
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);
Expand Down
2 changes: 1 addition & 1 deletion lib/icinga/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set(icinga_SOURCES
checkable.cpp checkable.hpp checkable-ti.hpp
checkable-check.cpp checkable-comment.cpp checkable-dependency.cpp
checkable-downtime.cpp checkable-event.cpp checkable-flapping.cpp
checkable-notification.cpp checkable-script.cpp
checkable-notification.cpp
checkcommand.cpp checkcommand.hpp checkcommand-ti.hpp
checkresult.cpp checkresult.hpp checkresult-ti.hpp
cib.cpp cib.hpp
Expand Down
33 changes: 0 additions & 33 deletions lib/icinga/checkable-script.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion lib/icinga/checkable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

using namespace icinga;

REGISTER_TYPE_WITH_PROTOTYPE(Checkable, Checkable::GetPrototype());
REGISTER_TYPE(Checkable);
INITIALIZE_ONCE(&Checkable::StaticInitialize);

const std::map<String, int> Checkable::m_FlappingStateFilterMap ({
Expand Down
2 changes: 0 additions & 2 deletions lib/icinga/checkable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ class Checkable : public ObjectImpl<Checkable>
static int GetPendingChecks();
static void AquirePendingCheckSlot(int maxPendingChecks);

static Object::Ptr GetPrototype();

protected:
void Start(bool runtimeCreated) override;
void OnConfigLoaded() override;
Expand Down
Loading