trisulrp 2.2.8 → 3.1.1
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/Gemfile +2 -2
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/lib/trisulrp.rb +0 -2
- data/lib/trisulrp/protocol.rb +205 -121
- data/lib/trisulrp/trp.pb.rb +753 -775
- data/lib/trisulrp/trp.proto +688 -494
- data/trisulrp.gemspec +12 -13
- metadata +5 -6
- data/lib/trisulrp/utils.rb +0 -215
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c2e757a7bc1175c201b874b019355dcc7767195
|
4
|
+
data.tar.gz: 726025203f6357c6d9534a3fcacd96323681a3d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 879228c4ceffd86ea132bed1c2262351d6d40a373d992761a272ceecee97df0ba32286a66b8e2a951203365dd2a6ddbe3250a37aa464aa320f387345ab5dae7d
|
7
|
+
data.tar.gz: 47ae512ff07dda3f2af5e1db5296f611c4700bdea578150e4596ae70b9b3c282bf661bde4a63933e186040f57870f60b0b6b43b8cfdfb1485159a7c5137ef718
|
data/Gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
|
3
3
|
# Add dependencies required to use your gem here.
|
4
|
-
gem "
|
4
|
+
gem "protobuf"
|
5
5
|
|
6
6
|
|
7
7
|
# Add dependencies to develop your gem here.
|
@@ -9,6 +9,6 @@ gem "ruby-protocol-buffers"
|
|
9
9
|
group :development do
|
10
10
|
gem "shoulda"
|
11
11
|
gem "bundler"
|
12
|
-
gem "
|
12
|
+
gem "juwelier"
|
13
13
|
gem "simplecov"
|
14
14
|
end
|
data/Rakefile
CHANGED
@@ -9,8 +9,8 @@ rescue Bundler::BundlerError => e
|
|
9
9
|
end
|
10
10
|
require 'rake'
|
11
11
|
|
12
|
-
require '
|
13
|
-
|
12
|
+
require 'juwelier'
|
13
|
+
Juwelier::Tasks.new do |gem|
|
14
14
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
15
|
gem.name = "trisulrp"
|
16
16
|
gem.homepage = "http://github.com/vivekrajan/trisulrp"
|
@@ -24,7 +24,7 @@ Jeweler::Tasks.new do |gem|
|
|
24
24
|
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
25
25
|
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
26
26
|
end
|
27
|
-
|
27
|
+
Juwelier::RubygemsDotOrgTasks.new
|
28
28
|
|
29
29
|
require 'rdoc/task'
|
30
30
|
Rake::RDocTask.new do |rdoc|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.1
|
data/lib/trisulrp.rb
CHANGED
@@ -14,10 +14,8 @@ require 'trisulrp/trp.pb'
|
|
14
14
|
require 'trisulrp/guids.rb'
|
15
15
|
require 'trisulrp/keys.rb'
|
16
16
|
require 'trisulrp/protocol.rb'
|
17
|
-
require 'trisulrp/utils.rb'
|
18
17
|
|
19
18
|
include TrisulRP::Protocol
|
20
19
|
include TrisulRP::Guids
|
21
|
-
include TrisulRP::Utils
|
22
20
|
include TrisulRP::Keys
|
23
21
|
|
data/lib/trisulrp/protocol.rb
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
require 'openssl'
|
7
7
|
require 'socket'
|
8
8
|
require 'time'
|
9
|
+
require 'bigdecimal'
|
9
10
|
|
10
11
|
begin
|
11
12
|
FFI_RZMQ_AVAIL=true
|
@@ -117,27 +118,6 @@ module TrisulRP::Protocol
|
|
117
118
|
# raises an error if the server returns an ErrorResponse - this contains an error_message field
|
118
119
|
# which can tell you what went wrong
|
119
120
|
#
|
120
|
-
def get_response(conn,trp_request)
|
121
|
-
outbuf=""
|
122
|
-
outbuf=trp_request.serialize_to_string
|
123
|
-
|
124
|
-
conn.write([outbuf.length].pack("N*"))
|
125
|
-
conn.write(outbuf)
|
126
|
-
|
127
|
-
inbuf=""
|
128
|
-
inbuf = conn.read(4)
|
129
|
-
buflenarr=inbuf.unpack("N*")
|
130
|
-
datalen=buflenarr[0]
|
131
|
-
dataarray=conn.read(datalen)
|
132
|
-
resp =TRP::Message.new
|
133
|
-
resp.parse dataarray
|
134
|
-
if resp.trp_command == TRP::Message::Command::ERROR_RESPONSE
|
135
|
-
print "TRP ErrorResponse: #{resp.error_response.error_message}\n"
|
136
|
-
raise resp.error_response.error_message
|
137
|
-
end
|
138
|
-
yield unwrap_response(resp) if block_given?
|
139
|
-
return unwrap_response(resp)
|
140
|
-
end
|
141
121
|
|
142
122
|
# Using ZMQ to Dispatch request to server & get response
|
143
123
|
#
|
@@ -158,35 +138,61 @@ module TrisulRP::Protocol
|
|
158
138
|
# raises an error if the server returns an ErrorResponse - this contains an error_message field
|
159
139
|
# which can tell you what went wrong
|
160
140
|
#
|
161
|
-
def get_response_zmq(endpoint, trp_request)
|
141
|
+
def get_response_zmq(endpoint, trp_request, timeout_seconds = -1 )
|
142
|
+
|
162
143
|
|
163
144
|
outbuf=""
|
164
145
|
|
165
146
|
# out
|
166
|
-
|
147
|
+
outbuf=trp_request.encode
|
167
148
|
ctx=ZMQ::Context.new
|
168
149
|
sock = ctx.socket(ZMQ::REQ)
|
150
|
+
|
151
|
+
# time out for context termination
|
152
|
+
sock.setsockopt(ZMQ::LINGER, 5*1_000)
|
153
|
+
|
154
|
+
# Initialize a poll set
|
155
|
+
poller = ZMQ::Poller.new
|
156
|
+
poller.register(sock, ZMQ::POLLIN)
|
157
|
+
|
158
|
+
|
169
159
|
sock.connect(endpoint)
|
170
160
|
sock.send_string(outbuf)
|
171
161
|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
162
|
+
ret = poller.poll(timeout_seconds * 1_000 )
|
163
|
+
if ret == -1
|
164
|
+
sock.close
|
165
|
+
ctx.terminate
|
166
|
+
raise "zeromq poll error #{endpoint} "
|
167
|
+
end
|
168
|
+
if ret == 0
|
169
|
+
sock.close
|
170
|
+
ctx.terminate
|
171
|
+
raise "no registerted sockets #{endpoint} "
|
172
|
+
end
|
173
|
+
|
174
|
+
poller.readables.each do |rsock|
|
175
|
+
|
176
|
+
#in
|
177
|
+
dataarray=""
|
178
|
+
rsock.recv_string(dataarray)
|
179
|
+
resp =TRP::Message.new
|
180
|
+
resp.decode dataarray
|
181
|
+
if resp.trp_command.to_i == TRP::Message::Command::ERROR_RESPONSE
|
182
|
+
print "TRP ErrorResponse: #{resp.error_response.error_message}\n"
|
183
|
+
rsock.close
|
184
|
+
ctx.terminate
|
185
|
+
raise resp.error_response.error_message
|
186
|
+
end
|
187
|
+
|
188
|
+
rsock.close
|
181
189
|
ctx.terminate
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
ctx.terminate
|
190
|
+
unwrap_resp = unwrap_response(resp)
|
191
|
+
unwrap_resp.instance_variable_set("@trp_resp_command_id",resp.trp_command.to_i)
|
192
|
+
yield unwrap_resp if block_given?
|
193
|
+
return unwrap_resp
|
187
194
|
|
188
|
-
|
189
|
-
return unwrap_response(resp)
|
195
|
+
end
|
190
196
|
|
191
197
|
end
|
192
198
|
|
@@ -215,8 +221,8 @@ module TrisulRP::Protocol
|
|
215
221
|
def get_available_time(conn)
|
216
222
|
|
217
223
|
from_tm=to_tm=nil
|
218
|
-
req=mk_request(TRP::Message::Command::
|
219
|
-
:
|
224
|
+
req=mk_request(TRP::Message::Command::TIMESLICES_REQUEST,
|
225
|
+
:get_total_window => true )
|
220
226
|
|
221
227
|
if conn.is_a?(String)
|
222
228
|
resp = get_response_zmq(conn,req)
|
@@ -225,8 +231,8 @@ module TrisulRP::Protocol
|
|
225
231
|
end
|
226
232
|
|
227
233
|
|
228
|
-
from_tm = Time.at(resp.
|
229
|
-
to_tm = Time.at(resp.
|
234
|
+
from_tm = Time.at(resp.total_window.from.tv_sec)
|
235
|
+
to_tm = Time.at(resp.total_window.to.tv_sec)
|
230
236
|
|
231
237
|
return [from_tm,to_tm]
|
232
238
|
|
@@ -242,11 +248,54 @@ module TrisulRP::Protocol
|
|
242
248
|
#
|
243
249
|
def mk_time_interval(tmarr)
|
244
250
|
tint=TRP::TimeInterval.new
|
245
|
-
|
246
|
-
|
251
|
+
if ( tmarr[0].is_a? Integer)
|
252
|
+
tint.from=TRP::Timestamp.new(:tv_sec => tmarr[0], :tv_usec => 0)
|
253
|
+
tint.to=TRP::Timestamp.new(:tv_sec => tmarr[1], :tv_usec => 0)
|
254
|
+
elsif (tmarr[0].is_a? Time)
|
255
|
+
tint.from=TRP::Timestamp.new(:tv_sec => tmarr[0].tv_sec, :tv_usec => 0)
|
256
|
+
tint.to=TRP::Timestamp.new(:tv_sec => tmarr[1].tv_sec, :tv_usec => 0)
|
257
|
+
end
|
258
|
+
|
247
259
|
return tint
|
248
260
|
end
|
249
261
|
|
262
|
+
# Helper to allow assinging string to KeyT field
|
263
|
+
#
|
264
|
+
# instead of
|
265
|
+
# ..{ :source_ip => TRP::KeyT.new( :label => val ) }
|
266
|
+
#
|
267
|
+
# you can do
|
268
|
+
# ..{ :source_ip => val }
|
269
|
+
#
|
270
|
+
def fix_TRP_Fields(msg, params)
|
271
|
+
|
272
|
+
ti = params[:time_interval]
|
273
|
+
if ti.is_a? Array
|
274
|
+
params[:time_interval] = mk_time_interval(ti)
|
275
|
+
end
|
276
|
+
|
277
|
+
params.each do |k,v|
|
278
|
+
f = msg.get_field(k)
|
279
|
+
if v.is_a? String
|
280
|
+
if f.is_a? Protobuf::Field::MessageField and f.type_class.to_s == "TRP::KeyT"
|
281
|
+
params[k] = TRP::KeyT.new( :label => v )
|
282
|
+
elsif f.is_a? Protobuf::Field::Int64Field
|
283
|
+
params[k] = v.to_i
|
284
|
+
elsif f.is_a? Protobuf::Field::StringField and f.rule == :repeated
|
285
|
+
params[k] = v.split(',')
|
286
|
+
elsif f.is_a? Protobuf::Field::BoolField
|
287
|
+
params[k] = ( v == "true")
|
288
|
+
end
|
289
|
+
elsif v.is_a? BigDecimal or v.is_a? Float
|
290
|
+
if f.is_a? Protobuf::Field::Int64Field
|
291
|
+
params[k] = v.to_i
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
end
|
296
|
+
|
297
|
+
end
|
298
|
+
|
250
299
|
# Helper to create a TRP request object
|
251
300
|
#
|
252
301
|
# Read the TRP documentation wiki for a description of each command.
|
@@ -282,67 +331,107 @@ module TrisulRP::Protocol
|
|
282
331
|
# </code>
|
283
332
|
#
|
284
333
|
#
|
285
|
-
def mk_request(cmd_id,
|
286
|
-
|
334
|
+
def mk_request(cmd_id,in_params={})
|
335
|
+
params =in_params.dup
|
336
|
+
opts = {:trp_command=> cmd_id}
|
337
|
+
if params.has_key?(:destination_node)
|
338
|
+
opts[:destination_node] = params.delete(:destination_node)
|
339
|
+
end
|
340
|
+
if params.has_key?(:probe_id)
|
341
|
+
opts[:probe_id] = params.delete(:probe_id)
|
342
|
+
end
|
343
|
+
if params.has_key?(:run_async)
|
344
|
+
opts[:run_async] = params.delete(:run_async)
|
345
|
+
end
|
346
|
+
req = TRP::Message.new(opts)
|
287
347
|
case cmd_id
|
288
348
|
when TRP::Message::Command::HELLO_REQUEST
|
349
|
+
fix_TRP_Fields( TRP::HelloRequest, params)
|
289
350
|
req.hello_request = TRP::HelloRequest.new(params)
|
290
|
-
when TRP::Message::Command::
|
291
|
-
|
351
|
+
when TRP::Message::Command::COUNTER_GROUP_TOPPER_REQUEST
|
352
|
+
fix_TRP_Fields( TRP::CounterGroupTopperRequest, params)
|
353
|
+
req.counter_group_topper_request = TRP::CounterGroupTopperRequest.new(params)
|
292
354
|
when TRP::Message::Command::COUNTER_ITEM_REQUEST
|
355
|
+
fix_TRP_Fields( TRP::CounterItemRequest, params)
|
293
356
|
req.counter_item_request = TRP::CounterItemRequest.new(params)
|
294
|
-
when TRP::Message::Command::
|
295
|
-
|
296
|
-
|
297
|
-
req.controlled_counter_group_request = TRP::ControlledCounterGroupRequest.new(params)
|
298
|
-
when TRP::Message::Command::FILTERED_DATAGRAMS_REQUEST
|
299
|
-
req.filtered_datagram_request = TRP::FilteredDatagramRequest.new(params)
|
300
|
-
when TRP::Message::Command::CONTROLLED_CONTEXT_REQUEST
|
301
|
-
req.controlled_context_request = TRP::ControlledContextRequest.new(params)
|
357
|
+
when TRP::Message::Command::PCAP_REQUEST
|
358
|
+
fix_TRP_Fields( TRP::PcapRequest, params)
|
359
|
+
req.pcap_request = TRP::PcapRequest.new(params)
|
302
360
|
when TRP::Message::Command::SEARCH_KEYS_REQUEST
|
361
|
+
fix_TRP_Fields( TRP::SearchKeysRequest, params)
|
303
362
|
req.search_keys_request = TRP::SearchKeysRequest.new(params)
|
304
|
-
when TRP::Message::Command::BULK_COUNTER_ITEM_REQUEST
|
305
|
-
req.bulk_counter_item_request = TRP::BulkCounterItemRequest.new(params)
|
306
|
-
when TRP::Message::Command:: CGMONITOR_REQUEST
|
307
|
-
req.cgmonitor_request = TRP::CgmonitorRequest.new(params)
|
308
|
-
when TRP::Message::Command::TOPPER_SNAPSHOT_REQUEST
|
309
|
-
req.topper_snapshot_request = TRP::TopperSnapshotRequest.new(params)
|
310
363
|
when TRP::Message::Command::UPDATE_KEY_REQUEST
|
364
|
+
fix_TRP_Fields( TRP::UpdateKeyRequest, params)
|
311
365
|
req.update_key_request = TRP::UpdateKeyRequest.new(params)
|
312
|
-
when TRP::Message::Command::
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
req.
|
318
|
-
when TRP::Message::Command::
|
319
|
-
|
320
|
-
|
321
|
-
req.alert_item_request = TRP::AlertItemRequest.new(params)
|
322
|
-
when TRP::Message::Command::ALERT_GROUP_REQUEST
|
323
|
-
req.alert_group_request = TRP::AlertGroupRequest.new(params)
|
324
|
-
when TRP::Message::Command::RESOURCE_ITEM_REQUEST
|
325
|
-
req.resource_item_request = TRP::ResourceItemRequest.new(params)
|
326
|
-
when TRP::Message::Command::RESOURCE_GROUP_REQUEST
|
327
|
-
req.resource_group_request = TRP::ResourceGroupRequest.new(params)
|
328
|
-
when TRP::Message::Command::KEY_LOOKUP_REQUEST
|
329
|
-
req.key_lookup_request = TRP::KeyLookupRequest.new(params)
|
366
|
+
when TRP::Message::Command::PROBE_STATS_REQUEST
|
367
|
+
fix_TRP_Fields( TRP::ProbeStatsRequest, params)
|
368
|
+
req.probe_stats_request = TRP::ProbeStatsRequest.new(params)
|
369
|
+
when TRP::Message::Command::QUERY_ALERTS_REQUEST
|
370
|
+
fix_TRP_Fields( TRP::QueryAlertsRequest, params)
|
371
|
+
req.query_alerts_request = TRP::QueryAlertsRequest.new(params)
|
372
|
+
when TRP::Message::Command::QUERY_RESOURCES_REQUEST
|
373
|
+
fix_TRP_Fields( TRP::QueryResourcesRequest, params)
|
374
|
+
req.query_resources_request = TRP::QueryResourcesRequest.new(params)
|
330
375
|
when TRP::Message::Command::COUNTER_GROUP_INFO_REQUEST
|
376
|
+
fix_TRP_Fields( TRP::CounterGroupInfoRequest, params)
|
331
377
|
req.counter_group_info_request = TRP::CounterGroupInfoRequest.new(params)
|
332
378
|
when TRP::Message::Command::SESSION_TRACKER_REQUEST
|
379
|
+
fix_TRP_Fields( TRP::SessionTrackerRequest, params)
|
333
380
|
req.session_tracker_request = TRP::SessionTrackerRequest.new(params)
|
334
381
|
when TRP::Message::Command::QUERY_SESSIONS_REQUEST
|
382
|
+
fix_TRP_Fields( TRP::QuerySessionsRequest, params)
|
335
383
|
req.query_sessions_request = TRP::QuerySessionsRequest.new(params)
|
336
384
|
when TRP::Message::Command::GREP_REQUEST
|
385
|
+
fix_TRP_Fields( TRP::GrepRequest, params)
|
337
386
|
req.grep_request = TRP::GrepRequest.new(params)
|
338
387
|
when TRP::Message::Command::KEYSPACE_REQUEST
|
339
|
-
|
388
|
+
fix_TRP_Fields( TRP::KeySpaceRequest, params)
|
389
|
+
req.key_space_request = TRP::KeySpaceRequest.new(params)
|
340
390
|
when TRP::Message::Command::TOPPER_TREND_REQUEST
|
391
|
+
fix_TRP_Fields( TRP::TopperTrendRequest, params)
|
341
392
|
req.topper_trend_request = TRP::TopperTrendRequest.new(params)
|
342
|
-
when TRP::Message::Command::QUERY_PDP_REQUEST
|
343
|
-
req.query_pdp_request = TRP::QueryPDPRequest.new(params)
|
344
393
|
when TRP::Message::Command::STAB_PUBSUB_CTL
|
394
|
+
fix_TRP_Fields( TRP::SubscribeCtl, params)
|
345
395
|
req.subscribe_ctl = TRP::SubscribeCtl.new(params)
|
396
|
+
when TRP::Message::Command::TIMESLICES_REQUEST
|
397
|
+
fix_TRP_Fields( TRP::TimeSlicesRequest, params)
|
398
|
+
req.time_slices_request = TRP::TimeSlicesRequest.new(params)
|
399
|
+
when TRP::Message::Command::DELETE_ALERTS_REQUEST
|
400
|
+
fix_TRP_Fields( TRP::DeleteAlertsRequest, params)
|
401
|
+
req.delete_alerts_request = TRP::DeleteAlertsRequest.new(params)
|
402
|
+
when TRP::Message::Command::QUERY_FTS_REQUEST
|
403
|
+
fix_TRP_Fields( TRP::QueryFTSRequest, params)
|
404
|
+
req.query_fts_request = TRP::QueryFTSRequest.new(params)
|
405
|
+
when TRP::Message::Command::METRICS_SUMMARY_REQUEST
|
406
|
+
fix_TRP_Fields( TRP::MetricsSummaryRequest, params)
|
407
|
+
req.metrics_summary_request = TRP::MetricsSummaryRequest.new(params)
|
408
|
+
when TRP::Message::Command::CONTEXT_INFO_REQUEST
|
409
|
+
fix_TRP_Fields( TRP::ContextInfoRequest, params)
|
410
|
+
req.context_info_request = TRP::ContextInfoRequest.new(params)
|
411
|
+
when TRP::Message::Command::CONTEXT_CONFIG_REQUEST
|
412
|
+
fix_TRP_Fields( TRP::ContextConfigRequest, params)
|
413
|
+
req.context_config_request = TRP::ContextConfigRequest.new(params)
|
414
|
+
when TRP::Message::Command::PCAP_SLICES_REQUEST
|
415
|
+
fix_TRP_Fields( TRP::PcapSlicesRequest, params)
|
416
|
+
req.pcap_slices_request = TRP::PcapSlicesRequest.new(params)
|
417
|
+
when TRP::Message::Command::LOG_REQUEST
|
418
|
+
fix_TRP_Fields( TRP::LogRequest, params)
|
419
|
+
req.log_request = TRP::LogRequest.new(params)
|
420
|
+
when TRP::Message::Command::CONTEXT_START_REQUEST
|
421
|
+
fix_TRP_Fields( TRP::ContextStartRequest, params)
|
422
|
+
req.context_start_request = TRP::ContextStartRequest.new(params)
|
423
|
+
when TRP::Message::Command::CONTEXT_STOP_REQUEST
|
424
|
+
fix_TRP_Fields( TRP::ContextStopRequest, params)
|
425
|
+
req.context_stop_request = TRP::ContextStopRequest.new(params)
|
426
|
+
when TRP::Message::Command::DOMAIN_REQUEST
|
427
|
+
fix_TRP_Fields( TRP::DomainRequest, params)
|
428
|
+
req.domain_request = TRP::DomainRequest.new(params)
|
429
|
+
when TRP::Message::Command::ASYNC_REQUEST
|
430
|
+
fix_TRP_Fields( TRP::AsyncRequest, params)
|
431
|
+
req.async_request = TRP::AsyncRequest.new(params)
|
432
|
+
when TRP::Message::Command::NODE_CONFIG_REQUEST
|
433
|
+
fix_TRP_Fields( TRP::NodeConfigRequest, params)
|
434
|
+
req.node_config_request = TRP::NodeConfigRequest.new(params)
|
346
435
|
else
|
347
436
|
raise "Unknown TRP command ID"
|
348
437
|
end
|
@@ -385,49 +474,27 @@ module TrisulRP::Protocol
|
|
385
474
|
#
|
386
475
|
#
|
387
476
|
def unwrap_response(resp)
|
388
|
-
case resp.trp_command
|
477
|
+
case resp.trp_command.to_i
|
389
478
|
when TRP::Message::Command::HELLO_RESPONSE
|
390
479
|
resp.hello_response
|
391
|
-
when TRP::Message::Command::
|
392
|
-
resp.
|
480
|
+
when TRP::Message::Command::COUNTER_GROUP_TOPPER_RESPONSE
|
481
|
+
resp.counter_group_topper_response
|
393
482
|
when TRP::Message::Command::COUNTER_ITEM_RESPONSE
|
394
483
|
resp.counter_item_response
|
395
484
|
when TRP::Message::Command::OK_RESPONSE
|
396
485
|
resp.ok_response
|
397
|
-
when TRP::Message::Command::
|
398
|
-
resp.
|
399
|
-
when TRP::Message::Command::FILTERED_DATAGRAMS_RESPONSE
|
400
|
-
resp.filtered_datagram_response
|
401
|
-
when TRP::Message::Command::CONTROLLED_CONTEXT_RESPONSE
|
402
|
-
resp.controlled_context_response
|
486
|
+
when TRP::Message::Command::PCAP_RESPONSE
|
487
|
+
resp.pcap_response
|
403
488
|
when TRP::Message::Command::SEARCH_KEYS_RESPONSE
|
404
489
|
resp.search_keys_response
|
405
|
-
when TRP::Message::Command::BULK_COUNTER_ITEM_RESPONSE
|
406
|
-
resp.bulk_counter_item_response
|
407
|
-
when TRP::Message::Command:: CGMONITOR_RESPONSE
|
408
|
-
resp.cgmonitor_response
|
409
|
-
when TRP::Message::Command::TOPPER_SNAPSHOT_RESPONSE
|
410
|
-
resp.topper_snapshot_response
|
411
490
|
when TRP::Message::Command::UPDATE_KEY_RESPONSE
|
412
491
|
resp.update_key_response
|
413
|
-
when TRP::Message::Command::
|
414
|
-
resp.
|
415
|
-
when TRP::Message::Command::
|
416
|
-
resp.
|
417
|
-
when TRP::Message::Command::
|
418
|
-
resp.
|
419
|
-
when TRP::Message::Command::SESSION_GROUP_RESPONSE
|
420
|
-
resp.session_group_response
|
421
|
-
when TRP::Message::Command::ALERT_ITEM_RESPONSE
|
422
|
-
resp.alert_item_response
|
423
|
-
when TRP::Message::Command::ALERT_GROUP_RESPONSE
|
424
|
-
resp.alert_group_response
|
425
|
-
when TRP::Message::Command::RESOURCE_ITEM_RESPONSE
|
426
|
-
resp.resource_item_response
|
427
|
-
when TRP::Message::Command::RESOURCE_GROUP_RESPONSE
|
428
|
-
resp.resource_group_response
|
429
|
-
when TRP::Message::Command::KEY_LOOKUP_RESPONSE
|
430
|
-
resp.key_lookup_response
|
492
|
+
when TRP::Message::Command::PROBE_STATS_RESPONSE
|
493
|
+
resp.probe_stats_response
|
494
|
+
when TRP::Message::Command::QUERY_ALERTS_RESPONSE
|
495
|
+
resp.query_alerts_response
|
496
|
+
when TRP::Message::Command::QUERY_RESOURCES_RESPONSE
|
497
|
+
resp.query_resources_response
|
431
498
|
when TRP::Message::Command::COUNTER_GROUP_INFO_RESPONSE
|
432
499
|
resp.counter_group_info_response
|
433
500
|
when TRP::Message::Command::SESSION_TRACKER_RESPONSE
|
@@ -437,13 +504,30 @@ module TrisulRP::Protocol
|
|
437
504
|
when TRP::Message::Command::GREP_RESPONSE
|
438
505
|
resp.grep_response
|
439
506
|
when TRP::Message::Command::KEYSPACE_RESPONSE
|
440
|
-
resp.
|
507
|
+
resp.key_space_response
|
441
508
|
when TRP::Message::Command::TOPPER_TREND_RESPONSE
|
442
509
|
resp.topper_trend_response
|
443
|
-
when TRP::Message::Command::
|
444
|
-
resp.
|
510
|
+
when TRP::Message::Command::QUERY_FTS_RESPONSE
|
511
|
+
resp.query_fts_response
|
512
|
+
when TRP::Message::Command::TIMESLICES_RESPONSE
|
513
|
+
resp.time_slices_response
|
514
|
+
when TRP::Message::Command::METRICS_SUMMARY_RESPONSE
|
515
|
+
resp.metrics_summary_response
|
516
|
+
when TRP::Message::Command::CONTEXT_INFO_RESPONSE
|
517
|
+
resp.context_info_response
|
518
|
+
when TRP::Message::Command::CONTEXT_CONFIG_RESPONSE
|
519
|
+
resp.context_config_response
|
520
|
+
when TRP::Message::Command::LOG_RESPONSE
|
521
|
+
resp.log_response
|
522
|
+
when TRP::Message::Command::DOMAIN_RESPONSE
|
523
|
+
resp.domain_response
|
524
|
+
when TRP::Message::Command::NODE_CONFIG_RESPONSE
|
525
|
+
resp.node_config_response
|
526
|
+
when TRP::Message::Command::ASYNC_RESPONSE
|
527
|
+
resp.async_response
|
445
528
|
else
|
446
|
-
|
529
|
+
|
530
|
+
raise "#{resp.trp_commandi.to_i} Unknown TRP command ID"
|
447
531
|
end
|
448
532
|
end
|
449
533
|
end
|