1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #include "db_ido/hostgroupdbobject.hpp"
4 #include "db_ido/dbtype.hpp"
5 #include "db_ido/dbvalue.hpp"
6 #include "base/objectlock.hpp"
7 #include "base/initialize.hpp"
8 #include "base/configtype.hpp"
10 using namespace icinga;
12 REGISTER_DBTYPE(HostGroup, "hostgroup", DbObjectTypeHostGroup, "hostgroup_object_id", HostGroupDbObject);
14 HostGroupDbObject::HostGroupDbObject(const DbType::Ptr& type, const String& name1, const String& name2)
15 : DbObject(type, name1, name2)
18 Dictionary::Ptr HostGroupDbObject::GetConfigFields() const
20 HostGroup::Ptr group = static_pointer_cast<HostGroup>(GetObject());
22 return new Dictionary({
23 { "alias", group->GetDisplayName() },
24 { "notes", group->GetNotes() },
25 { "notes_url", group->GetNotesUrl() },
26 { "action_url", group->GetActionUrl() }
30 Dictionary::Ptr HostGroupDbObject::GetStatusFields() const