plainprograms-virtuozzo 0.5.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/CHANGELOG.rdoc +21 -0
  2. data/Rakefile +3 -3
  3. data/TODO.rdoc +20 -0
  4. data/lib/virtuozzo/soap.rb +216 -0
  5. data/lib/virtuozzo/soap/drivers/alertm.rb +78 -0
  6. data/lib/virtuozzo/soap/drivers/authm.rb +172 -0
  7. data/lib/virtuozzo/soap/drivers/backupm.rb +108 -0
  8. data/lib/virtuozzo/soap/drivers/computerm.rb +108 -0
  9. data/lib/virtuozzo/soap/drivers/env_samplem.rb +84 -0
  10. data/lib/virtuozzo/soap/drivers/event_log.rb +60 -0
  11. data/lib/virtuozzo/soap/drivers/filer.rb +156 -0
  12. data/lib/virtuozzo/soap/drivers/firewallm.rb +100 -0
  13. data/lib/virtuozzo/soap/drivers/licensem.rb +100 -0
  14. data/lib/virtuozzo/soap/drivers/mailer.rb +108 -0
  15. data/lib/virtuozzo/soap/drivers/op_log.rb +60 -0
  16. data/lib/virtuozzo/soap/drivers/perf_mon.rb +76 -0
  17. data/lib/virtuozzo/soap/drivers/res_log.rb +84 -0
  18. data/lib/virtuozzo/soap/drivers/resourcem.rb +100 -0
  19. data/lib/virtuozzo/soap/drivers/scheduler.rb +84 -0
  20. data/lib/virtuozzo/soap/drivers/server_group.rb +140 -0
  21. data/lib/virtuozzo/soap/drivers/servicem.rb +100 -0
  22. data/lib/virtuozzo/soap/drivers/userm.rb +156 -0
  23. data/lib/virtuozzo/soap/mapping_registries/alertm.rb +2799 -0
  24. data/lib/virtuozzo/soap/mapping_registries/authm.rb +3292 -0
  25. data/lib/virtuozzo/soap/mapping_registries/backupm.rb +3597 -0
  26. data/lib/virtuozzo/soap/mapping_registries/computerm.rb +2896 -0
  27. data/lib/virtuozzo/soap/mapping_registries/env_samplem.rb +2735 -0
  28. data/lib/virtuozzo/soap/mapping_registries/event_log.rb +2695 -0
  29. data/lib/virtuozzo/soap/mapping_registries/filer.rb +3211 -0
  30. data/lib/virtuozzo/soap/mapping_registries/firewallm.rb +2815 -0
  31. data/lib/virtuozzo/soap/mapping_registries/licensem.rb +2889 -0
  32. data/lib/virtuozzo/soap/mapping_registries/mailer.rb +2831 -0
  33. data/lib/virtuozzo/soap/mapping_registries/op_log.rb +2724 -0
  34. data/lib/virtuozzo/soap/mapping_registries/perf_mon.rb +2798 -0
  35. data/lib/virtuozzo/soap/mapping_registries/res_log.rb +2946 -0
  36. data/lib/virtuozzo/soap/mapping_registries/resourcem.rb +2837 -0
  37. data/lib/virtuozzo/soap/mapping_registries/scheduler.rb +2928 -0
  38. data/lib/virtuozzo/soap/mapping_registries/server_group.rb +3161 -0
  39. data/lib/virtuozzo/soap/mapping_registries/servicem.rb +2949 -0
  40. data/lib/virtuozzo/soap/mapping_registries/userm.rb +3173 -0
  41. data/lib/virtuozzo/soap/types/alertm.rb +2233 -0
  42. data/lib/virtuozzo/soap/types/authm.rb +2655 -0
  43. data/lib/virtuozzo/soap/types/backupm.rb +2773 -0
  44. data/lib/virtuozzo/soap/types/computerm.rb +2334 -0
  45. data/lib/virtuozzo/soap/types/env_samplem.rb +2159 -0
  46. data/lib/virtuozzo/soap/types/event_log.rb +2125 -0
  47. data/lib/virtuozzo/soap/types/filer.rb +2807 -0
  48. data/lib/virtuozzo/soap/types/firewallm.rb +2225 -0
  49. data/lib/virtuozzo/soap/types/licensem.rb +2266 -0
  50. data/lib/virtuozzo/soap/types/mailer.rb +2311 -0
  51. data/lib/virtuozzo/soap/types/op_log.rb +2156 -0
  52. data/lib/virtuozzo/soap/types/perf_mon.rb +2258 -0
  53. data/lib/virtuozzo/soap/types/res_log.rb +2340 -0
  54. data/lib/virtuozzo/soap/types/resourcem.rb +2213 -0
  55. data/lib/virtuozzo/soap/types/scheduler.rb +2307 -0
  56. data/lib/virtuozzo/soap/types/server_group.rb +2467 -0
  57. data/lib/virtuozzo/soap/types/servicem.rb +2292 -0
  58. data/lib/virtuozzo/soap/types/userm.rb +2599 -0
  59. data/virtuozzo.gemspec +10 -10
  60. metadata +116 -6
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,26 @@
1
1
  = CHANGELOG
