]> granicus.if.org Git - icinga2/blob - lib/db_ido/hostgroupdbobject.cpp
Merge pull request #7185 from Icinga/bugfix/gelfwriter-wrong-log-facility
[icinga2] / lib / db_ido / hostgroupdbobject.cpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
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"
9
10 using namespace icinga;
11
12 REGISTER_DBTYPE(HostGroup, "hostgroup", DbObjectTypeHostGroup, "hostgroup_object_id", HostGroupDbObject);
13
14 HostGroupDbObject::HostGroupDbObject(const DbType::Ptr& type, const String& name1, const String& name2)
15         : DbObject(type, name1, name2)
16 { }
17
18 Dictionary::Ptr HostGroupDbObject::GetConfigFields() const
19 {
20         HostGroup::Ptr group = static_pointer_cast<HostGroup>(GetObject());
21
22         return new Dictionary({
23                 { "alias", group->GetDisplayName() },
24                 { "notes", group->GetNotes() },
25                 { "notes_url", group->GetNotesUrl() },
26                 { "action_url", group->GetActionUrl() }
27         });
28 }
29
30 Dictionary::Ptr HostGroupDbObject::GetStatusFields() const
31 {
32         return nullptr;
33 }