trisulrp 2.0.5 → 2.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc727ea609ee05bb1dbb182163659b77b55bb6a0
4
- data.tar.gz: c60158c840151d4bcd4724da50f8072b9ba8e53a
3
+ metadata.gz: b1ac0e3642aaea73eac4fa4eb3c4a559444488f6
4
+ data.tar.gz: 40aa06ccece5bc45e4f6f63654e46c8e66a022c8
5
5
  SHA512:
6
- metadata.gz: 944977d6634b588530794221bd07c67f2dc73bf85f6e16a637f4517525bc163b41b2481ec9b8466904b1a1b5300a4e992d7e774665e11de5e491a23f4e1341d3
7
- data.tar.gz: 416f7ef0d36bd552268719a573459fd5f249740b7f21792e3c7c44146464bf1c825cf4260b8f905a3961db14bc3bcd81a232c90fd432fae3572cdcfd317266be
6
+ metadata.gz: d4f9c78685a9a72294247d65174aef76bf6bdecb9477b940699357354614311dc5ed0170c9b22d0ff1cddf0bcb4e8234574210c1a1e9831fcaba1321ddb9d3a2
7
+ data.tar.gz: a0de67b6bf980213aef1507a85268d46e51dfad91dc1d8313c85d8bec9fba11d3da336ab30cb5d45eef14f620838e630c91163e5a4961affd0719911c66d9e3d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.5
1
+ 2.2.7
@@ -7,6 +7,14 @@ require 'openssl'
7
7
  require 'socket'
8
8
  require 'time'
9
9
 
10
+ begin
11
+ FFI_RZMQ_AVAIL=true
12
+ require 'ffi-rzmq'
13
+ rescue
14
+ FFI_RZMQ_AVAIL=false
15
+ end
16
+
17
+
10
18
  # ==== TrisulRP::Protocol
11
19
  # Contains methods to help with common TRP tasks like
12
20
  # * creating connections
@@ -92,6 +100,12 @@ module TrisulRP::Protocol
92
100
 
93
101
  # Dispatch request to server & get response
94
102
  # [conn] TRP connection previously opened via TrisulRP::Protocol::connect
103
+ #
104
+ # - connection can a ZMQ endpoint string like zmq:ipc://.. if string starts
105
+ # with 'zmq:' it will be treated as ZMQ.
106
+ #
107
+ # Needs ffi-rzmq gem
108
+ #
95
109
  # [trp_request] a TRP request object, created directly or using the mk_request helper
96
110
  #
97
111
  # ==== Returns
@@ -106,9 +120,12 @@ module TrisulRP::Protocol
106
120
  def get_response(conn,trp_request)
107
121
  outbuf=""
108
122
  outbuf=trp_request.serialize_to_string
109
- conn.write([outbuf.length].pack("N*"))
110
- conn.write(outbuf)
111
- inbuf = conn.read(4)
123
+
124
+ conn.write([outbuf.length].pack("N*"))
125
+ conn.write(outbuf)
126
+
127
+ inbuf=""
128
+ inbuf = conn.read(4)
112
129
  buflenarr=inbuf.unpack("N*")
113
130
  datalen=buflenarr[0]
114
131
  dataarray=conn.read(datalen)
@@ -116,12 +133,64 @@ module TrisulRP::Protocol
116
133
  resp.parse dataarray
117
134
  if resp.trp_command == TRP::Message::Command::ERROR_RESPONSE
118
135
  print "TRP ErrorResponse: #{resp.error_response.error_message}\n"
119
- raise resp.error_response
136
+ raise resp.error_response.error_message
120
137
  end
121
138
  yield unwrap_response(resp) if block_given?
122
139
  return unwrap_response(resp)
123
140
  end
124
141
 