2
2
 
3
+ == 0.6.0
4
+
5
+ * Implemented env_samplem interface.
6
+ * Implemented alertm interface.
7
+ * Implemented authm interface.
8
+ * Implemented backupm interface.
9
+ * Implemented computerm interface.
10
+ * Implemented server_group interface.
11
+ * Implemented event_log interface.
12
+ * Implemented filer interface.
13
+ * Implemented firewallm interface
14
+ * Implemented licensem interface
15
+ * Implemented mailer interface
16
+ * Implemented op_log interface
17
+ * Implemented perf_mon interface
18
+ * Implemented res_log interface
19
+ * Implemented resourcem interface
20
+ * Implemented scheduler interface
21
+ * Implemented servicem interface
22
+ * Implemented userm interface
23
+
3
24
  == 0.5.1 to 0.5.3
4
25
 
5
26
  * Minor bug fixes and documentation revisions.
data/Rakefile CHANGED
@@ -5,15 +5,15 @@ require 'spec/rake/spectask'
5
5
  PROJECT = "virtuozzo"
6
6
  RUBYFORGE_PROJECT = "virtuozzo"
7
7
 
8
- Echoe.new(PROJECT, '0.5.3') do |p|
8
+ Echoe.new(PROJECT, '0.6.0') do |p|
9
9
  p.description = "Ruby library for Parallels Virtuozzo Agent's API"
10
10
  p.url = "http://github.com/plainprograms/virtuozzo"
11
11
  p.author = "James Thompson"
12
12
  p.email = "james@plainprograms.com"
13
13
  p.project = RUBYFORGE_PROJECT
14
14
  p.ignore_pattern = ["tmp/*, script/*"]
15
- p.development_dependencies = ["echoe"]
16
- p.runtime_dependencies = ["soap4r >=1.5.8"]
15
+ p.development_dependencies = ["echoe ~>3.0"]
16
+ p.runtime_dependencies = ["soap4r ~>1.5"]
17
17
  end
18
18
 
19
19
  Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
data/TODO.rdoc ADDED
@@ -0,0 +1,20 @@
1
+ = TODO
2
+
3
+ == 0.7.0
4
+
5
+ * Rename all drivers, type modules, and mapping registry modules with SOAP
6
+ interface names.
7
+
8
+ == 1.0.0
9
+
10
+ * Implement a better interface for Virtuozzo::SOAP::Connection as it deals
11
+ with the underlying drivers.
12
+ * Full YARD documentation coverage
13
+ * Full rspec coverage
14
+
15
+ == 1.1.0
16
+ * Make independent of SOAP4R gem.
17
+ * Make independent of echoe gem
18
+
19
+ == 1.2.0
20
+ * Implement XML API interface
@@ -8,6 +8,24 @@ require 'virtuozzo/soap/drivers/process_info'
8
8
  require 'virtuozzo/soap/drivers/process'
9
9
  require 'virtuozzo/soap/drivers/up2date'
10
10
  require 'virtuozzo/soap/drivers/support'
