Class: OvirtSDK4::Probe
- Inherits:
-
Object
- Object
- OvirtSDK4::Probe
- Defined in:
- lib/ovirtsdk4/probe.rb
Overview
This class is used to probe the engine to find which API versions it supports.
Constant Summary collapse
- ENGINE_CERTIFICATE_PATH =
'/ovirt-engine/services/pki-resource?resource=engine-certificate&format=OPENSSH-PUBKEY'.freeze
Class Method Summary collapse
-
.exists?(opts) ⇒ Boolean
This class method receives a set of options that define the server to probe and returns a boolean value that represents whether an oVirt instance was detected.
-
.probe(opts) ⇒ Array<ProbeResult>
This class method receives a set of options that define the server to probe and returns an arrays of objects of the OvirtSDK4::ProbeResult class containing the results of the probe.
Class Method Details
.exists?(opts) ⇒ Boolean
This class method receives a set of options that define the server to probe and returns a boolean value that represents whether an oVirt instance was detected.
98 99 100 101 102 103 104 105 106 107 |
# File 'lib/ovirtsdk4/probe.rb', line 98 def self.exists?(opts) probe = nil begin opts[:insecure] = true probe = Probe.new(opts) probe.exists? ensure probe.close if probe end end |
.probe(opts) ⇒ Array<ProbeResult>
This class method receives a set of options that define the server to probe and returns an arrays of objects of the OvirtSDK4::ProbeResult class containing the results of the probe.
60 61 62 63 64 65 66 67 68 |
# File 'lib/ovirtsdk4/probe.rb', line 60 def self.probe(opts) probe = nil begin probe = Probe.new(opts) probe.probe ensure probe.close if probe end end |