142
+ # Using ZMQ to Dispatch request to server & get response
143
+ #
144
+ # This is used by new webtrisul architecuter to connect to trisul_queryd
145
+ #
146
+ # [conn] - a ZMQ endpoint string like ipc://..
147
+ #
148
+ # Needs ffi-rzmq gem
149
+ #
150
+ # [trp_request] a TRP request object, created directly or using the mk_request helper
151
+ #
152
+ # ==== Returns
153
+ # ==== Yields
154
+ # a response object, you can then inspect the fields in the response and spawn additional
155
+ # requests if required
156
+ #
157
+ # ==== On error
158
+ # raises an error if the server returns an ErrorResponse - this contains an error_message field
159
+ # which can tell you what went wrong
160
+ #
161
+ def get_response_zmq(endpoint, trp_request)
162
+
163
+ outbuf=""
164
+
165
+ # out
166
+ outbuf=trp_request.serialize_to_string
167
+ ctx=ZMQ::Context.new
168
+ sock = ctx.socket(ZMQ::REQ)
169
+ sock.connect(endpoint)
170
+ sock.send_string(outbuf)
171
+
172
+
173
+ #in
174
+ dataarray=""
175
+ sock.recv_string(dataarray)
176
+ resp =TRP::Message.new
177
+ resp.parse dataarray
178
+ if resp.trp_command == TRP::Message::Command::ERROR_RESPONSE
179
+ print "TRP ErrorResponse: #{resp.error_response.error_message}\n"
180
+ sock.close
181
+ ctx.terminate
182
+ raise resp.error_response.error_message
183
+ end
184
+
185
+ sock.close
186
+ ctx.terminate
187
+
188
+ yield unwrap_response(resp) if block_given?
189
+ return unwrap_response(resp)
190
+
191
+ end
192
+
193
+
125
194
 
126
195
  # Query the total time window available in Trisul
127
196
  #
@@ -149,10 +218,15 @@ module TrisulRP::Protocol
149
218
  req=mk_request(TRP::Message::Command::COUNTER_GROUP_INFO_REQUEST,
150
219
  :counter_group => TrisulRP::Guids::CG_AGGREGATE)
151
220
 
152
- get_response(conn,req) do |resp|
153
- from_tm = Time.at(resp.group_details[0].time_interval.from.tv_sec)
154
- to_tm = Time.at(resp.group_details[0].time_interval.to.tv_sec)
155
- end
221
+ if conn.is_a?(String)
222
+ resp = get_response_zmq(conn,req)
223
+ else
224
+ resp = get_response(conn,req)
225
+ end
226
+
227
+
228
+ from_tm = Time.at(resp.group_details[0].time_interval.from.tv_sec)
229
+ to_tm = Time.at(resp.group_details[0].time_interval.to.tv_sec)
156
230
 
157
231
  return [from_tm,to_tm]
158
232
 
@@ -263,6 +337,12 @@ module TrisulRP::Protocol
263
337
  req.grep_request = TRP::GrepRequest.new(params)
264
338
  when TRP::Message::Command::KEYSPACE_REQUEST
265
339
  req.keyspace_request = TRP::KeySpaceRequest.new(params)
340
+ when TRP::Message::Command::TOPPER_TREND_REQUEST
341
+ 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
+ when TRP::Message::Command::STAB_PUBSUB_CTL
345
+ req.subscribe_ctl = TRP::SubscribeCtl.new(params)
266
346
  else
267
347
  raise "Unknown TRP command ID"
268
348
  end
@@ -358,6 +438,10 @@ module TrisulRP::Protocol
358
438
  resp.grep_response
359
439
  when TRP::Message::Command::KEYSPACE_RESPONSE
360
440
  resp.keyspace_response
441
+ when TRP::Message::Command::TOPPER_TREND_RESPONSE
442
+ resp.topper_trend_response
443
+ when TRP::Message::Command::QUERY_PDP_RESPONSE
444
+ resp.query_pdp_response
361
445
  else
362
446
  raise "Unknown TRP command ID"
363
447
  end
@@ -9,6 +9,7 @@ module TRP
9
9
  class TimeInterval < ::ProtocolBuffers::Message; end
10
10
  class StatsTuple < ::ProtocolBuffers::Message; end
11
11
  class MeterValues < ::ProtocolBuffers::Message; end
12
+ class MeterInfo < ::ProtocolBuffers::Message; end
12
13
  class KeyStats < ::ProtocolBuffers::Message; end
13
14
  class KeyDetails < ::ProtocolBuffers::Message; end
14
15
  class SessionID < ::ProtocolBuffers::Message; end