11
+ require 'virtuozzo/soap/drivers/authm'
12
+ require 'virtuozzo/soap/drivers/alertm'
13
+ require 'virtuozzo/soap/drivers/event_log'
14
+ require 'virtuozzo/soap/drivers/server_group'
15
+ require 'virtuozzo/soap/drivers/backupm'
16
+ require 'virtuozzo/soap/drivers/computerm'
17
+ require 'virtuozzo/soap/drivers/env_samplem'
18
+ require 'virtuozzo/soap/drivers/filer'
19
+ require 'virtuozzo/soap/drivers/firewallm'
20
+ require 'virtuozzo/soap/drivers/licensem'
21
+ require 'virtuozzo/soap/drivers/mailer'
22
+ require 'virtuozzo/soap/drivers/op_log'
23
+ require 'virtuozzo/soap/drivers/perf_mon'
24
+ require 'virtuozzo/soap/drivers/res_log'
25
+ require 'virtuozzo/soap/drivers/resourcem'
26
+ require 'virtuozzo/soap/drivers/scheduler'
27
+ require 'virtuozzo/soap/drivers/servicem'
28
+ require 'virtuozzo/soap/drivers/userm'
11
29
 
12
30
  require 'virtuozzo/soap/header_handler'
13
31
 
@@ -142,6 +160,150 @@ module Virtuozzo
142
160
  def support
143
161
  @support ||= Virtuozzo::SOAP::Drivers::Support.new(@endpoint)
144
162
  end
