]> granicus.if.org Git - icinga2/blob - lib/icinga/host.ti
Merge pull request #7527 from Icinga/bugfix/checkable-command-endpoint-zone
[icinga2] / lib / icinga / host.ti
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #include "icinga/checkable.hpp"
4 #include "icinga/customvarobject.hpp"
5 #impl_include "icinga/hostgroup.hpp"
6
7 library icinga;
8
9 namespace icinga
10 {
11
12 class Host : Checkable
13 {
14         load_after ApiListener;
15         load_after Endpoint;
16         load_after Zone;
17
18         [config, no_user_modify, required] array(name(HostGroup)) groups {
19                 default {{{ return new Array(); }}}
20         };
21
22         [config] String display_name {
23                 get {{{
24                         if (m_DisplayName.IsEmpty())
25                                 return GetName();
26                         else
27                                 return m_DisplayName;
28                 }}}
29         };
30
31         [config] String address;
32         [config] String address6;
33
34         [enum, no_storage] HostState "state" {
35                 get;
36         };
37         [enum, no_storage] HostState last_state {
38                 get;
39         };
40         [enum, no_storage] HostState last_hard_state {
41                 get;
42         };
43         [state] Timestamp last_state_up;
44         [state] Timestamp last_state_down;
45 };
46
47 }