@@ -16,6 +17,7 @@ module TRP
16
17
  class ResourceID < ::ProtocolBuffers::Message; end
17
18
  class CounterGroupDetails < ::ProtocolBuffers::Message; end
18
19
  class SessionDetails < ::ProtocolBuffers::Message; end
20
+ class PDPDetails < ::ProtocolBuffers::Message; end
19
21
  class Message < ::ProtocolBuffers::Message; end
20
22
  class HelloRequest < ::ProtocolBuffers::Message; end
21
23
  class HelloResponse < ::ProtocolBuffers::Message; end
@@ -61,6 +63,11 @@ module TRP
61
63
  class GrepResponse < ::ProtocolBuffers::Message; end
62
64
  class KeySpaceRequest < ::ProtocolBuffers::Message; end
63
65
  class KeySpaceResponse < ::ProtocolBuffers::Message; end
66
+ class TopperTrendRequest < ::ProtocolBuffers::Message; end
67
+ class TopperTrendResponse < ::ProtocolBuffers::Message; end
68
+ class QueryPDPRequest < ::ProtocolBuffers::Message; end
69
+ class QueryPDPResponse < ::ProtocolBuffers::Message; end
70
+ class SubscribeCtl < ::ProtocolBuffers::Message; end
64
71
 
65
72
  # enums
66
73
  module AuthLevel
@@ -127,6 +134,39 @@ module TRP
127
134
 
128
135
  required :int32, :meter, 1
129
136
  repeated ::TRP::StatsTuple, :values, 2
137
+ optional :int64, :total, 3
138
+ optional :int64, :seconds, 4
139
+ end
140
+
141
+ class MeterInfo < ::ProtocolBuffers::Message
142
+ # forward declarations
143
+
144
+ # enums
145
+ module MeterType
146
+ include ::ProtocolBuffers::Enum
147
+
148
+ set_fully_qualified_name "TRP.MeterInfo.MeterType"
149
+
150
+ VT_INVALID = 0
151
+ VT_RATE_COUNTER_WITH_SLIDING_WINDOW = 1
152
+ VT_COUNTER = 2
153
+ VT_COUNTER_WITH_SLIDING_WINDOW = 3
154
+ VT_RATE_COUNTER = 4
155
+ VT_GAUGE = 5
156
+ VT_GAUGE_MIN_MAX_AVG = 6
157
+ VT_AUTO = 7
158
+ VT_RUNNING_COUNTER = 8
159
+ VT_AVERAGE = 9
160
+ end
161
+
162
+ set_fully_qualified_name "TRP.MeterInfo"
163
+
164
+ required :int32, :id, 1
165
+ required ::TRP::MeterInfo::MeterType, :type, 2
166
+ required :int32, :topcount, 3
167
+ required :string, :name, 4
168
+ optional :string, :description, 5
169
+ optional :string, :units, 6
130
170
  end
131
171
 
132
172
  class KeyStats < ::ProtocolBuffers::Message
@@ -176,6 +216,7 @@ module TRP
176
216
  optional :int64, :bucket_size, 3
177
217
  optional ::TRP::TimeInterval, :time_interval, 4
178
218
  optional :int64, :topper_bucket_size, 5
219
+ repeated ::TRP::MeterInfo, :meters, 6
179
220
  end
180
221
 
181
222
  class SessionDetails < ::ProtocolBuffers::Message
@@ -203,6 +244,31 @@ module TRP
203
244
  required :int64, :za_payload, 20
204
245
  required :int64, :setup_rtt, 21
205
246
  required :int64, :retransmissions, 22
247
+ optional :int64, :tracker_statval, 23
248
+ end
249
+
250
+ class PDPDetails < ::ProtocolBuffers::Message
251
+ set_fully_qualified_name "TRP.PDPDetails"
252
+
253
+ required ::TRP::SessionID, :session_id, 1
254
+ required :string, :ipa, 2
255
+ required :string, :msisdn, 3
256
+ required :string, :imei, 4
257
+ required :string, :imsi, 5
258
+ required :string, :teidc1, 6
259
+ required :string, :teidd1, 7
260
+ required :string, :teidc2, 8
261
+ required :string, :teidd2, 9
262
+ required :string, :apn, 10
263
+ required :string, :rai, 11
264
+ required :string, :uli, 12
265
+ required :string, :rat, 13
266
+ required :string, :cause, 14
267
+ required :int64, :stat0, 15
268
+ required :int64, :stat1, 16
269
+ required ::TRP::TimeInterval, :time_interval, 18
270
+ optional :string, :mccmnc, 19
271
+ optional :string, :trace, 20
206
272
  end
