- Instrumentation, leveraging data store instead of log to generate sane log messages.
Change-Id: I5e7eafd8a7f527c77fd5f47b3bc41b65b8cd0ed5
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
--- /dev/null
+// Contents of "fault-rule"
+module fault-rule {
+ namespace "urn:opendaylight:fault-rule";
+ prefix "fault-rule";
+
+ revision 2015-04-28 {
+ description "Initial revision";
+ }
+
+ typedef rule {type string;}
+
+ container fault-rules {
+ description "stuff";
+
+ }
+}
--- /dev/null
+// Contents of "fault-instance"
+module fault-instance {
+ namespace "urn:opendaylight:fault-instance";
+ prefix "fault-instance";
+
+ import gbp-common {prefix gbp-common;}
+ import ietf-inet-types {prefix inet;}
+ import ietf-yang-types {prefix yang;}
+ import fault-rule {prefix fault-rule;}
+
+ revision 2015-04-28 {
+ description "Initial revision";
+ }
+
+ typedef severity {
+ type enumeration {
+ enum emergency {
+ description
+ "A panic condition";
+ }
+ enum alert {
+ description
+ "Should be corrected immediately";
+ }
+ enum critical {
+ description
+ "Should be corrected immediately";
+ }
+ enum error {
+ description
+ "Non-urgent failure";
+ }
+ enum warning {
+ description
+ "Indication that an error will occur if action is not taken";
+ }
+ enum informational {
+ description
+ "Normal operational events";
+ }
+ enum trace {
+ description
+ "System debug";
+ }
+ }
+ }
+
+ container faults {
+
+ list fault {
+ key "id";
+ leaf id {
+ description "A unique ID for the fault";
+ type gbp-common:unique-id;
+ mandatory true;
+
+ }
+ leaf cause {
+ description "A user-visible name for the tenant";
+ type gbp-common:description;
+ }
+ leaf description {
+ description "A user-readable description for the tenant";
+ type gbp-common:description;
+ }
+ leaf counter {
+ description "Occurences of this fault";
+ type yang:counter32;
+ }
+ leaf trigger {
+ type fault-rule:rule;
+ }
+ leaf created {
+ type yang:timestamp;
+ }
+ leaf modified {
+ type yang:timestamp;
+ }
+ leaf component {
+ description "his should be a leafref or a choice between leafref and description.
+ This allows us to segment by tenant and component.";
+ type gbp-common:description;
+ }
+ leaf highest-severity {
+ type severity;
+ }
+ leaf current-severity {
+ type severity;
+ }
+ leaf previous-severity {
+ type severity;
+ }
+
+ }
+ }
+}
--- /dev/null
+// Contents of "fault-rule"
+module health-rule {
+ namespace "urn:opendaylight:health-rule";
+ prefix "health-rule";
+
+ revision 2015-04-28 {
+ description "Initial revision";
+ }
+
+ typedef rule {type string;}
+
+ container health-rules {
+ description "Objective rule contructs for health score formula";
+
+ }
+
+ container health-score-faults {
+
+ }
+
+ container health-score {
+
+ }
+}
--- /dev/null
+module health {
+ namespace "urn:opendaylight:health";
+ prefix "health";
+
+ import gbp-common {prefix gbp-common;}
+ import ietf-inet-types {prefix inet;}
+ import ietf-yang-types {prefix yang;}
+ import fault-rule {prefix fault-rule;}
+
+ revision 2015-04-28 {
+ description "Initial revision";
+ }
+
+ typedef severity {
+ type enumeration {
+ enum emergency {
+ description
+ "A panic condition";
+ }
+ enum alert {
+ description
+ "Should be corrected immediately";
+ }
+ enum critical {
+ description
+ "Should be corrected immediately";
+ }
+ enum error {
+ description
+ "Non-urgent failure";
+ }
+ enum warning {
+ description
+ "Indication that an error will occur if action is not taken";
+ }
+ enum informational {
+ description
+ "Normal operational events";
+ }
+ enum trace {
+ description
+ "System debug";
+ }
+ }
+ }
+
+ container faults {
+
+ list fault {
+ key "id";
+ leaf id {
+ description "A unique ID for the fault";
+ type gbp-common:unique-id;
+ mandatory true;
+
+ }
+ leaf cause {
+ description "A user-visible name for the tenant";
+ type gbp-common:description;
+ }
+ leaf description {
+ description "A user-readable description for the tenant";
+ type gbp-common:description;
+ }
+ leaf counter {
+ description "Occurences of this fault";
+ type yang:counter32;
+ }
+ leaf trigger {
+ type fault-rule:rule;
+ }
+ leaf created {
+ type yang:timestamp;
+ }
+ leaf modified {
+ type yang:timestamp;
+ }
+ leaf component {
+ type gbp-common:description;
+ }
+ leaf highest-severity {
+ type severity;
+ }
+ leaf current-severity {
+ type severity;
+ }
+ leaf previos-severity {
+ type severity;
+ }
+
+ }
+ }
+}