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