207
273
 
208
274
  class Message < ::ProtocolBuffers::Message
@@ -268,6 +334,11 @@ module TRP
268
334
  GREP_RESPONSE = 61
269
335
  KEYSPACE_REQUEST = 70
270
336
  KEYSPACE_RESPONSE = 71
337
+ TOPPER_TREND_REQUEST = 72
338
+ TOPPER_TREND_RESPONSE = 73
339
+ QUERY_PDP_REQUEST = 74
340
+ QUERY_PDP_RESPONSE = 75
341
+ STAB_PUBSUB_CTL = 80
271
342
  end
272
343
 
273
344
  set_fully_qualified_name "TRP.Message"
@@ -317,6 +388,11 @@ module TRP
317
388
  optional ::TRP::GrepResponse, :grep_response, 52
318
389
  optional ::TRP::KeySpaceRequest, :keyspace_request, 53
319
390
  optional ::TRP::KeySpaceResponse, :keyspace_response, 54
391
+ optional ::TRP::TopperTrendRequest, :topper_trend_request, 55
392
+ optional ::TRP::TopperTrendResponse, :topper_trend_response, 56
393
+ optional ::TRP::QueryPDPRequest, :query_pdp_request, 57
394
+ optional ::TRP::QueryPDPResponse, :query_pdp_response, 58
395
+ optional ::TRP::SubscribeCtl, :subscribe_ctl, 59
320
396
  end
321
397
 
322
398
  class HelloRequest < ::ProtocolBuffers::Message
@@ -401,6 +477,7 @@ module TRP
401
477
  optional ::TRP::TimeInterval, :time_interval, 5
402
478
  optional ::TRP::Timestamp, :time_instant, 6
403
479
  optional :int64, :flags, 7
480
+ optional :bool, :resolve_keys, 8
404
481
  end
405
482
 
406
483
  class CounterGroupResponse < ::ProtocolBuffers::Message
@@ -409,6 +486,7 @@ module TRP
409
486
  required :int64, :context, 1
410
487
  required :string, :counter_group, 2
411
488
  required :int64, :meter, 3
489
+ optional :int64, :sysgrouptotal, 4
412
490
  repeated ::TRP::KeyDetails, :keys, 6
413
491
  end
414
492
 
@@ -511,6 +589,7 @@ module TRP
511
589
 
512
590
  optional :int64, :context, 1, :default => 0
513
591
  optional :string, :counter_group, 2
592
+ optional :bool, :get_meter_info, 3, :default => false
514
593
  end
515
594
 
516
595
  class CounterGroupInfoResponse < ::ProtocolBuffers::Message
@@ -598,6 +677,7 @@ module TRP
598
677
  optional :int64, :context, 1
599
678
  required :string, :session_group, 2
600
679
  repeated ::TRP::SessionDetails, :sessions, 3
680
+ optional :int64, :tracker_id, 4
601
681
  end
602
682
 
603
683
  class SessionGroupRequest < ::ProtocolBuffers::Message
@@ -827,4 +907,84 @@ module TRP
827
907
  repeated :string, :hits, 3
828
908
  end
829
909
 
