3b92118a2fd8974dfa2212a6ea31b2ef985b664b
[groupbasedpolicy.git] / groupbasedpolicy / src / main / yang / operationalstate / health.yang
1 module health {
2     namespace "urn:opendaylight:health";
3     prefix "health";
4
5     import gbp-common {prefix gbp-common;}
6     import ietf-inet-types {prefix inet;}
7     import ietf-yang-types {prefix yang;}
8     import fault-rule {prefix fault-rule;}
9
10     revision 2015-04-28 {
11         description "Initial revision";
12     }
13
14     typedef severity {
15             type enumeration {
16                 enum emergency {
17                     description
18                                         "A panic condition";
19                 }
20                 enum alert {
21                     description
22                                         "Should be corrected immediately";
23                 }
24                 enum critical {
25                     description
26                                         "Should be corrected immediately";
27                 }
28                 enum error {
29                     description
30                                         "Non-urgent failure";
31                 }
32                 enum warning {
33                     description
34                                         "Indication that an error will occur if action is not taken";
35                 }
36                 enum informational {
37                     description
38                                         "Normal operational events";
39                 }
40                 enum trace {
41                     description
42                                         "System debug";
43                 }
44             }
45     }
46
47     container faults {
48
49         list fault {
50             key "id";
51             leaf id {
52                 description "A unique ID for the fault";
53                 type gbp-common:unique-id;
54                 mandatory true;
55
56             }
57             leaf cause {
58                 description "A user-visible name for the tenant";
59                 type gbp-common:description;
60             }
61             leaf description {
62                 description "A user-readable description for the tenant";
63                 type gbp-common:description;
64             }
65             leaf counter {
66                 description "Occurences of this fault";
67                 type yang:counter32;
68             }
69             leaf trigger {
70                 type fault-rule:rule;
71             }
72             leaf created {
73                 type yang:timestamp;
74             }
75             leaf modified {
76                 type yang:timestamp;
77             }
78             leaf component {
79                 type gbp-common:description;
80             }
81             leaf highest-severity {
82                 type severity;
83             }
84             leaf current-severity {
85                 type severity;
86             }
87             leaf previos-severity {
88                 type severity;
89             }
90
91         }
92     }
93 }