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,100 @@
|
|
1
|
+
require 'virtuozzo/soap/types/firewallm'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/firewallm'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class Firewallm < ::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/firewallm", "get"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/firewallm", "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/firewallm", "set"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/firewallm", "setResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"delete",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/firewallm", "delete"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/firewallm", "deleteResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"is_enabled",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/firewallm", "is_enabled"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/firewallm", "is_enabledResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
],
|
45
|
+
[ nil,
|
46
|
+
"enable",
|
47
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/firewallm", "enable"]],
|
48
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/firewallm", "enableResponse"]] ],
|
49
|
+
{ :request_style => :document, :request_use => :literal,
|
50
|
+
:response_style => :document, :response_use => :literal,
|
51
|
+
:faults => {} }
|
52
|
+
],
|
53
|
+
[ nil,
|
54
|
+
"disable",
|
55
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/firewallm", "disable"]],
|
56
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/firewallm", "disableResponse"]] ],
|
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::Firewallm::EncodedRegistry
|
67
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Firewallm::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,100 @@
|
|
1
|
+
require 'virtuozzo/soap/types/licensem'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/licensem'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class Licensem < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"list",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "list"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "listResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"parse",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "parse"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "parseResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"install",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "install"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "installResponse"]] ],
|
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/licensem", "update"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "updateResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
],
|
45
|
+
[ nil,
|
46
|
+
"get_hwid",
|
47
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "get_hwid"]],
|
48
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "get_hwidResponse"]] ],
|
49
|
+
{ :request_style => :document, :request_use => :literal,
|
50
|
+
:response_style => :document, :response_use => :literal,
|
51
|
+
:faults => {} }
|
52
|
+
],
|
53
|
+
[ nil,
|
54
|
+
"delete",
|
55
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "delete"]],
|
56
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/licensem", "deleteResponse"]] ],
|
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::Licensem::EncodedRegistry
|
67
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Licensem::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,108 @@
|
|
1
|
+
require 'virtuozzo/soap/types/mailer'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/mailer'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class Mailer < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"mail_template_list",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "mail_template_list"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "mail_template_listResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"get_mail_template",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "get_mail_template"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "get_mail_templateResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"set_mail_template",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "set_mail_template"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "set_mail_templateResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"remove_mail_template",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "remove_mail_template"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "remove_mail_templateResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
],
|
45
|
+
[ nil,
|
46
|
+
"set_relay",
|
47
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "set_relay"]],
|
48
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "set_relayResponse"]] ],
|
49
|
+
{ :request_style => :document, :request_use => :literal,
|
50
|
+
:response_style => :document, :response_use => :literal,
|
51
|
+
:faults => {} }
|
52
|
+
],
|
53
|
+
[ nil,
|
54
|
+
"get_relay",
|
55
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "get_relay"]],
|
56
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "get_relayResponse"]] ],
|
57
|
+
{ :request_style => :document, :request_use => :literal,
|
58
|
+
:response_style => :document, :response_use => :literal,
|
59
|
+
:faults => {} }
|
60
|
+
],
|
61
|
+
[ nil,
|
62
|
+
"post",
|
63
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "post"]],
|
64
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/mailer", "postResponse"]] ],
|
65
|
+
{ :request_style => :document, :request_use => :literal,
|
66
|
+
:response_style => :document, :response_use => :literal,
|
67
|
+
:faults => {} }
|
68
|
+
]
|
69
|
+
]
|
70
|
+
|
71
|
+
def initialize(endpoint_url = nil)
|
72
|
+
endpoint_url ||= DefaultEndpointUrl
|
73
|
+
super(endpoint_url, nil)
|
74
|
+
self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Mailer::EncodedRegistry
|
75
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Mailer::LiteralRegistry
|
76
|
+
init_methods
|
77
|
+
end
|
78
|
+
|
79
|
+
private
|
80
|
+
|
81
|
+
def init_methods
|
82
|
+
Methods.each do |definitions|
|
83
|
+
opt = definitions.last
|
84
|
+
|
85
|
+
# set options to use default namespace instead of using n[#]
|
86
|
+
opt.merge!({
|
87
|
+
:use_default_namespace => true
|
88
|
+
})
|
89
|
+
|
90
|
+
if opt[:request_style] == :document
|
91
|
+
add_document_operation(*definitions)
|
92
|
+
else
|
93
|
+
add_rpc_operation(*definitions)
|
94
|
+
qname = definitions[0]
|
95
|
+
name = definitions[2]
|
96
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
97
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
98
|
+
__send__(name, *arg)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'virtuozzo/soap/types/op_log'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/op_log'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class OpLog < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"get_ops",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/op_log", "get_ops"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/op_log", "get_opsResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
]
|
21
|
+
]
|
22
|
+
|
23
|
+
def initialize(endpoint_url = nil)
|
24
|
+
endpoint_url ||= DefaultEndpointUrl
|
25
|
+
super(endpoint_url, nil)
|
26
|
+
self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::OpLog::EncodedRegistry
|
27
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::OpLog::LiteralRegistry
|
28
|
+
init_methods
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def init_methods
|
34
|
+
Methods.each do |definitions|
|
35
|
+
opt = definitions.last
|
36
|
+
|
37
|
+
# set options to use default namespace instead of using n[#]
|
38
|
+
opt.merge!({
|
39
|
+
:use_default_namespace => true
|
40
|
+
})
|
41
|
+
|
42
|
+
if opt[:request_style] == :document
|
43
|
+
add_document_operation(*definitions)
|
44
|
+
else
|
45
|
+
add_rpc_operation(*definitions)
|
46
|
+
qname = definitions[0]
|
47
|
+
name = definitions[2]
|
48
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
49
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
50
|
+
__send__(name, *arg)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'virtuozzo/soap/types/perf_mon'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/perf_mon'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class PerfMon < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"start_monitor",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/perf_mon", "start_monitor"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/perf_mon", "start_monitorResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"stop_monitor",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/perf_mon", "stop_monitor"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/perf_mon", "stop_monitorResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"get",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/perf_mon", "get"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/perf_mon", "getResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
]
|
37
|
+
]
|
38
|
+
|
39
|
+
def initialize(endpoint_url = nil)
|
40
|
+
endpoint_url ||= DefaultEndpointUrl
|
41
|
+
super(endpoint_url, nil)
|
42
|
+
self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::PerfMon::EncodedRegistry
|
43
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::PerfMon::LiteralRegistry
|
44
|
+
init_methods
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def init_methods
|
50
|
+
Methods.each do |definitions|
|
51
|
+
opt = definitions.last
|
52
|
+
|
53
|
+
# set options to use default namespace instead of using n[#]
|
54
|
+
opt.merge!({
|
55
|
+
:use_default_namespace => true
|
56
|
+
})
|
57
|
+
|
58
|
+
if opt[:request_style] == :document
|
59
|
+
add_document_operation(*definitions)
|
60
|
+
else
|
61
|
+
add_rpc_operation(*definitions)
|
62
|
+
qname = definitions[0]
|
63
|
+
name = definitions[2]
|
64
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
65
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
66
|
+
__send__(name, *arg)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|