mirror of https://github.com/Icinga/icinga2.git
parent
deb938d412
commit
c981426cfb
|
@ -397,6 +397,11 @@ String HostDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields) co
|
|||
|
||||
Host::Ptr host = static_pointer_cast<Host>(GetObject());
|
||||
|
||||
Array::Ptr groups = host->GetGroups();
|
||||
|
||||
if (groups)
|
||||
hashData += DbObject::HashValue(groups);
|
||||
|
||||
Array::Ptr parents = new Array();
|
||||
|
||||
/* parents */
|
||||
|
|
|
@ -357,6 +357,11 @@ String ServiceDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields)
|
|||
|
||||
Service::Ptr service = static_pointer_cast<Service>(GetObject());
|
||||
|
||||
Array::Ptr groups = service->GetGroups();
|
||||
|
||||
if (groups)
|
||||
hashData += DbObject::HashValue(groups);
|
||||
|
||||
Array::Ptr dependencies = new Array();
|
||||
|
||||
/* dependencies */
|
||||
|
|
|
@ -163,3 +163,17 @@ void UserDbObject::OnConfigUpdateHeavy(void)
|
|||
|
||||
DbObject::OnMultipleQueries(queries);
|
||||
}
|
||||
|
||||
String UserDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields) const
|
||||
{
|
||||
String hashData = DbObject::CalculateConfigHash(configFields);
|
||||
|
||||
User::Ptr user = static_pointer_cast<User>(GetObject());
|
||||
|
||||
Array::Ptr groups = user->GetGroups();
|
||||
|
||||
if (groups)
|
||||
hashData += DbObject::HashValue(groups);
|
||||
|
||||
return hashData;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,8 @@ protected:
|
|||
virtual Dictionary::Ptr GetStatusFields(void) const override;
|
||||
|
||||
virtual void OnConfigUpdateHeavy(void) override;
|
||||
|
||||
virtual String CalculateConfigHash(const Dictionary::Ptr& configFields) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue