mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
IcingaDB: export environment_id via API
Primarily required for Icinga DB integration tests at the moment, but could also be helpful in other situations.
This commit is contained in:
parent
b98b951f85
commit
d3ec8a9ba8
@ -240,6 +240,10 @@ void IcingaDB::DumpedGlobals::Reset()
|
|||||||
m_Ids.clear();
|
m_Ids.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String IcingaDB::GetEnvironmentId() const {
|
||||||
|
return m_EnvironmentId;
|
||||||
|
}
|
||||||
|
|
||||||
bool IcingaDB::DumpedGlobals::IsNew(const String& id)
|
bool IcingaDB::DumpedGlobals::IsNew(const String& id)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> l (m_Mutex);
|
std::lock_guard<std::mutex> l (m_Mutex);
|
||||||
|
@ -39,6 +39,8 @@ public:
|
|||||||
virtual void Start(bool runtimeCreated) override;
|
virtual void Start(bool runtimeCreated) override;
|
||||||
virtual void Stop(bool runtimeRemoved) override;
|
virtual void Stop(bool runtimeRemoved) override;
|
||||||
|
|
||||||
|
String GetEnvironmentId() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void ValidateTlsProtocolmin(const Lazy<String>& lvalue, const ValidationUtils& utils) override;
|
void ValidateTlsProtocolmin(const Lazy<String>& lvalue, const ValidationUtils& utils) override;
|
||||||
void ValidateConnectTimeout(const Lazy<double>& lvalue, const ValidationUtils& utils) override;
|
void ValidateConnectTimeout(const Lazy<double>& lvalue, const ValidationUtils& utils) override;
|
||||||
|
@ -44,6 +44,10 @@ class IcingaDB : ConfigObject
|
|||||||
[config] double connect_timeout {
|
[config] double connect_timeout {
|
||||||
default {{{ return DEFAULT_CONNECT_TIMEOUT; }}}
|
default {{{ return DEFAULT_CONNECT_TIMEOUT; }}}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[no_storage] String environment_id {
|
||||||
|
get;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user