910
+ class TopperTrendRequest < ::ProtocolBuffers::Message
911
+ set_fully_qualified_name "TRP.TopperTrendRequest"
912
+
913
+ optional :int64, :context, 1, :default => 0
914
+ required :string, :counter_group, 2
915
+ optional :int64, :meter, 3, :default => 0
916
+ optional :int64, :maxitems, 4, :default => 10
917
+ optional ::TRP::TimeInterval, :time_interval, 5
918
+ end
919
+
920
+ class TopperTrendResponse < ::ProtocolBuffers::Message
921
+ set_fully_qualified_name "TRP.TopperTrendResponse"
922
+
923
+ required :int64, :context, 1
924
+ required :string, :counter_group, 2
925
+ required :int64, :meter, 3
926
+ repeated ::TRP::KeyStats, :keytrends, 4
927
+ end
928
+
929
+ class QueryPDPRequest < ::ProtocolBuffers::Message
930
+ set_fully_qualified_name "TRP.QueryPDPRequest"
931
+
932
+ optional :int64, :context, 1, :default => 0
933
+ optional :string, :session_group, 2, :default => "{3FCBAE7F-BBEC-47CA-BAE0-B48D5F96FD6B}"
934
+ required ::TRP::TimeInterval, :time_interval, 3
935
+ optional :string, :ipa, 4
936
+ optional :string, :msisdn, 5
937
+ optional :string, :imei, 6
938
+ optional :string, :imsi, 7
939
+ optional :string, :apn, 8
940
+ optional :string, :rai, 9
941
+ optional :string, :uli, 10
942
+ optional :string, :rat, 11
943
+ optional :string, :cause, 12
944
+ optional :string, :mccmnc, 13
945
+ optional :int64, :maxitems, 14, :default => 100
946
+ optional :string, :teid, 15
947
+ end
948
+
949
+ class QueryPDPResponse < ::ProtocolBuffers::Message
950
+ set_fully_qualified_name "TRP.QueryPDPResponse"
951
+
952
+ optional :int64, :context, 1
953
+ repeated ::TRP::PDPDetails, :sessions, 3
954
+ end
955
+
956
+ class SubscribeCtl < ::ProtocolBuffers::Message
957
+ # forward declarations
958
+
959
+ # enums
960
+ module StabberType
961
+ include ::ProtocolBuffers::Enum
962
+
963
+ set_fully_qualified_name "TRP.SubscribeCtl.StabberType"
964
+
965
+ ST_COUNTER_ITEM = 0
966
+ ST_ALERT = 1
967
+ ST_FLOW = 2
968
+ ST_TOPPER = 3
969
+ end
970
+
971
+ module CtlType
972
+ include ::ProtocolBuffers::Enum
973
+
974
+ set_fully_qualified_name "TRP.SubscribeCtl.CtlType"
975
+
976
+ CT_SUBSCRIBE = 0
977
+ CT_UNSUBSCRIBE = 1
978
+ end
979
+
980
+ set_fully_qualified_name "TRP.SubscribeCtl"
981
+
982
+ optional :int64, :context, 1, :default => 0
983
+ required ::TRP::SubscribeCtl::CtlType, :ctl, 2
984
+ required ::TRP::SubscribeCtl::StabberType, :type, 3
985
+ optional :string, :guid, 4
986
+ optional :string, :key, 5
987
+ optional :int64, :meterid, 6
988
+ end
989
+
830
990
  end
@@ -1,7 +1,11 @@
1
1
  // Trisul Remote Protocol (TRP) definition
2
2
  // Based on Google Protocol Buffers
3
3
  // (c) 2010-11, Unleash Networks (http://www.unleashnetworks.com)
4
- // $Rev: 6931 $
4
+ // $Rev: 6946 $
5
+
6
+ option optimize_for = LITE_RUNTIME;
7
+
8
+
5
9
  package TRP;
6
10
 
