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