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