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