]> granicus.if.org Git - icinga2/blob - lib/db_ido/commanddbobject.cpp
Merge pull request #7185 from Icinga/bugfix/gelfwriter-wrong-log-facility
[icinga2] / lib / db_ido / commanddbobject.cpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #include "db_ido/commanddbobject.hpp"
4 #include "db_ido/dbtype.hpp"
5 #include "db_ido/dbvalue.hpp"
6 #include "icinga/command.hpp"
7 #include "icinga/compatutility.hpp"
8 #include "base/objectlock.hpp"
9 #include "base/convert.hpp"
10
11 using namespace icinga;
12
13 REGISTER_DBTYPE(Command, "command", DbObjectTypeCommand, "object_id", CommandDbObject);
14
15 CommandDbObject::CommandDbObject(const DbType::Ptr& type, const String& name1, const String& name2)
16         : DbObject(type, name1, name2)
17 { }
18
19 Dictionary::Ptr CommandDbObject::GetConfigFields() const
20 {
21         Command::Ptr command = static_pointer_cast<Command>(GetObject());
22
23         return new Dictionary({
24                 { "command_line", CompatUtility::GetCommandLine(command) }
25         });
26 }
27
28 Dictionary::Ptr CommandDbObject::GetStatusFields() const
29 {
30         return nullptr;
31 }