163
+
164
+ ##
165
+ # Handle for the env_samplem interface of the Virtuozzo API.
166
+ #
167
+ # @return [SOAP::RPC::Driver] env_samplem SOAP::RPC::Driver instance.
168
+ def env_samplem
169
+ @env_samplem ||= Virtuozzo::SOAP::Drivers::EnvSamplem.new(@endpoint)
170
+ end
171
+
172
+ ##
173
+ # Handle for the alertm interface of the Virtuozzo API.
174
+ #
175
+ # @return [SOAP::RPC::Driver] alertm SOAP::RPC::Driver instance.
176
+ def alertm
177
+ @alerts ||= Virtuozzo::SOAP::Drivers::Alerts.new(@endpoint)
178
+ end
179
+
180
+ ##
181
+ # Handle for the authm interface of the Virtuozzo API.
182
+ #
183
+ # @return [SOAP::RPC::Driver] authm SOAP::RPC::Driver instance.
184
+ def authm
185
+ @authm ||= Virtuozzo::SOAP::Drivers::Authm.new(@endpoint)
186
+ end
187
+
188
+ ##
189
+ # Handle for the backupm interface of the Virtuozzo API.
190
+ #
191
+ # @return [SOAP::RPC::Driver] backupm SOAP::RPC::Driver instance.
192
+ def backupm
193
+ @backupm ||= Virtuozzo::SOAP::Drivers::Backupm.new(@endpoint)
194
+ end
195
+
196
+ ##
197
+ # Handle for the computerm interface of the Virtuozzo API.
198
+ #
199
+ # @return [SOAP::RPC::Driver] computerm SOAP::RPC::Driver instance.
200
+ def computerm
201
+ @computerm ||= Virtuozzo::SOAP::Drivers::Computerm.new(@endpoint)
202
+ end
203
+
204
+ ##
205
+ # Handle for the event_log interface of the Virtuozzo API.
206
+ #
207
+ # @return [SOAP::RPC::Driver] event_log SOAP::RPC::Driver instance.
208
+ def event_log
209
+ @event_log ||= Virtuozzo::SOAP::Drivers::EventLog.new(@endpoint)
210
+ end
211
+
212
+ ##
213
+ # Handle for the server_group interface of the Virtuozzo API.
214
+ #
215
+ # @return [SOAP::RPC::Driver] server_group SOAP::RPC::Driver instance.
216
+ def server_group
217
+ @server_group ||= Virtuozzo::SOAP::Drivers::ServerGroup.new(@endpoint)
218
+ end
219
+
220
+ ##
221
+ # Handle for the filer interface of the Virtuozzo API.
222
+ #
223
+ # @return [SOAP::RPC::Driver] filer SOAP::RPC::Driver instance.
224
+ def filer
225
+ @filer ||= Virtuozzo::SOAP::Drivers::Filer.new(@endpoint)
226
+ end
227
+
228
+ ##
229
+ # Handle for the firewallm interface of the Virtuozzo API.
230
+ #
231
+ # @return [SOAP::RPC::Driver] firewallm SOAP::RPC::Driver instance.
232
+ def firewallm
233
+ @firewallm ||= Virtuozzo::SOAP::Drivers::Firewallm.new(@endpoint)
234
+ end
235
+
236
+ ##
237
+ # Handle for the licensem interface of the Virtuozzo API.
238
+ #
239
+ # @return [SOAP::RPC::Driver] licensem SOAP::RPC::Driver instance.
240
+ def licensem
241
+ @licensem ||= Virtuozzo::SOAP::Drivers::Licensem.new(@endpoint)
242
+ end
243
+
244
+ ##
245
+ # Handle for the mailer interface of the Virtuozzo API.
246
+ #
247
+ # @return [SOAP::RPC::Driver] mailer SOAP::RPC::Driver instance.
248
+ def mailer
249
+ @mailer ||= Virtuozzo::SOAP::Drivers::Mailer.new(@endpoint)
250
+ end
251
+
252
+ ##
253
+ # Handle for the op_log interface of the Virtuozzo API.
254
+ #
255
+ # @return [SOAP::RPC::Driver] op_log SOAP::RPC::Driver instance.
256
+ def op_log
257
+ @op_log ||= Virtuozzo::SOAP::Drivers::OpLog.new(@endpoint)
258
+ end
259
+
260
+ ##
261
+ # Handle for the perf_mon interface of the Virtuozzo API.
262
+ #
263
+ # @return [SOAP::RPC::Driver] perf_mon SOAP::RPC::Driver instance.
264
+ def perf_mon
265
+ @perf_mon ||= Virtuozzo::SOAP::Drivers::PerfMon.new(@endpoint)
266
+ end
267
+
268
+ ##
269
+ # Handle for the res_log interface of the Virtuozzo API.
270
+ #
271
+ # @return [SOAP::RPC::Driver] res_log SOAP::RPC::Driver instance.
272
+ def res_log
273
+ @res_log ||= Virtuozzo::SOAP::Drivers::ResLog.new(@endpoint)
274
+ end
275
+
276
+ ##
277
+ # Handle for the resourcem interface of the Virtuozzo API.
278
+ #
279
+ # @return [SOAP::RPC::Driver] resourcem SOAP::RPC::Driver instance.
280
+ def resourcem
281
+ @resourcem ||= Virtuozzo::SOAP::Drivers::Resourcem.new(@endpoint)
282
+ end
283
+
284
+ ##
285
+ # Handle for the scheduler interface of the Virtuozzo API.
286
+ #
287
+ # @return [SOAP::RPC::Driver] scheduler SOAP::RPC::Driver instance.
288
+ def scheduler
289
+ @scheduler ||= Virtuozzo::SOAP::Drivers::Scheduler.new(@endpoint)
290
+ end
291
+
292
+ ##
293
+ # Handle for the servicem interface of the Virtuozzo API.
294
+ #
295
+ # @return [SOAP::RPC::Driver] servicem SOAP::RPC::Driver instance.
296
+ def servicem
297
+ @servicem ||= Virtuozzo::SOAP::Drivers::Servicem.new(@endpoint)
298
+ end
299
+
300
+ ##
301
+ # Handle for the userm interface of the Virtuozzo API.
302
+ #
303
+ # @return [SOAP::RPC::Driver] userm SOAP::RPC::Driver instance.
304
+ def userm
305
+ @userm ||= Virtuozzo::SOAP::Drivers::Userm.new(@endpoint)
306
+ end
145
307
 
146
308
  private
147
309
 
@@ -160,6 +322,24 @@ module Virtuozzo
160
322
  process.options['protocol.http.ssl_config.verify_mode'] = nil
