rsmp 0.42.0 → 0.42.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/.rubocop.yml +1 -0
- data/Gemfile.lock +2 -2
- data/lib/rsmp/cli.rb +2 -1
- data/lib/rsmp/proxy/site/site_proxy.rb +5 -6
- data/lib/rsmp/tlc/modules/modes.rb +2 -2
- data/lib/rsmp/tlc/modules/system.rb +26 -12
- data/lib/rsmp/version.rb +1 -1
- 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: 49c61e299fa55246bbee0c3c0bbd28f294dc652fdcb754020292738bdd4b7e2f
|
|
4
|
+
data.tar.gz: 688d17de1f51cfd5a82b7c71b4d49db20365fdace976d481eaae93973400edd1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 981237d8987c178ef8a9bca82ad3c6735553bc04165680da82b4b60cef9f40db4349db5ab9faa7fd10612516796e1ea33759e12578d6e0a165b4d0c3a36666d8
|
|
7
|
+
data.tar.gz: 2a0832841d760be46b2d507b391726734a1036dc191545c33f380fd27a3f4cce58e78272067ffaa51aebd97333c495b8624122055b0f89bef9df80df15f37b53
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rsmp (0.42.
|
|
4
|
+
rsmp (0.42.2)
|
|
5
5
|
async (~> 2.32)
|
|
6
6
|
colorize (~> 1.1)
|
|
7
7
|
io-endpoint (~> 0.15)
|
|
@@ -121,7 +121,7 @@ GEM
|
|
|
121
121
|
rubocop (>= 1.72.1)
|
|
122
122
|
ruby-progressbar (1.13.0)
|
|
123
123
|
simpleidn (0.2.3)
|
|
124
|
-
sus (0.
|
|
124
|
+
sus (0.36.0)
|
|
125
125
|
sus-fixtures-async (0.2.0)
|
|
126
126
|
async
|
|
127
127
|
sus (~> 0.10)
|
data/lib/rsmp/cli.rb
CHANGED
|
@@ -86,7 +86,8 @@ module RSMP
|
|
|
86
86
|
|
|
87
87
|
def apply_basic_site_options(settings)
|
|
88
88
|
settings['site_id'] = options[:id] if options[:id]
|
|
89
|
-
settings['core_version'] = options[:core] if options[:core]
|
|
89
|
+
settings['core_version'] = options[:core] || ENV['CORE_VERSION'] if options[:core] || ENV['CORE_VERSION']
|
|
90
|
+
settings['sxl_version'] = ENV['SXL_VERSION'] if ENV['SXL_VERSION']
|
|
90
91
|
end
|
|
91
92
|
|
|
92
93
|
def parse_supervisors(settings)
|
|
@@ -50,8 +50,7 @@ module RSMP
|
|
|
50
50
|
|
|
51
51
|
def handshake_complete
|
|
52
52
|
super
|
|
53
|
-
|
|
54
|
-
log "Connection to site #{@site_id} established, using core #{@core_version}, #{@sxl} #{sanitized_sxl_version}",
|
|
53
|
+
log "Connection to site #{@site_id} established, using core #{@core_version}, #{@sxl} #{@site_sxl_version}",
|
|
55
54
|
level: :info
|
|
56
55
|
start_watchdog
|
|
57
56
|
end
|
|
@@ -126,12 +125,12 @@ module RSMP
|
|
|
126
125
|
# note that the type comes from the site config, while the version
|
|
127
126
|
# comes from the Version message send by the site
|
|
128
127
|
type = @site_settings['sxl']
|
|
129
|
-
version = message.attribute
|
|
130
|
-
RSMP::Schema.find_schema! type, version
|
|
128
|
+
version = RSMP::Schema.sanitize_version(message.attribute('SXL'))
|
|
129
|
+
RSMP::Schema.find_schema! type, version
|
|
131
130
|
|
|
132
|
-
# store sxl version requested by site
|
|
131
|
+
# store sanitized sxl version requested by site
|
|
133
132
|
# TODO should check agaist site settings
|
|
134
|
-
@site_sxl_version =
|
|
133
|
+
@site_sxl_version = version
|
|
135
134
|
rescue RSMP::Schema::UnknownSchemaError => e
|
|
136
135
|
dont_acknowledge message, "Rejected #{message.type} message,", e.to_s
|
|
137
136
|
end
|
|
@@ -196,8 +196,8 @@ module RSMP
|
|
|
196
196
|
|
|
197
197
|
# S0006 - Emergency route status (deprecated, use S0035)
|
|
198
198
|
def handle_s0006(_status_code, status_name = nil, options = {})
|
|
199
|
-
if Proxy.version_meets_requirement? options[:sxl_version],
|
|
200
|
-
|
|
199
|
+
if RSMP::Proxy.version_meets_requirement? options[:sxl_version],
|
|
200
|
+
'>=1.2.0'
|
|
201
201
|
log 'S0006 is depreciated, use S0035 instead.',
|
|
202
202
|
level: :warning
|
|
203
203
|
end
|
|
@@ -63,22 +63,36 @@ module RSMP
|
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
# S0091 - Operator logged in/out OP-panel
|
|
66
|
-
def handle_s0091(_status_code, status_name = nil,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
def handle_s0091(_status_code, status_name = nil, options = {})
|
|
67
|
+
if RSMP::Proxy.version_meets_requirement?(options[:sxl_version], '>=1.1')
|
|
68
|
+
case status_name
|
|
69
|
+
when 'user'
|
|
70
|
+
TrafficControllerSite.make_status 0
|
|
71
|
+
end
|
|
72
|
+
else
|
|
73
|
+
case status_name
|
|
74
|
+
when 'user'
|
|
75
|
+
TrafficControllerSite.make_status 'nobody'
|
|
76
|
+
when 'status'
|
|
77
|
+
TrafficControllerSite.make_status 'logout'
|
|
78
|
+
end
|
|
72
79
|
end
|
|
73
80
|
end
|
|
74
81
|
|
|
75
82
|
# S0092 - Operator logged in/out web-interface
|
|
76
|
-
def handle_s0092(_status_code, status_name = nil,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
def handle_s0092(_status_code, status_name = nil, options = {})
|
|
84
|
+
if RSMP::Proxy.version_meets_requirement?(options[:sxl_version], '>=1.1')
|
|
85
|
+
case status_name
|
|
86
|
+
when 'user'
|
|
87
|
+
TrafficControllerSite.make_status 0
|
|
88
|
+
end
|
|
89
|
+
else
|
|
90
|
+
case status_name
|
|
91
|
+
when 'user'
|
|
92
|
+
TrafficControllerSite.make_status 'nobody'
|
|
93
|
+
when 'status'
|
|
94
|
+
TrafficControllerSite.make_status 'logout'
|
|
95
|
+
end
|
|
82
96
|
end
|
|
83
97
|
end
|
|
84
98
|
|
data/lib/rsmp/version.rb
CHANGED