plainprograms-virtuozzo 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,109 @@
1
+ require 'virtuozzo/soap/drivers/support/types'
2
+ require 'virtuozzo/soap/drivers/support/mapping_registry'
3
+ require 'soap/rpc/driver'
4
+
5
+ module Virtuozzo
6
+ module SOAP
7
+ module Drivers
8
+ # = SupportDriver
9
+ #
10
+ class VzasupportPort < ::SOAP::RPC::Driver
11
+ DefaultEndpointUrl = "https://localhost:4646"
12
+
13
+ Methods = [
14
+ [ nil,
15
+ "start_channel",
16
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "start_channel"]],
17
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "start_channelResponse"]] ],
18
+ { :request_style => :document, :request_use => :literal,
19
+ :response_style => :document, :response_use => :literal,
20
+ :faults => {} }
21
+ ],
22
+ [ nil,
23
+ "stop_channel",
24
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "stop_channel"]],
25
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "stop_channelResponse"]] ],
26
+ { :request_style => :document, :request_use => :literal,
27
+ :response_style => :document, :response_use => :literal,
28
+ :faults => {} }
29
+ ],
30
+ [ nil,
31
+ "get_channel_status",
32
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "get_channel_status"]],
33
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "get_channel_statusResponse"]] ],
34
+ { :request_style => :document, :request_use => :literal,
35
+ :response_style => :document, :response_use => :literal,
36
+ :faults => {} }
37
+ ],
38
+ [ nil,
39
+ "get_key_status",
40
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "get_key_status"]],
41
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "get_key_statusResponse"]] ],
42
+ { :request_style => :document, :request_use => :literal,
43
+ :response_style => :document, :response_use => :literal,
44
+ :faults => {} }
45
+ ],
46
+ [ nil,
47
+ "set_key",
48
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "set_key"]],
49
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "set_keyResponse"]] ],
50
+ { :request_style => :document, :request_use => :literal,
51
+ :response_style => :document, :response_use => :literal,
52
+ :faults => {} }
53
+ ],
54
+ [ nil,
55
+ "remove_key",
56
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "remove_key"]],
57
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "remove_keyResponse"]] ],
58
+ { :request_style => :document, :request_use => :literal,
59
+ :response_style => :document, :response_use => :literal,
60
+ :faults => {} }
61
+ ],
62
+ [ nil,
63
+ "problem_report",
64
+ [ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "problem_report"]],
65
+ ["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vza/4.0.0/vzasupport", "problem_reportResponse"]] ],
66
+ { :request_style => :document, :request_use => :literal,
67
+ :response_style => :document, :response_use => :literal,
68
+ :faults => {} }
69
+ ]
70
+ ]
71
+
72
+ def initialize(endpoint_url = nil)
73
+ endpoint_url ||= DefaultEndpointUrl
74
+ super(endpoint_url, nil)
75
+ self.mapping_registry = DefaultMappingRegistry::EncodedRegistry
76
+ self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry
77
+ init_methods
78
+ end
79
+
80
+ private
81
+
82
+ def init_methods
83
+ Methods.each do |definitions|
84
+ opt = definitions.last
85
+
86
+ # set options to use default namespace instead of using n[#]
87
+ opt.merge!({
88
+ :use_default_namespace => true
89
+ })
90
+
91
+ if opt[:request_style] == :document
92
+ add_document_operation(*definitions)
93
+ else
94
+ add_rpc_operation(*definitions)
95
+ qname = definitions[0]
96
+ name = definitions[2]
97
+ if qname.name != name and qname.name.capitalize == name.capitalize
98
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
99
+ __send__(name, *arg)
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+
107
+ end
108
+ end
109
+ end