161
323
  up2date.options['protocol.http.ssl_config.verify_mode'] = nil
162
324
  support.options['protocol.http.ssl_config.verify_mode'] = nil
325
+ env_samplem.options['protocol.http.ssl_config.verify_mode'] = nil
326
+ alertm.options['protocol.http.ssl_config.verify_mode'] = nil
327
+ authm.options['protocol.http.ssl_config.verify_mode'] = nil
328
+ backupm.options['protocol.http.ssl_config.verify_mode'] = nil
329
+ computerm.options['protocol.http.ssl_config.verify_mode'] = nil
330
+ event_log.options['protocol.http.ssl_config.verify_mode'] = nil
331
+ server_group.options['protocol.http.ssl_config.verify_mode'] = nil
332
+ filer.options['protocol.http.ssl_config.verify_mode'] = nil
333
+ firewallm.options['protocol.http.ssl_config.verify_mode'] = nil
334
+ licensem.options['protocol.http.ssl_config.verify_mode'] = nil
335
+ mailer.options['protocol.http.ssl_config.verify_mode'] = nil
336
+ op_log.options['protocol.http.ssl_config.verify_mode'] = nil
337
+ perf_mon.options['protocol.http.ssl_config.verify_mode'] = nil
338
+ res_log.options['protocol.http.ssl_config.verify_mode'] = nil
339
+ resourcem.options['protocol.http.ssl_config.verify_mode'] = nil
340
+ scheduler.options['protocol.http.ssl_config.verify_mode'] = nil
341
+ servicem.options['protocol.http.ssl_config.verify_mode'] = nil
342
+ userm.options['protocol.http.ssl_config.verify_mode'] = nil
163
343
  end
164
344
  end
165
345
 
@@ -180,6 +360,24 @@ module Virtuozzo
180
360
  process.wiredump_dev = dev
181
361
  up2date.wiredump_dev = dev
182
362
  support.wiredump_dev = dev
363
+ env_samplem.wiredump_dev = dev
364
+ alertm.wiredump_dev = dev
365
+ authm.wiredump_dev = dev
366
+ backupm.wiredump_dev = dev
367
+ computerm.wiredump_dev = dev
368
+ event_log.wiredump_dev = dev
369
+ server_group.wiredump_dev = dev
370
+ filer.wiredump_dev = dev
371
+ firewallm.wiredump_dev = dev
372
+ licensem.wiredump_dev = dev
373
+ mailer.wiredump_dev = dev
374
+ op_log.wiredump_dev = dev
375
+ perf_mon.wiredump_dev = dev
376
+ res_log.wiredump_dev = dev
377
+ resourcem.wiredump_dev = dev
378
+ scheduler.wiredump_dev = dev
379
+ servicem.wiredump_dev = dev
380
+ userm.wiredump_dev = dev
183
381
  end
184
382
 
185
383
  ##
@@ -214,6 +412,24 @@ module Virtuozzo
214
412
  process.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'vzaprocessm')
215
413
  up2date.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'vzaup2date')
216
414
  support.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'vzasupport')
415
+ env_samplem.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'env_samplem')
416
+ alertm.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'alertm')
417
+ authm.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'authm')
418
+ backupm.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'backupm')
419
+ computerm.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'computerm')
420
+ event_log.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'event_log')
421
+ server_group.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'server_group')
422
+ filer.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'filer')
423
+ firewallm.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'firewallm')
424
+ licensem.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'licensem')
425
+ mailer.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'mailer')
426
+ op_log.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'op_log')
427
+ perf_mon.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'perf_mon')
428
+ res_log.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'res_log')
429
+ resourcem.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'resourcem')
430
+ scheduler.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'scheduler')
431
+ servicem.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'servicem')
432
+ userm.headerhandler << HeaderHandler.new(:session => @session_id, :target => 'userm')
217
433
  end
218
434
  end
219
435
  end
