mirror of https://github.com/Icinga/icinga2.git
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
4ade4c757b
commit
6007848146
|
@ -240,6 +240,10 @@ void IcingaDB::DumpedGlobals::Reset()
|
|||
m_Ids.clear();
|
||||
}
|
||||
|
||||
String IcingaDB::GetEnvironmentId() const {
|
||||
return m_EnvironmentId;
|
||||
}
|
||||
|
||||
bool IcingaDB::DumpedGlobals::IsNew(const String& id)
|
||||
{
|
||||
std::lock_guard<std::mutex> l (m_Mutex);
|
||||
|
|
|
@ -39,6 +39,8 @@ public:
|
|||
virtual void Start(bool runtimeCreated) override;
|
||||
virtual void Stop(bool runtimeRemoved) override;
|
||||
|
||||
String GetEnvironmentId() const override;
|
||||
|
||||
protected:
|
||||
void ValidateTlsProtocolmin(const Lazy<String>& 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 {
|
||||
default {{{ return DEFAULT_CONNECT_TIMEOUT; }}}
|
||||
};
|
||||
|
||||
[no_storage] String environment_id {
|
||||
get;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue