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.
- data/CHANGELOG.rdoc +21 -0
- data/Rakefile +3 -3
- data/TODO.rdoc +20 -0
- data/lib/virtuozzo/soap.rb +216 -0
- data/lib/virtuozzo/soap/drivers/alertm.rb +78 -0
- data/lib/virtuozzo/soap/drivers/authm.rb +172 -0
- data/lib/virtuozzo/soap/drivers/backupm.rb +108 -0
- data/lib/virtuozzo/soap/drivers/computerm.rb +108 -0
- data/lib/virtuozzo/soap/drivers/env_samplem.rb +84 -0
- data/lib/virtuozzo/soap/drivers/event_log.rb +60 -0
- data/lib/virtuozzo/soap/drivers/filer.rb +156 -0
- data/lib/virtuozzo/soap/drivers/firewallm.rb +100 -0
- data/lib/virtuozzo/soap/drivers/licensem.rb +100 -0
- data/lib/virtuozzo/soap/drivers/mailer.rb +108 -0
- data/lib/virtuozzo/soap/drivers/op_log.rb +60 -0
- data/lib/virtuozzo/soap/drivers/perf_mon.rb +76 -0
- data/lib/virtuozzo/soap/drivers/res_log.rb +84 -0
- data/lib/virtuozzo/soap/drivers/resourcem.rb +100 -0
- data/lib/virtuozzo/soap/drivers/scheduler.rb +84 -0
- data/lib/virtuozzo/soap/drivers/server_group.rb +140 -0
- data/lib/virtuozzo/soap/drivers/servicem.rb +100 -0
- data/lib/virtuozzo/soap/drivers/userm.rb +156 -0
- data/lib/virtuozzo/soap/mapping_registries/alertm.rb +2799 -0
- data/lib/virtuozzo/soap/mapping_registries/authm.rb +3292 -0
- data/lib/virtuozzo/soap/mapping_registries/backupm.rb +3597 -0
- data/lib/virtuozzo/soap/mapping_registries/computerm.rb +2896 -0
- data/lib/virtuozzo/soap/mapping_registries/env_samplem.rb +2735 -0
- data/lib/virtuozzo/soap/mapping_registries/event_log.rb +2695 -0
- data/lib/virtuozzo/soap/mapping_registries/filer.rb +3211 -0
- data/lib/virtuozzo/soap/mapping_registries/firewallm.rb +2815 -0
- data/lib/virtuozzo/soap/mapping_registries/licensem.rb +2889 -0
- data/lib/virtuozzo/soap/mapping_registries/mailer.rb +2831 -0
- data/lib/virtuozzo/soap/mapping_registries/op_log.rb +2724 -0
- data/lib/virtuozzo/soap/mapping_registries/perf_mon.rb +2798 -0
- data/lib/virtuozzo/soap/mapping_registries/res_log.rb +2946 -0
- data/lib/virtuozzo/soap/mapping_registries/resourcem.rb +2837 -0
- data/lib/virtuozzo/soap/mapping_registries/scheduler.rb +2928 -0
- data/lib/virtuozzo/soap/mapping_registries/server_group.rb +3161 -0
- data/lib/virtuozzo/soap/mapping_registries/servicem.rb +2949 -0
- data/lib/virtuozzo/soap/mapping_registries/userm.rb +3173 -0
- data/lib/virtuozzo/soap/types/alertm.rb +2233 -0
- data/lib/virtuozzo/soap/types/authm.rb +2655 -0
- data/lib/virtuozzo/soap/types/backupm.rb +2773 -0
- data/lib/virtuozzo/soap/types/computerm.rb +2334 -0
- data/lib/virtuozzo/soap/types/env_samplem.rb +2159 -0
- data/lib/virtuozzo/soap/types/event_log.rb +2125 -0
- data/lib/virtuozzo/soap/types/filer.rb +2807 -0
- data/lib/virtuozzo/soap/types/firewallm.rb +2225 -0
- data/lib/virtuozzo/soap/types/licensem.rb +2266 -0
- data/lib/virtuozzo/soap/types/mailer.rb +2311 -0
- data/lib/virtuozzo/soap/types/op_log.rb +2156 -0
- data/lib/virtuozzo/soap/types/perf_mon.rb +2258 -0
- data/lib/virtuozzo/soap/types/res_log.rb +2340 -0
- data/lib/virtuozzo/soap/types/resourcem.rb +2213 -0
- data/lib/virtuozzo/soap/types/scheduler.rb +2307 -0
- data/lib/virtuozzo/soap/types/server_group.rb +2467 -0
- data/lib/virtuozzo/soap/types/servicem.rb +2292 -0
- data/lib/virtuozzo/soap/types/userm.rb +2599 -0
- data/virtuozzo.gemspec +10 -10
- metadata +116 -6
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'virtuozzo/soap/types/res_log'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/res_log'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class ResLog < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"get_log",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/res_log", "get_log"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/res_log", "get_logResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"set_log",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/res_log", "set_log"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/res_log", "set_logResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"get_log_info",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/res_log", "get_log_info"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/res_log", "get_log_infoResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"get_top",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/res_log", "get_top"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/res_log", "get_topResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
]
|
45
|
+
]
|
46
|
+
|
47
|
+
def initialize(endpoint_url = nil)
|
48
|
+
endpoint_url ||= DefaultEndpointUrl
|
49
|
+
super(endpoint_url, nil)
|
50
|
+
self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::ResLog::EncodedRegistry
|
51
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::ResLog::LiteralRegistry
|
52
|
+
init_methods
|
53
|
+
end
|
54
|
+
|
55
|
+
private
|
56
|
+
|
57
|
+
def init_methods
|
58
|
+
Methods.each do |definitions|
|
59
|
+
opt = definitions.last
|
60
|
+
|
61
|
+
# set options to use default namespace instead of using n[#]
|
62
|
+
opt.merge!({
|
63
|
+
:use_default_namespace => true
|
64
|
+
})
|
65
|
+
|
66
|
+
if opt[:request_style] == :document
|
67
|
+
add_document_operation(*definitions)
|
68
|
+
else
|
69
|
+
add_rpc_operation(*definitions)
|
70
|
+
qname = definitions[0]
|
71
|
+
name = definitions[2]
|
72
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
73
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
74
|
+
__send__(name, *arg)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
require 'virtuozzo/soap/types/resourcem'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/resourcem'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class Resourcem < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"allocate",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "allocate"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "allocateResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"release",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "release"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "releaseResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"set_pool",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "set_pool"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "set_poolResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"get_pool",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "get_pool"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "get_poolResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
],
|
45
|
+
[ nil,
|
46
|
+
"add_resource",
|
47
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "add_resource"]],
|
48
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "add_resourceResponse"]] ],
|
49
|
+
{ :request_style => :document, :request_use => :literal,
|
50
|
+
:response_style => :document, :response_use => :literal,
|
51
|
+
:faults => {} }
|
52
|
+
],
|
53
|
+
[ nil,
|
54
|
+
"remove_resource",
|
55
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "remove_resource"]],
|
56
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/resourcem", "remove_resourceResponse"]] ],
|
57
|
+
{ :request_style => :document, :request_use => :literal,
|
58
|
+
:response_style => :document, :response_use => :literal,
|
59
|
+
:faults => {} }
|
60
|
+
]
|
61
|
+
]
|
62
|
+
|
63
|
+
def initialize(endpoint_url = nil)
|
64
|
+
endpoint_url ||= DefaultEndpointUrl
|
65
|
+
super(endpoint_url, nil)
|
66
|
+
self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Resourcem::EncodedRegistry
|
67
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Resourcem::LiteralRegistry
|
68
|
+
init_methods
|
69
|
+
end
|
70
|
+
|
71
|
+
private
|
72
|
+
|
73
|
+
def init_methods
|
74
|
+
Methods.each do |definitions|
|
75
|
+
opt = definitions.last
|
76
|
+
|
77
|
+
# set options to use default namespace instead of using n[#]
|
78
|
+
opt.merge!({
|
79
|
+
:use_default_namespace => true
|
80
|
+
})
|
81
|
+
|
82
|
+
if opt[:request_style] == :document
|
83
|
+
add_document_operation(*definitions)
|
84
|
+
else
|
85
|
+
add_rpc_operation(*definitions)
|
86
|
+
qname = definitions[0]
|
87
|
+
name = definitions[2]
|
88
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
89
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
90
|
+
__send__(name, *arg)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'virtuozzo/soap/types/scheduler'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/scheduler'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class Scheduler < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"add",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/scheduler", "add"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/scheduler", "addResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"remove",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/scheduler", "remove"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/scheduler", "removeResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"list",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/scheduler", "list"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/scheduler", "listResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"update",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/scheduler", "update"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/scheduler", "updateResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
]
|
45
|
+
]
|
46
|
+
|
47
|
+
def initialize(endpoint_url = nil)
|
48
|
+
endpoint_url ||= DefaultEndpointUrl
|
49
|
+
super(endpoint_url, nil)
|
50
|
+
self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Scheduler::EncodedRegistry
|
51
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Scheduler::LiteralRegistry
|
52
|
+
init_methods
|
53
|
+
end
|
54
|
+
|
55
|
+
private
|
56
|
+
|
57
|
+
def init_methods
|
58
|
+
Methods.each do |definitions|
|
59
|
+
opt = definitions.last
|
60
|
+
|
61
|
+
# set options to use default namespace instead of using n[#]
|
62
|
+
opt.merge!({
|
63
|
+
:use_default_namespace => true
|
64
|
+
})
|
65
|
+
|
66
|
+
if opt[:request_style] == :document
|
67
|
+
add_document_operation(*definitions)
|
68
|
+
else
|
69
|
+
add_rpc_operation(*definitions)
|
70
|
+
qname = definitions[0]
|
71
|
+
name = definitions[2]
|
72
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
73
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
74
|
+
__send__(name, *arg)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
require 'virtuozzo/soap/types/server_group'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/server_group'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class ServerGroup < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"add",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "add"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "addResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"get_info",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "get_info"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "get_infoResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"get_list",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "get_list"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "get_listResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"del",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "del"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "delResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
],
|
45
|
+
[ nil,
|
46
|
+
"destroy",
|
47
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "destroy"]],
|
48
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "destroyResponse"]] ],
|
49
|
+
{ :request_style => :document, :request_use => :literal,
|
50
|
+
:response_style => :document, :response_use => :literal,
|
51
|
+
:faults => {} }
|
52
|
+
],
|
53
|
+
[ nil,
|
54
|
+
"unregister_master",
|
55
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "unregister_master"]],
|
56
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "unregister_masterResponse"]] ],
|
57
|
+
{ :request_style => :document, :request_use => :literal,
|
58
|
+
:response_style => :document, :response_use => :literal,
|
59
|
+
:faults => {} }
|
60
|
+
],
|
61
|
+
[ nil,
|
62
|
+
"register_master",
|
63
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "register_master"]],
|
64
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "register_masterResponse"]] ],
|
65
|
+
{ :request_style => :document, :request_use => :literal,
|
66
|
+
:response_style => :document, :response_use => :literal,
|
67
|
+
:faults => {} }
|
68
|
+
],
|
69
|
+
[ nil,
|
70
|
+
"set_config",
|
71
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "set_config"]],
|
72
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "set_configResponse"]] ],
|
73
|
+
{ :request_style => :document, :request_use => :literal,
|
74
|
+
:response_style => :document, :response_use => :literal,
|
75
|
+
:faults => {} }
|
76
|
+
],
|
77
|
+
[ nil,
|
78
|
+
"get_config",
|
79
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "get_config"]],
|
80
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "get_configResponse"]] ],
|
81
|
+
{ :request_style => :document, :request_use => :literal,
|
82
|
+
:response_style => :document, :response_use => :literal,
|
83
|
+
:faults => {} }
|
84
|
+
],
|
85
|
+
[ nil,
|
86
|
+
"get_vocabulary",
|
87
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "get_vocabulary"]],
|
88
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "get_vocabularyResponse"]] ],
|
89
|
+
{ :request_style => :document, :request_use => :literal,
|
90
|
+
:response_style => :document, :response_use => :literal,
|
91
|
+
:faults => {} }
|
92
|
+
],
|
93
|
+
[ nil,
|
94
|
+
"get_env_voc",
|
95
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "get_env_voc"]],
|
96
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/server_group", "get_env_vocResponse"]] ],
|
97
|
+
{ :request_style => :document, :request_use => :literal,
|
98
|
+
:response_style => :document, :response_use => :literal,
|
99
|
+
:faults => {} }
|
100
|
+
]
|
101
|
+
]
|
102
|
+
|
103
|
+
def initialize(endpoint_url = nil)
|
104
|
+
endpoint_url ||= DefaultEndpointUrl
|
105
|
+
super(endpoint_url, nil)
|
106
|
+
self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::ServerGroup::EncodedRegistry
|
107
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::ServerGroup::LiteralRegistry
|
108
|
+
init_methods
|
109
|
+
end
|
110
|
+
|
111
|
+
private
|
112
|
+
|
113
|
+
def init_methods
|
114
|
+
Methods.each do |definitions|
|
115
|
+
opt = definitions.last
|
116
|
+
|
117
|
+
# set options to use default namespace instead of using n[#]
|
118
|
+
opt.merge!({
|
119
|
+
:use_default_namespace => true
|
120
|
+
})
|
121
|
+
|
122
|
+
if opt[:request_style] == :document
|
123
|
+
add_document_operation(*definitions)
|
124
|
+
else
|
125
|
+
add_rpc_operation(*definitions)
|
126
|
+
qname = definitions[0]
|
127
|
+
name = definitions[2]
|
128
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
129
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
130
|
+
__send__(name, *arg)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
require 'virtuozzo/soap/types/servicem'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/servicem'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class Servicem < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"get",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "get"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "getResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"set",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "set"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "setResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"start",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "start"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "startResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"stop",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "stop"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "stopResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
],
|
45
|
+
[ nil,
|
46
|
+
"restart",
|
47
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "restart"]],
|
48
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "restartResponse"]] ],
|
49
|
+
{ :request_style => :document, :request_use => :literal,
|
50
|
+
:response_style => :document, :response_use => :literal,
|
51
|
+
:faults => {} }
|
52
|
+
],
|
53
|
+
[ nil,
|
54
|
+
"set_startup_type",
|
55
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "set_startup_type"]],
|
56
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/servicem", "set_startup_typeResponse"]] ],
|
57
|
+
{ :request_style => :document, :request_use => :literal,
|
58
|
+
:response_style => :document, :response_use => :literal,
|
59
|
+
:faults => {} }
|
60
|
+
]
|
61
|
+
]
|
62
|
+
|
63
|
+
def initialize(endpoint_url = nil)
|
64
|
+
endpoint_url ||= DefaultEndpointUrl
|
65
|
+
super(endpoint_url, nil)
|
66
|
+
self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Servicem::EncodedRegistry
|
67
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Servicem::LiteralRegistry
|
68
|
+
init_methods
|
69
|
+
end
|
70
|
+
|
71
|
+
private
|
72
|
+
|
73
|
+
def init_methods
|
74
|
+
Methods.each do |definitions|
|
75
|
+
opt = definitions.last
|
76
|
+
|
77
|
+
# set options to use default namespace instead of using n[#]
|
78
|
+
opt.merge!({
|
79
|
+
:use_default_namespace => true
|
80
|
+
})
|
81
|
+
|
82
|
+
if opt[:request_style] == :document
|
83
|
+
add_document_operation(*definitions)
|
84
|
+
else
|
85
|
+
add_rpc_operation(*definitions)
|
86
|
+
qname = definitions[0]
|
87
|
+
name = definitions[2]
|
88
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
89
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
90
|
+
__send__(name, *arg)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|