Class: Virtuozzo::SOAP::Connection
- Inherits:
-
Object
- Object
- Virtuozzo::SOAP::Connection
- Defined in:
- lib/virtuozzo/soap.rb
Overview
The Connection class provides for establishing of a SOAP session with a Virtuozzo Agent using either an SSL-secured or unsecure HTTP connection. Session data is stored for each Connection instance allowing all messages sent to be properly authenticated according to the Virtuozzo SOAP API specifications.
Instance Method Summary collapse
-
#alertm ⇒ SOAP::RPC::Driver
Handle for the alertm interface of the Virtuozzo API.
-
#authm ⇒ SOAP::RPC::Driver
Handle for the authm interface of the Virtuozzo API.
-
#backupm ⇒ SOAP::RPC::Driver
Handle for the backupm interface of the Virtuozzo API.
-
#computerm ⇒ SOAP::RPC::Driver
Handle for the computerm interface of the Virtuozzo API.
-
#devm ⇒ SOAP::RPC::Driver
Handle for the vzadevm interface of the Virtuozzo API.
-
#env_samplem ⇒ SOAP::RPC::Driver
Handle for the env_samplem interface of the Virtuozzo API.
-
#envm ⇒ SOAP::RPC::Driver
Handle for the vzaenvm interface of the Virtuozzo API.
-
#event_log ⇒ SOAP::RPC::Driver
Handle for the event_log interface of the Virtuozzo API.
-
#filer ⇒ SOAP::RPC::Driver
Handle for the filer interface of the Virtuozzo API.
-
#firewallm ⇒ SOAP::RPC::Driver
Handle for the firewallm interface of the Virtuozzo API.
-
#initialize(host, username, password, opts = {}) ⇒ Connection
constructor
Establish a new session with the specified host using the supplied credentials and options.
-
#licensem ⇒ SOAP::RPC::Driver
Handle for the licensem interface of the Virtuozzo API.
-
#mailer ⇒ SOAP::RPC::Driver
Handle for the mailer interface of the Virtuozzo API.
-
#networkm ⇒ SOAP::RPC::Driver
Handle for the vzanetworkm interface of the Virtuozzo API.
-
#op_log ⇒ SOAP::RPC::Driver
Handle for the op_log interface of the Virtuozzo API.
-
#packagem ⇒ SOAP::RPC::Driver
Handle for the vzapackagem interface of the Virtuozzo API.
-
#perf_mon ⇒ SOAP::RPC::Driver
Handle for the perf_mon interface of the Virtuozzo API.
-
#proc_info ⇒ SOAP::RPC::Driver
Handle for the vzaproc_info interface of the Virtuozzo API.
-
#processm ⇒ SOAP::RPC::Driver
Handle for the vzaprocessmm interface of the Virtuozzo API.
-
#relocator ⇒ SOAP::RPC::Driver
Handle for the vzarelocator interface of the Virtuozzo API.
-
#res_log ⇒ SOAP::RPC::Driver
Handle for the res_log interface of the Virtuozzo API.
-
#resourcem ⇒ SOAP::RPC::Driver
Handle for the resourcem interface of the Virtuozzo API.
-
#scheduler ⇒ SOAP::RPC::Driver
Handle for the scheduler interface of the Virtuozzo API.
-
#server_group ⇒ SOAP::RPC::Driver
Handle for the server_group interface of the Virtuozzo API.
-
#servicem ⇒ SOAP::RPC::Driver
Handle for the servicem interface of the Virtuozzo API.
-
#sessionm ⇒ SOAP::RPC::Driver
Handle for the sessionm interface of the Virtuozzo API.
-
#support ⇒ SOAP::RPC::Driver
Handle for the vzasupport interface of the Virtuozzo API.
-
#up2date ⇒ SOAP::RPC::Driver
Handle for the vzaup2date interface of the Virtuozzo API.
-
#userm ⇒ SOAP::RPC::Driver
Handle for the userm interface of the Virtuozzo API.
Constructor Details
#initialize(host, username, password, opts = {}) ⇒ Connection
Establish a new session with the specified host using the supplied credentials and options.
The opts hash may define :debug to be either true, false or the ‘device’ to be used for wiredumps, defaults to false. If set to true STDERR will be used for wiredumps.
The opts hash may define :verify_ssl to be either true or false in regards to whether SSL certificates should be verified for the various SOAP::RPC::Driver connections. The default is false
, causing no SSL certificate verification.
The opts hash may define a :realm for authentication. The default is the Virtuozzo system realm represented by the Virtuozzo::DEFAULT_REALM constant.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/virtuozzo/soap.rb', line 64 def initialize(host, username, password, opts = {}) = { :debug => false, :verify_ssl => false, :realm => Virtuozzo::DEFAULT_REALM }.merge(opts) @endpoint = host @username = username @password = password @realm = [:realm] @session_id = nil disable_ssl_verification unless [:verify_ssl] setup_debug_mode([:debug]) if [:debug] establish_session setup_header_handler end |
Instance Method Details
#alertm ⇒ SOAP::RPC::Driver
Handle for the alertm interface of the Virtuozzo API.
176 177 178 |
# File 'lib/virtuozzo/soap.rb', line 176 def alertm @alertm ||= Virtuozzo::SOAP::Drivers::Alertm.new(@endpoint) end |
#authm ⇒ SOAP::RPC::Driver
Handle for the authm interface of the Virtuozzo API.
184 185 186 |
# File 'lib/virtuozzo/soap.rb', line 184 def authm @authm ||= Virtuozzo::SOAP::Drivers::Authm.new(@endpoint) end |
#backupm ⇒ SOAP::RPC::Driver
Handle for the backupm interface of the Virtuozzo API.
192 193 194 |
# File 'lib/virtuozzo/soap.rb', line 192 def backupm @backupm ||= Virtuozzo::SOAP::Drivers::Backupm.new(@endpoint) end |
#computerm ⇒ SOAP::RPC::Driver
Handle for the computerm interface of the Virtuozzo API.
200 201 202 |
# File 'lib/virtuozzo/soap.rb', line 200 def computerm @computerm ||= Virtuozzo::SOAP::Drivers::Computerm.new(@endpoint) end |
#devm ⇒ SOAP::RPC::Driver
Handle for the vzadevm interface of the Virtuozzo API.
120 121 122 |
# File 'lib/virtuozzo/soap.rb', line 120 def devm @devm ||= Virtuozzo::SOAP::Drivers::Devm.new(@endpoint) end |
#env_samplem ⇒ SOAP::RPC::Driver
Handle for the env_samplem interface of the Virtuozzo API.
168 169 170 |
# File 'lib/virtuozzo/soap.rb', line 168 def env_samplem @env_samplem ||= Virtuozzo::SOAP::Drivers::EnvSamplem.new(@endpoint) end |
#envm ⇒ SOAP::RPC::Driver
Handle for the vzaenvm interface of the Virtuozzo API.
96 97 98 |
# File 'lib/virtuozzo/soap.rb', line 96 def envm @envm ||= Virtuozzo::SOAP::Drivers::Envm.new(@endpoint) end |
#event_log ⇒ SOAP::RPC::Driver
Handle for the event_log interface of the Virtuozzo API.
208 209 210 |
# File 'lib/virtuozzo/soap.rb', line 208 def event_log @event_log ||= Virtuozzo::SOAP::Drivers::EventLog.new(@endpoint) end |
#filer ⇒ SOAP::RPC::Driver
Handle for the filer interface of the Virtuozzo API.
224 225 226 |
# File 'lib/virtuozzo/soap.rb', line 224 def filer @filer ||= Virtuozzo::SOAP::Drivers::Filer.new(@endpoint) end |
#firewallm ⇒ SOAP::RPC::Driver
Handle for the firewallm interface of the Virtuozzo API.
232 233 234 |
# File 'lib/virtuozzo/soap.rb', line 232 def firewallm @firewallm ||= Virtuozzo::SOAP::Drivers::Firewallm.new(@endpoint) end |
#licensem ⇒ SOAP::RPC::Driver
Handle for the licensem interface of the Virtuozzo API.
240 241 242 |
# File 'lib/virtuozzo/soap.rb', line 240 def licensem @licensem ||= Virtuozzo::SOAP::Drivers::Licensem.new(@endpoint) end |
#mailer ⇒ SOAP::RPC::Driver
Handle for the mailer interface of the Virtuozzo API.
248 249 250 |
# File 'lib/virtuozzo/soap.rb', line 248 def mailer @mailer ||= Virtuozzo::SOAP::Drivers::Mailer.new(@endpoint) end |
#networkm ⇒ SOAP::RPC::Driver
Handle for the vzanetworkm interface of the Virtuozzo API.
128 129 130 |
# File 'lib/virtuozzo/soap.rb', line 128 def networkm @networkm ||= Virtuozzo::SOAP::Drivers::Networkm.new(@endpoint) end |
#op_log ⇒ SOAP::RPC::Driver
Handle for the op_log interface of the Virtuozzo API.
256 257 258 |
# File 'lib/virtuozzo/soap.rb', line 256 def op_log @op_log ||= Virtuozzo::SOAP::Drivers::OpLog.new(@endpoint) end |
#packagem ⇒ SOAP::RPC::Driver
Handle for the vzapackagem interface of the Virtuozzo API.
104 105 106 |
# File 'lib/virtuozzo/soap.rb', line 104 def packagem @packagem ||= Virtuozzo::SOAP::Drivers::Packagem.new(@endpoint) end |
#perf_mon ⇒ SOAP::RPC::Driver
Handle for the perf_mon interface of the Virtuozzo API.
264 265 266 |
# File 'lib/virtuozzo/soap.rb', line 264 def perf_mon @perf_mon ||= Virtuozzo::SOAP::Drivers::PerfMon.new(@endpoint) end |
#proc_info ⇒ SOAP::RPC::Driver
Handle for the vzaproc_info interface of the Virtuozzo API.
136 137 138 |
# File 'lib/virtuozzo/soap.rb', line 136 def proc_info @proc_info ||= Virtuozzo::SOAP::Drivers::ProcInfo.new(@endpoint) end |
#processm ⇒ SOAP::RPC::Driver
Handle for the vzaprocessmm interface of the Virtuozzo API.
144 145 146 |
# File 'lib/virtuozzo/soap.rb', line 144 def processm @processm ||= Virtuozzo::SOAP::Drivers::Processm.new(@endpoint) end |
#relocator ⇒ SOAP::RPC::Driver
Handle for the vzarelocator interface of the Virtuozzo API.
112 113 114 |
# File 'lib/virtuozzo/soap.rb', line 112 def relocator @relocator ||= Virtuozzo::SOAP::Drivers::Relocator.new(@endpoint) end |
#res_log ⇒ SOAP::RPC::Driver
Handle for the res_log interface of the Virtuozzo API.
272 273 274 |
# File 'lib/virtuozzo/soap.rb', line 272 def res_log @res_log ||= Virtuozzo::SOAP::Drivers::ResLog.new(@endpoint) end |
#resourcem ⇒ SOAP::RPC::Driver
Handle for the resourcem interface of the Virtuozzo API.
280 281 282 |
# File 'lib/virtuozzo/soap.rb', line 280 def resourcem @resourcem ||= Virtuozzo::SOAP::Drivers::Resourcem.new(@endpoint) end |
#scheduler ⇒ SOAP::RPC::Driver
Handle for the scheduler interface of the Virtuozzo API.
288 289 290 |
# File 'lib/virtuozzo/soap.rb', line 288 def scheduler @scheduler ||= Virtuozzo::SOAP::Drivers::Scheduler.new(@endpoint) end |
#server_group ⇒ SOAP::RPC::Driver
Handle for the server_group interface of the Virtuozzo API.
216 217 218 |
# File 'lib/virtuozzo/soap.rb', line 216 def server_group @server_group ||= Virtuozzo::SOAP::Drivers::ServerGroup.new(@endpoint) end |
#servicem ⇒ SOAP::RPC::Driver
Handle for the servicem interface of the Virtuozzo API.
296 297 298 |
# File 'lib/virtuozzo/soap.rb', line 296 def servicem @servicem ||= Virtuozzo::SOAP::Drivers::Servicem.new(@endpoint) end |
#sessionm ⇒ SOAP::RPC::Driver
Handle for the sessionm interface of the Virtuozzo API.
88 89 90 |
# File 'lib/virtuozzo/soap.rb', line 88 def sessionm @sessionm ||= Virtuozzo::SOAP::Drivers::Sessionm.new(@endpoint) end |
#support ⇒ SOAP::RPC::Driver
Handle for the vzasupport interface of the Virtuozzo API.
160 161 162 |
# File 'lib/virtuozzo/soap.rb', line 160 def support @support ||= Virtuozzo::SOAP::Drivers::Support.new(@endpoint) end |