rsmp 0.53.1 → 0.53.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/lib/rsmp/collect/alarm_collector.rb +8 -1
- data/lib/rsmp/component/alarm_state.rb +6 -6
- data/lib/rsmp/message.rb +1 -1
- data/lib/rsmp/version.rb +1 -1
- data/schemas/core/3.2.0/alarm_issue.json +1 -1
- data/schemas/core/3.2.1/alarm_issue.json +1 -1
- data/schemas/core/3.2.2/alarm_issue.json +1 -1
- data/schemas/core/3.3.0/alarm_issue.json +1 -1
- data/schemas/tlc/1.3.0/defs/definitions.json +16 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c18e33005250515e950be688be2ed3d0070c379724885ca10268846a85d0b5d7
|
|
4
|
+
data.tar.gz: e9b7ab8838542eb7d0ece090c3944614dbbcd2d6b83c27e15de9a510bbd60856
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0cf38acb9093a3939e55d6b21d54ec37459b5950793105ea23a5c8a6633b24e9fb5a2cc53293fa7dc5f1580aa1eb8e412b5fcb987ad6080d6c4a4358a1a9ce13
|
|
7
|
+
data.tar.gz: 533839b68ef17834741085c7d0e7d1d023f7d997b335608e5f00365c45ba6e28af13d9deab55b1062f58f2f9f323aa1f0a463de09a34febac6ff32c909c18b1c
|
data/CHANGELOG.md
CHANGED
|
@@ -740,4 +740,8 @@ Initial release.
|
|
|
740
740
|
- allow fractional status subscription intervals for all older core versions to align with their specs.
|
|
741
741
|
|
|
742
742
|
## 0.53.1
|
|
743
|
-
- skip repeated status value checks for buffered values (`q=old`) and unknown subscription settings
|
|
743
|
+
- skip repeated status value checks for buffered values (`q=old`) and unknown subscription settings
|
|
744
|
+
|
|
745
|
+
## 0.53.2
|
|
746
|
+
- fix issues with Alarm enum casing
|
|
747
|
+
- update TLC schemas
|
data/Gemfile.lock
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
module RSMP
|
|
2
2
|
# Class for waiting for specific command responses
|
|
3
3
|
class AlarmCollector < Collector
|
|
4
|
+
ENUM_ATTRIBUTES = %w[aSp ack aS sS cat pri].freeze
|
|
5
|
+
|
|
4
6
|
def initialize(proxy, options = {})
|
|
5
7
|
@matcher = options[:matcher] || {}
|
|
6
8
|
super(proxy, options.merge(
|
|
@@ -27,12 +29,17 @@ module RSMP
|
|
|
27
29
|
when Regexp
|
|
28
30
|
return false if got !~ want
|
|
29
31
|
when String
|
|
30
|
-
return false
|
|
32
|
+
return false unless string_attribute_matches?(key, want, got)
|
|
31
33
|
end
|
|
32
34
|
end
|
|
33
35
|
true
|
|
34
36
|
end
|
|
35
37
|
|
|
38
|
+
def string_attribute_matches?(key, want, got)
|
|
39
|
+
# Schemas enforce wire casing; enum matching also supports older Core versions.
|
|
40
|
+
ENUM_ATTRIBUTES.include?(key) ? want.casecmp?(got) : want == got
|
|
41
|
+
end
|
|
42
|
+
|
|
36
43
|
def rvs_attributes_match?(message)
|
|
37
44
|
return true unless @matcher['rvs']
|
|
38
45
|
|
|
@@ -9,9 +9,9 @@ module RSMP
|
|
|
9
9
|
def self.create_from_message(component, message)
|
|
10
10
|
options = {
|
|
11
11
|
timestamp: RSMP::Clock.parse(message.attribute('aTs')),
|
|
12
|
-
acknowledged: message.attribute('ack') == '
|
|
13
|
-
suspended: message.attribute('
|
|
14
|
-
active: message.attribute('
|
|
12
|
+
acknowledged: message.attribute('ack').downcase == 'acknowledged',
|
|
13
|
+
suspended: message.attribute('sS').downcase == 'suspended',
|
|
14
|
+
active: message.attribute('aS').downcase == 'active',
|
|
15
15
|
category: message.attribute('cat'),
|
|
16
16
|
priority: message.attribute('pri').to_i,
|
|
17
17
|
rvs: message.attribute('rvs')
|
|
@@ -121,9 +121,9 @@ module RSMP
|
|
|
121
121
|
raise TimestampError, "timestamp is earlier than previous alarm #{message.m_id_short}" if older_message? message
|
|
122
122
|
ensure
|
|
123
123
|
@timestamp = RSMP::Clock.parse message.attribute('aTs')
|
|
124
|
-
@acknowledged = message.attribute('ack') == '
|
|
125
|
-
@suspended = message.attribute('sS') == '
|
|
126
|
-
@active = message.attribute('aS') == '
|
|
124
|
+
@acknowledged = message.attribute('ack').downcase == 'acknowledged'
|
|
125
|
+
@suspended = message.attribute('sS').downcase == 'suspended'
|
|
126
|
+
@active = message.attribute('aS').downcase == 'active'
|
|
127
127
|
@category = message.attribute('cat')
|
|
128
128
|
@priority = message.attribute('pri').to_i
|
|
129
129
|
@rvs = message.attribute('rvs')
|
data/lib/rsmp/message.rb
CHANGED
data/lib/rsmp/version.rb
CHANGED
|
@@ -68,9 +68,23 @@
|
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
70
|
"component_id": {
|
|
71
|
-
"description" : "
|
|
71
|
+
"description" : "Component ID",
|
|
72
72
|
"allOf" : [
|
|
73
|
-
{ "$ref" : "#/rsmp_string" }
|
|
73
|
+
{ "$ref" : "#/rsmp_string" },
|
|
74
|
+
{ "pattern" : "^[A-Za-z0-9_+=-]+(?:/[A-Za-z0-9_+=-]+)*$" }
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"component_id_selector": {
|
|
78
|
+
"description" : "Component selector",
|
|
79
|
+
"anyOf" : [
|
|
80
|
+
{ "$ref" : "#/component_id" },
|
|
81
|
+
{
|
|
82
|
+
"allOf" : [
|
|
83
|
+
{ "$ref" : "#/rsmp_string" },
|
|
84
|
+
{ "pattern" : "^[A-Za-z0-9_+=-]+(?:/[A-Za-z0-9_+=-]+)*/$" }
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{ "enum" : [ "/", "", null ] }
|
|
74
88
|
]
|
|
75
89
|
},
|
|
76
90
|
"component_type": {
|