Skip to content

Commit

Permalink
Substitute references to leafref datatype for string
Browse files Browse the repository at this point in the history
Since leafref datatype is not currently support by the yang library.
  • Loading branch information
dpino committed Aug 24, 2017
1 parent 4fde7bc commit 801a493
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions src/lib/yang/ietf-alarms.yang
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ module ietf-alarms {
3GPP Distinguished names for example.";
}


/*
* XXX: Temporarily replace leafref datatype for string as leafref is not supported.
list related-alarm {
key "resource alarm-type-id alarm-type-qualifier";
Expand Down Expand Up @@ -409,6 +412,31 @@ module ietf-alarms {
"The alarm qualifier for the related alarm.";
}
}
*/
list related-alarm {
key "resource alarm-type-id alarm-type-qualifier";

description
"References to related alarms. Note that the related alarm
might have been removed from the alarm list.";

leaf resource {
type string;
description
"The alarming resource for the related alarm.";
}
leaf alarm-type-id {
type string;
description
"The alarm type identifier for the related alarm.";
}
leaf alarm-type-qualifier {
type string;
description
"The alarm qualifier for the related alarm.";
}
}

leaf-list impacted-resource {
type resource;
description
Expand Down Expand Up @@ -959,6 +987,8 @@ module ietf-alarms {
alarms. Conditions in the input are logically ANDed. If no
input condition is given, all alarms are compressed.";
input {
/*
* XXX: Temporarily replace leafref datatype for string as leafref is not supported.
leaf resource {
type leafref {
path "/alarms/alarm-list/alarm/resource";
Expand All @@ -981,6 +1011,22 @@ module ietf-alarms {
description
"Compress the alarms with this alarm-type-qualifier.";
}
*/
leaf resource {
type string;
description
"Compress the alarms with this resource.";
}
leaf alarm-type-id {
type string;
description
"Compress alarms with this alarm-type-id.";
}
leaf alarm-type-qualifier {
type string;
description
"Compress the alarms with this alarm-type-qualifier.";
}
}
output {
leaf compressed-alarms {
Expand Down Expand Up @@ -1148,6 +1194,8 @@ module ietf-alarms {
"This notification is used to report that an operator
acted upon an alarm.";

/*
* XXX: Temporarily replace leafref datatype for string as leafref is not supported.
leaf resource {
type leafref {
path "/alarms/alarm-list/alarm/resource";
Expand Down Expand Up @@ -1177,6 +1225,22 @@ module ietf-alarms {
description
"The alarm qualifier for the alarm.";
}
*/
leaf resource {
type string;
description
"The alarming resource.";
}
leaf alarm-type-id {
type string;
description
"The alarm type identifier for the alarm.";
}
leaf alarm-type-qualifier {
type string;
description
"The alarm qualifier for the alarm.";
}
uses operator-parameters;
}
}

0 comments on commit 801a493

Please sign in to comment.