7
11
  message Timestamp {
@@ -22,6 +26,34 @@ message StatsTuple {
22
26
  message MeterValues {
23
27
  required int32 meter=1;
24
28
  repeated StatsTuple values=2;
29
+ optional int64 total=3;
30
+ optional int64 seconds=4;
31
+ }
32
+
33
+ message MeterInfo {
34
+
35
+ // from TrisulAPI
36
+ enum MeterType
37
+ {
38
+ VT_INVALID=0;
39
+ VT_RATE_COUNTER_WITH_SLIDING_WINDOW=1;// this for top-N type counters
40
+ VT_COUNTER=2; // basic counter, stores val in the raw
41
+ VT_COUNTER_WITH_SLIDING_WINDOW=3; // use this for top-N type counters
42
+ VT_RATE_COUNTER=4; // rate counter stores val/sec
43
+ VT_GAUGE=5; // basic gauge
44
+ VT_GAUGE_MIN_MAX_AVG=6; // gauge with 3 additional min/avg/max cols (auto)
45
+ VT_AUTO=7; // automatic (eg, min/max/avg/stddev/)
46
+ VT_RUNNING_COUNTER=8; // running counter, no delta calc
47
+ VT_AVERAGE=9; // average of samples, total/sampl uses 32bt|32bit
48
+ }
49
+
50
+
51
+ required int32 id=1;
52
+ required MeterType type=2;
53
+ required int32 topcount=3;
54
+ required string name=4;
55
+ optional string description=5;
56
+ optional string units=6;
25
57
  }
26
58
 
27
59
  message KeyStats {
@@ -58,6 +90,7 @@ message CounterGroupDetails {
58
90
  optional int64 bucket_size=3;
59
91
  optional TimeInterval time_interval=4;
60
92
  optional int64 topper_bucket_size=5;
93
+ repeated MeterInfo meters=6;
61
94
  }
62
95
 
63
96
  message SessionDetails {
@@ -83,9 +116,32 @@ message SessionDetails {
83
116
  required int64 za_payload=20;
84
117
  required int64 setup_rtt=21;
85
118
  required int64 retransmissions=22;
119
+ optional int64 tracker_statval=23;
120
+ }
121
+
122
+
123
+ message PDPDetails {
124
+ required SessionID session_id=1;
125
+ required string ipa = 2 ;
126
+ required string msisdn = 3 ;
127
+ required string imei = 4 ;
128
+ required string imsi = 5 ;
129
+ required string teidc1 = 6 ;
130
+ required string teidd1 = 7 ;
131
+ required string teidc2 = 8 ;
132
+ required string teidd2 = 9 ;
133
+ required string apn = 10 ;
134
+ required string rai = 11 ;
135
+ required string uli = 12 ;
136
+ required string rat = 13 ;
137
+ required string cause = 14 ;
138
+ required int64 stat0 = 15 ;
139
+ required int64 stat1 = 16 ;
140
+ required TimeInterval time_interval=18;
141
+ optional string mccmnc = 19 ;
142
+ optional string trace = 20 ;
86
143
  }
87
144
 
88
-
89
145
  enum AuthLevel {
90
146
  ADMIN=1;
91
147
  BASIC_USER=2;
@@ -163,6 +219,11 @@ message Message {
163
219
  GREP_RESPONSE=61;
164
220
  KEYSPACE_REQUEST=70;
165
221
  KEYSPACE_RESPONSE=71;
222
+ TOPPER_TREND_REQUEST=72;
223
+ TOPPER_TREND_RESPONSE=73;
224
+ QUERY_PDP_REQUEST=74;
225
+ QUERY_PDP_RESPONSE=75;
226
+ STAB_PUBSUB_CTL=80;
166
227
  }
167
228
 
168
229
  required Command trp_command=1;
@@ -212,6 +273,11 @@ message Message {
212
273
  optional GrepResponse grep_response=52;
213
274
  optional KeySpaceRequest keyspace_request=53;
214
275
  optional KeySpaceResponse keyspace_response=54;
276
+ optional TopperTrendRequest topper_trend_request=55;
277
+ optional TopperTrendResponse topper_trend_response=56;
278
+ optional QueryPDPRequest query_pdp_request=57;
279
+ optional QueryPDPResponse query_pdp_response=58;
280
+ optional SubscribeCtl subscribe_ctl=59;
215
281
  }
216
282
 
217
283
  ///////////////////////////////
@@ -293,6 +359,7 @@ message CounterGroupRequest{
293
359
  optional TimeInterval time_interval=5;
294
360
  optional Timestamp time_instant=6;
295
361
  optional int64 flags=7;
362
+ optional bool resolve_keys=8;
296
363
  }
297
364
 
298
365
  ///////////////////////////////
@@ -301,6 +368,7 @@ message CounterGroupResponse{
301
368
  required int64 context=1;
302
369
  required string counter_group=2;
303
370
  required int64 meter=3;
371
+ optional int64 sysgrouptotal=4;
304
372
  repeated KeyDetails keys=6;
305
373
  }
306
374
 
@@ -396,6 +464,7 @@ message SearchKeysResponse{
396
464
  message CounterGroupInfoRequest{
397
465
  optional int64 context=1[default=0];
398
466
  optional string counter_group=2;
467
+ optional bool get_meter_info=3[default=false];
399
468
  }
400
469
 
401
470
  ///////////////////////////////////
@@ -485,6 +554,7 @@ message SessionTrackerResponse{
485
554
  optional int64 context=1;
486
555
  required string session_group=2;
487
556
  repeated SessionDetails sessions=3;
557
+ optional int64 tracker_id=4;
488
558
  }
489
559
 
490
560
  ///////////////////////////////////
@@ -698,3 +768,85 @@ message KeySpaceResponse {
698
768
  repeated string hits=3;
699
769
  }
700
770
 
771
+ ///////////////////////////////
772
+ // TopperTrendRequest
773
+ message TopperTrendRequest {
774
+ optional int64 context=1 [default=0];
775
+ required string counter_group=2;
776
+ optional int64 meter=3 [default=0];
777
+ optional int64 maxitems=4 [default=10];
778
+ optional TimeInterval time_interval=5;
779
+ }
780
+
781
+ ///////////////////////////////
782
+ // TopperTrendResponse
783
+ message TopperTrendResponse {
784
+ required int64 context=1;
785
+ required string counter_group=2;
786
+ required int64 meter=3;
787
+ repeated KeyStats keytrends=4;
788
+ }
789
+
790
+ ///////////////////////////////////
791
+ // QueryPDP - any of the fields can be filled
792
+ // all the fields filled are treated as AND criteria
793
+ // {3fcbae7f-bbec-47ca-bae0-b48d5f96fd6b}
794
+ // define_guid(<<name>>,
795
+ // 0x3fcbae7f, 0xbbec, 0x47ca, 0xba, 0xe0, 0xb4, 0x8d, 0x5f, 0x96, 0xfd, 0x6b);
796
+
797
+ message QueryPDPRequest {
798
+ optional int64 context=1[default=0];
799
+ optional string session_group=2[default="{3FCBAE7F-BBEC-47CA-BAE0-B48D5F96FD6B}"];
800
+ required TimeInterval time_interval=3;
801
+ optional string ipa=4;
802
+ optional string msisdn=5;
803
+ optional string imei=6;
804
+ optional string imsi=7;
805
+ optional string apn=8;
806
+ optional string rai=9;
807
+ optional string uli=10;
808
+ optional string rat=11;
809
+ optional string cause=12;
810
+ optional string mccmnc=13;
811
+ optional int64 maxitems=14[default=100];
812
+ optional string teid=15;
813
+ }
814
+
815
+ /////////////////////////////////////
816
+ // QueryPDPResponse
817
+ message QueryPDPResponse {
818
+ optional int64 context=1;
819
+ repeated PDPDetails sessions=3;
820
+ }
821
+
822
+
823
+
824
+
825
+ ///////////////////////////////////
826
+ // Subscribe - add a subcription to the Real Time channel
827
+ message SubscribeCtl {
828
+
829
+ // from TrisulAPI
830
+ enum StabberType
831
+ {
832
+ ST_COUNTER_ITEM=0;
833
+ ST_ALERT=1;
834
+ ST_FLOW=2;
835
+ ST_TOPPER=3;
836
+ }
837
+
838
+ enum CtlType
839
+ {
840
+ CT_SUBSCRIBE=0;
841
+ CT_UNSUBSCRIBE=1;
842
+ }
843
+
844
+ optional int64 context=1[default=0];
845
+ required CtlType ctl=2;
846
+ required StabberType type=3;
847
+ optional string guid=4;
848
+ optional string key=5;
849
+ optional int64 meterid=6;
850
+ }
851
+
852
+
data/trisulrp.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "trisulrp"
8
- s.version = "2.0.5"
8
+ s.version = "2.2.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["vivek"]
12
- s.date = "2014-06-23"
12
+ s.date = "2015-06-25"
13
13
  s.description = "This gem deals about the trisul remote protocol"
14
14
  s.email = "vivek_rajagopal@yahoo.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trisulrp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-23 00:00:00.000000000 Z
11
+ date: 2015-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-protocol-buffers