@@ -0,0 +1,78 @@
1
+ require 'virtuozzo/soap/types/alertm'
2
+ require 'virtuozzo/soap/mapping_registries/alertm'
3
+ require 'soap/rpc/driver'
4
+
5
+ module Virtuozzo
6
+ module SOAP
7
+ module Drivers
8
+ ##
9
+ # = Alertm
10
+ #
11
+ class Alertm < ::SOAP::RPC::Driver
12
+ DefaultEndpointUrl = "https://localhost:4646"
13
+
14
+ Methods = [
15
+ [ nil,
16
+ "get_alerts",
17
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/alertm", "get_alerts"]],
18
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/alertm", "get_alertsResponse"]] ],
19
+ { :request_style => :document, :request_use => :literal,
20
+ :response_style => :document, :response_use => :literal,
21
+ :faults => {} }
22
+ ],
23
+ [ nil,
24
+ "subscribe_alert",
25
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/alertm", "subscribe_alert"]],
26
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/alertm", "subscribe_alertResponse"]] ],
27
+ { :request_style => :document, :request_use => :literal,
28
+ :response_style => :document, :response_use => :literal,
29
+ :faults => {} }
30
+ ],
31
+ [ nil,
32
+ "unsubscribe_alert",
33
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/alertm", "unsubscribe_alert"]],
34
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/alertm", "unsubscribe_alertResponse"]] ],
35
+ { :request_style => :document, :request_use => :literal,
36
+ :response_style => :document, :response_use => :literal,
37
+ :faults => {} }
38
+ ]
39
+ ]
40
+
41
+ def initialize(endpoint_url = nil)
42
+ endpoint_url ||= DefaultEndpointUrl
43
+ super(endpoint_url, nil)
44
+ self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Alertm::EncodedRegistry
45
+ self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Alertm::LiteralRegistry
46
+ init_methods
47
+ end
48
+
49
+ private
50
+
51
+ def init_methods
52
+ Methods.each do |definitions|
53
+ opt = definitions.last
54
+
55
+ # set options to use default namespace instead of using n[#]
56
+ opt.merge!({
57
+ :use_default_namespace => true
58
+ })
59
+
60
+ if opt[:request_style] == :document
61
+ add_document_operation(*definitions)
62
+ else
63
+ add_rpc_operation(*definitions)
64
+ qname = definitions[0]
65
+ name = definitions[2]
66
+ if qname.name != name and qname.name.capitalize == name.capitalize
67
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
68
+ __send__(name, *arg)
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,172 @@
1
+ require 'virtuozzo/soap/types/authm'
2
+ require 'virtuozzo/soap/mapping_registries/authm'
3
+ require 'soap/rpc/driver'
4
+
5
+ module Virtuozzo
6
+ module SOAP
7
+ module Drivers
8
+
9
+ class Authm < ::SOAP::RPC::Driver
10
+ DefaultEndpointUrl = "https://localhost:4646"
11
+
12
+ Methods = [
13
+ [ nil,
14
+ "get_group",
15
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "get_group"]],
16
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "get_groupResponse"]] ],
17
+ { :request_style => :document, :request_use => :literal,
18
+ :response_style => :document, :response_use => :literal,
19
+ :faults => {} }
20
+ ],
21
+ [ nil,
22
+ "get_user",
23
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "get_user"]],
24
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "get_userResponse"]] ],
25
+ { :request_style => :document, :request_use => :literal,
26
+ :response_style => :document, :response_use => :literal,
27
+ :faults => {} }
28
+ ],
29
+ [ nil,
30
+ "add_user",
31
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "add_user"]],
32
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "add_userResponse"]] ],
33
+ { :request_style => :document, :request_use => :literal,
34
+ :response_style => :document, :response_use => :literal,
35
+ :faults => {} }
36
+ ],
37
+ [ nil,
38
+ "add_group",
39
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "add_group"]],
40
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "add_groupResponse"]] ],
41
+ { :request_style => :document, :request_use => :literal,
42
+ :response_style => :document, :response_use => :literal,
43
+ :faults => {} }
44
+ ],
45
+ [ nil,
46
+ "edit_user",
47
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "edit_user"]],
48
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "edit_userResponse"]] ],
49
+ { :request_style => :document, :request_use => :literal,
50
+ :response_style => :document, :response_use => :literal,
51
+ :faults => {} }
52
+ ],
53
+ [ nil,
54
+ "edit_group",
55
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "edit_group"]],
56
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "edit_groupResponse"]] ],
57
+ { :request_style => :document, :request_use => :literal,
58
+ :response_style => :document, :response_use => :literal,
59
+ :faults => {} }
60
+ ],
61
+ [ nil,
62
+ "add_to_group",
63
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "add_to_group"]],
64
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "add_to_groupResponse"]] ],
65
+ { :request_style => :document, :request_use => :literal,
66
+ :response_style => :document, :response_use => :literal,
67
+ :faults => {} }
68
+ ],
69
+ [ nil,
70
+ "del_from_group",
71
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "del_from_group"]],
72
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "del_from_groupResponse"]] ],
73
+ { :request_style => :document, :request_use => :literal,
74
+ :response_style => :document, :response_use => :literal,
75
+ :faults => {} }
76
+ ],
77
+ [ nil,
78
+ "del_user",
79
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "del_user"]],
80
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "del_userResponse"]] ],
81
+ { :request_style => :document, :request_use => :literal,
82
+ :response_style => :document, :response_use => :literal,
83
+ :faults => {} }
84
+ ],
85
+ [ nil,
86
+ "del_group",
87
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "del_group"]],
88
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "del_groupResponse"]] ],
89
+ { :request_style => :document, :request_use => :literal,
90
+ :response_style => :document, :response_use => :literal,
91
+ :faults => {} }
92
+ ],
93
+ [ nil,
94
+ "authenticate",
95
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "authenticate"]],
96
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "authenticateResponse"]] ],
97
+ { :request_style => :document, :request_use => :literal,
98
+ :response_style => :document, :response_use => :literal,
99
+ :faults => {} }
100
+ ],
101
+ [ nil,
102
+ "add_realm",
103
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "add_realm"]],
104
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "add_realmResponse"]] ],
105
+ { :request_style => :document, :request_use => :literal,
106
+ :response_style => :document, :response_use => :literal,
107
+ :faults => {} }
108
+ ],
109
+ [ nil,
110
+ "del_realm",
111
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "del_realm"]],
112
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "del_realmResponse"]] ],
113
+ { :request_style => :document, :request_use => :literal,
114
+ :response_style => :document, :response_use => :literal,
115
+ :faults => {} }
116
+ ],
117
+ [ nil,
118
+ "get_realm",
119
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "get_realm"]],
120
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "get_realmResponse"]] ],
121
+ { :request_style => :document, :request_use => :literal,
122
+ :response_style => :document, :response_use => :literal,
123
+ :faults => {} }
124
+ ],
125
+ [ nil,
126
+ "get_sid",
127
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "get_sid"]],
128
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/authm", "get_sidResponse"]] ],
129
+ { :request_style => :document, :request_use => :literal,
130
+ :response_style => :document, :response_use => :literal,
131
+ :faults => {} }
132
+ ]
133
+ ]
134
+
135
+ def initialize(endpoint_url = nil)
136
+ endpoint_url ||= DefaultEndpointUrl
137
+ super(endpoint_url, nil)
138
+ self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Authm::EncodedRegistry
139
+ self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Authm::LiteralRegistry
140
+ init_methods
141
+ end
142
+
143
+ private
144
+
145
+ def init_methods
146
+ Methods.each do |definitions|
147
+ opt = definitions.last
148
+
149
+ # set options to use default namespace instead of using n[#]
150
+ opt.merge!({
151
+ :use_default_namespace => true
152
+ })
153
+
154
+ if opt[:request_style] == :document
155
+ add_document_operation(*definitions)
156
+ else
157
+ add_rpc_operation(*definitions)
158
+ qname = definitions[0]
159
+ name = definitions[2]
160
+ if qname.name != name and qname.name.capitalize == name.capitalize
161
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
162
+ __send__(name, *arg)
163
+ end
164
+ end
165
+ end
166
+ end
167
+ end
168
+ end
169
+
170
+ end
171
+ end
172
+ end