plainprograms-virtuozzo 0.1.0

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.
Files changed (40) hide show
  1. data/CHANGELOG.rdoc +54 -0
  2. data/README.rdoc +52 -0
  3. data/Rakefile +15 -0
  4. data/lib/virtuozzo/constants.rb +10 -0
  5. data/lib/virtuozzo/soap/drivers/device/mapping_registry.rb +3653 -0
  6. data/lib/virtuozzo/soap/drivers/device/types.rb +3144 -0
  7. data/lib/virtuozzo/soap/drivers/device_driver.rb +141 -0
  8. data/lib/virtuozzo/soap/drivers/environment/mapping_registry.rb +4461 -0
  9. data/lib/virtuozzo/soap/drivers/environment/types.rb +3743 -0
  10. data/lib/virtuozzo/soap/drivers/environment_driver.rb +300 -0
  11. data/lib/virtuozzo/soap/drivers/network/mapping_registry.rb +3116 -0
  12. data/lib/virtuozzo/soap/drivers/network/types.rb +2401 -0
  13. data/lib/virtuozzo/soap/drivers/network_driver.rb +101 -0
  14. data/lib/virtuozzo/soap/drivers/process/mapping_registry.rb +3317 -0
  15. data/lib/virtuozzo/soap/drivers/process/types.rb +2711 -0
  16. data/lib/virtuozzo/soap/drivers/process_driver.rb +69 -0
  17. data/lib/virtuozzo/soap/drivers/process_info/mapping_registry.rb +2985 -0
  18. data/lib/virtuozzo/soap/drivers/process_info/types.rb +2328 -0
  19. data/lib/virtuozzo/soap/drivers/process_info_driver.rb +61 -0
  20. data/lib/virtuozzo/soap/drivers/relocator/mapping_registry.rb +3656 -0
  21. data/lib/virtuozzo/soap/drivers/relocator/types.rb +2916 -0
  22. data/lib/virtuozzo/soap/drivers/relocator_driver.rb +101 -0
  23. data/lib/virtuozzo/soap/drivers/session/mapping_registry.rb +3039 -0
  24. data/lib/virtuozzo/soap/drivers/session/types.rb +2453 -0
  25. data/lib/virtuozzo/soap/drivers/session_driver.rb +149 -0
  26. data/lib/virtuozzo/soap/drivers/support/mapping_registry.rb +3232 -0
  27. data/lib/virtuozzo/soap/drivers/support/types.rb +2708 -0
  28. data/lib/virtuozzo/soap/drivers/support_driver.rb +109 -0
  29. data/lib/virtuozzo/soap/drivers/template/mapping_registry.rb +3752 -0
  30. data/lib/virtuozzo/soap/drivers/template/types.rb +3079 -0
  31. data/lib/virtuozzo/soap/drivers/template_driver.rb +117 -0
  32. data/lib/virtuozzo/soap/drivers/up2date/mapping_registry.rb +3312 -0
  33. data/lib/virtuozzo/soap/drivers/up2date/types.rb +2670 -0
  34. data/lib/virtuozzo/soap/drivers/up2date_driver.rb +92 -0
  35. data/lib/virtuozzo/soap.rb +149 -0
  36. data/lib/virtuozzo.rb +18 -0
  37. data/script/console +10 -0
  38. data/script/github-gem-test +15 -0
  39. data/virtuozzo.gemspec +34 -0
  40. metadata +139 -0
@@ -0,0 +1,69 @@
1
+ require 'virtuozzo/soap/drivers/process/types'
2
+ require 'virtuozzo/soap/drivers/process/mapping_registry'
3
+ require 'soap/rpc/driver'
4
+
5
+ module Virtuozzo
6
+ module SOAP
7
+ module Drivers
8
+ # = ProcessDriver
9
+ #
10
+ class ProcessDriver < ::SOAP::RPC::Driver
11
+ DefaultEndpointUrl = "https://localhost:4646"
12
+
13
+ Methods = [
14
+ [ nil,
15
+ "execute",
16
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/processm", "execute"]],
17
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/processm", "executeResponse"]] ],
18
+ { :request_style => :document, :request_use => :literal,
19
+ :response_style => :document, :response_use => :literal,
20
+ :faults => {} }
21
+ ],
22
+ [ nil,
23
+ "kill",
24
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzaprocessm", "kill"]],
25
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzaprocessm", "killResponse"]] ],
26
+ { :request_style => :document, :request_use => :literal,
27
+ :response_style => :document, :response_use => :literal,
28
+ :faults => {} }
29
+ ]
30
+ ]
31
+
32
+ def initialize(endpoint_url = nil)
33
+ endpoint_url ||= DefaultEndpointUrl
34
+ super(endpoint_url, nil)
35
+ self.mapping_registry = DefaultMappingRegistry::EncodedRegistry
36
+ self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry
37
+ init_methods
38
+ end
39
+
40
+ private
41
+
42
+ def init_methods
43
+ Methods.each do |definitions|
44
+ opt = definitions.last
45
+
46
+ # set options to use default namespace instead of using n[#]
47
+ opt.merge!({
48
+ :use_default_namespace => true
49
+ })
50
+
51
+ if opt[:request_style] == :document
52
+ add_document_operation(*definitions)
53
+ else
54
+ add_rpc_operation(*definitions)
55
+ qname = definitions[0]
56
+ name = definitions[2]
57
+ if qname.name != name and qname.name.capitalize == name.capitalize
58
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
59
+ __send__(name, *arg)
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
66
+
67
+ end
68
+ end
69
+ end