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,108 @@
|
|
1
|
+
require 'virtuozzo/soap/types/backupm'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/backupm'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class Backupm < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"backup_env",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "backup_env"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "backup_envResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"list",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "list"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "listResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"search",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "search"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "searchResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"get_info",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "get_info"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "get_infoResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
],
|
45
|
+
[ nil,
|
46
|
+
"set_config",
|
47
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "set_config"]],
|
48
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "set_configResponse"]] ],
|
49
|
+
{ :request_style => :document, :request_use => :literal,
|
50
|
+
:response_style => :document, :response_use => :literal,
|
51
|
+
:faults => {} }
|
52
|
+
],
|
53
|
+
[ nil,
|
54
|
+
"get_config",
|
55
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "get_config"]],
|
56
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "get_configResponse"]] ],
|
57
|
+
{ :request_style => :document, :request_use => :literal,
|
58
|
+
:response_style => :document, :response_use => :literal,
|
59
|
+
:faults => {} }
|
60
|
+
],
|
61
|
+
[ nil,
|
62
|
+
"restore_env",
|
63
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "restore_env"]],
|
64
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/backupm", "restore_envResponse"]] ],
|
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::Backupm::EncodedRegistry
|
75
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Backupm::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,108 @@
|
|
1
|
+
require 'virtuozzo/soap/types/computerm'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/computerm'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class Computerm < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"get_disk",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "get_disk"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "get_diskResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"get_system",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "get_system"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "get_systemResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"get_network",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "get_network"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "get_networkResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"reboot",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "reboot"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "rebootResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
],
|
45
|
+
[ nil,
|
46
|
+
"get_date",
|
47
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "get_date"]],
|
48
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "get_dateResponse"]] ],
|
49
|
+
{ :request_style => :document, :request_use => :literal,
|
50
|
+
:response_style => :document, :response_use => :literal,
|
51
|
+
:faults => {} }
|
52
|
+
],
|
53
|
+
[ nil,
|
54
|
+
"set_date",
|
55
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "set_date"]],
|
56
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "set_dateResponse"]] ],
|
57
|
+
{ :request_style => :document, :request_use => :literal,
|
58
|
+
:response_style => :document, :response_use => :literal,
|
59
|
+
:faults => {} }
|
60
|
+
],
|
61
|
+
[ nil,
|
62
|
+
"get_zones_info",
|
63
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "get_zones_info"]],
|
64
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/computerm", "get_zones_infoResponse"]] ],
|
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::Computerm::EncodedRegistry
|
75
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Computerm::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,84 @@
|
|
1
|
+
require 'virtuozzo/soap/types/env_samplem'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/env_samplem'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class EnvSamplem < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"get_sample_conf",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/env_samplem", "get_sample_conf"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/env_samplem", "get_sample_confResponse"]] ],
|
17
|
+
{ :request_style => :document, :request_use => :literal,
|
18
|
+
:response_style => :document, :response_use => :literal,
|
19
|
+
:faults => {} }
|
20
|
+
],
|
21
|
+
[ nil,
|
22
|
+
"set_sample_conf",
|
23
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/env_samplem", "set_sample_conf"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/env_samplem", "set_sample_confResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"del_sample_conf",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/env_samplem", "del_sample_conf"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/env_samplem", "del_sample_confResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"get_env_by_sample",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/env_samplem", "get_env_by_sample"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/env_samplem", "get_env_by_sampleResponse"]] ],
|
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::EnvSamplem::EncodedRegistry
|
51
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::EnvSamplem::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,60 @@
|
|
1
|
+
require 'virtuozzo/soap/types/event_log'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/event_log'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class EventLog < ::SOAP::RPC::Driver
|
10
|
+
DefaultEndpointUrl = "https://localhost:4646"
|
11
|
+
|
12
|
+
Methods = [
|
13
|
+
[ nil,
|
14
|
+
"get_events",
|
15
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/event_log", "get_events"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/event_log", "get_eventsResponse"]] ],
|
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::EventLog::EncodedRegistry
|
27
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::EventLog::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,156 @@
|
|
1
|
+
require 'virtuozzo/soap/types/filer'
|
2
|
+
require 'virtuozzo/soap/mapping_registries/filer'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module Virtuozzo
|
6
|
+
module SOAP
|
7
|
+
module Drivers
|
8
|
+
|
9
|
+
class Filer < ::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/filer", "list"]],
|
16
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "listResponse"]] ],
|
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/filer", "remove"]],
|
24
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "removeResponse"]] ],
|
25
|
+
{ :request_style => :document, :request_use => :literal,
|
26
|
+
:response_style => :document, :response_use => :literal,
|
27
|
+
:faults => {} }
|
28
|
+
],
|
29
|
+
[ nil,
|
30
|
+
"copy",
|
31
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "copy"]],
|
32
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "copyResponse"]] ],
|
33
|
+
{ :request_style => :document, :request_use => :literal,
|
34
|
+
:response_style => :document, :response_use => :literal,
|
35
|
+
:faults => {} }
|
36
|
+
],
|
37
|
+
[ nil,
|
38
|
+
"mkdir",
|
39
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "mkdir"]],
|
40
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "mkdirResponse"]] ],
|
41
|
+
{ :request_style => :document, :request_use => :literal,
|
42
|
+
:response_style => :document, :response_use => :literal,
|
43
|
+
:faults => {} }
|
44
|
+
],
|
45
|
+
[ nil,
|
46
|
+
"move",
|
47
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "move"]],
|
48
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "moveResponse"]] ],
|
49
|
+
{ :request_style => :document, :request_use => :literal,
|
50
|
+
:response_style => :document, :response_use => :literal,
|
51
|
+
:faults => {} }
|
52
|
+
],
|
53
|
+
[ nil,
|
54
|
+
"upload",
|
55
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "upload"]],
|
56
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "uploadResponse"]] ],
|
57
|
+
{ :request_style => :document, :request_use => :literal,
|
58
|
+
:response_style => :document, :response_use => :literal,
|
59
|
+
:faults => {} }
|
60
|
+
],
|
61
|
+
[ nil,
|
62
|
+
"download",
|
63
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "download"]],
|
64
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "downloadResponse"]] ],
|
65
|
+
{ :request_style => :document, :request_use => :literal,
|
66
|
+
:response_style => :document, :response_use => :literal,
|
67
|
+
:faults => {} }
|
68
|
+
],
|
69
|
+
[ nil,
|
70
|
+
"chmod",
|
71
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "chmod"]],
|
72
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "chmodResponse"]] ],
|
73
|
+
{ :request_style => :document, :request_use => :literal,
|
74
|
+
:response_style => :document, :response_use => :literal,
|
75
|
+
:faults => {} }
|
76
|
+
],
|
77
|
+
[ nil,
|
78
|
+
"chown",
|
79
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "chown"]],
|
80
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "chownResponse"]] ],
|
81
|
+
{ :request_style => :document, :request_use => :literal,
|
82
|
+
:response_style => :document, :response_use => :literal,
|
83
|
+
:faults => {} }
|
84
|
+
],
|
85
|
+
[ nil,
|
86
|
+
"link",
|
87
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "link"]],
|
88
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "linkResponse"]] ],
|
89
|
+
{ :request_style => :document, :request_use => :literal,
|
90
|
+
:response_style => :document, :response_use => :literal,
|
91
|
+
:faults => {} }
|
92
|
+
],
|
93
|
+
[ nil,
|
94
|
+
"stat",
|
95
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "stat"]],
|
96
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "statResponse"]] ],
|
97
|
+
{ :request_style => :document, :request_use => :literal,
|
98
|
+
:response_style => :document, :response_use => :literal,
|
99
|
+
:faults => {} }
|
100
|
+
],
|
101
|
+
[ nil,
|
102
|
+
"readlink",
|
103
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "readlink"]],
|
104
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "readlinkResponse"]] ],
|
105
|
+
{ :request_style => :document, :request_use => :literal,
|
106
|
+
:response_style => :document, :response_use => :literal,
|
107
|
+
:faults => {} }
|
108
|
+
],
|
109
|
+
[ nil,
|
110
|
+
"search",
|
111
|
+
[ ["in", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "search"]],
|
112
|
+
["out", "parameter", ["::SOAP::SOAPElement", "http://www.swsoft.com/webservices/vzl/4.0.0/filer", "searchResponse"]] ],
|
113
|
+
{ :request_style => :document, :request_use => :literal,
|
114
|
+
:response_style => :document, :response_use => :literal,
|
115
|
+
:faults => {} }
|
116
|
+
]
|
117
|
+
]
|
118
|
+
|
119
|
+
def initialize(endpoint_url = nil)
|
120
|
+
endpoint_url ||= DefaultEndpointUrl
|
121
|
+
super(endpoint_url, nil)
|
122
|
+
self.mapping_registry = Virtuozzo::SOAP::MappingRegistries::Filer::EncodedRegistry
|
123
|
+
self.literal_mapping_registry = Virtuozzo::SOAP::MappingRegistries::Filer::LiteralRegistry
|
124
|
+
init_methods
|
125
|
+
end
|
126
|
+
|
127
|
+
private
|
128
|
+
|
129
|
+
def init_methods
|
130
|
+
Methods.each do |definitions|
|
131
|
+
opt = definitions.last
|
132
|
+
|
133
|
+
# set options to use default namespace instead of using n[#]
|
134
|
+
opt.merge!({
|
135
|
+
:use_default_namespace => true
|
136
|
+
})
|
137
|
+
|
138
|
+
if opt[:request_style] == :document
|
139
|
+
add_document_operation(*definitions)
|
140
|
+
else
|
141
|
+
add_rpc_operation(*definitions)
|
142
|
+
qname = definitions[0]
|
143
|
+
name = definitions[2]
|
144
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
145
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
146
|
+
__send__(name, *arg)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|