Class: OvirtSDK4::ClusterLevelService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#cluster_features_service ⇒ ClusterFeaturesService
Reference to the service that manages the collection of supported features for this cluster level.
-
#get(opts = {}) ⇒ ClusterLevel
Provides the information about the capabilities of the specific cluster level managed by this service.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#cluster_features_service ⇒ ClusterFeaturesService
Reference to the service that manages the collection of supported features for this cluster level.
5527 5528 5529 |
# File 'lib/ovirtsdk4/services.rb', line 5527 def cluster_features_service @cluster_features_service ||= ClusterFeaturesService.new(self, 'clusterfeatures') end |
#get(opts = {}) ⇒ ClusterLevel
Provides the information about the capabilities of the specific cluster level managed by this service.
For example, to find what CPU types are supported by level 3.6 you can send a request like this:
GET /ovirt-engine/api/clusterlevels/3.6 HTTP/1.1
That will return a ClusterLevel object containing the supported CPU types, and other information which describes the cluster level:
<cluster_level id="3.6">
<cpu_types>
<cpu_type>
<name>Intel Nehalem Family</name>
<level>3</level>
<architecture>x86_64</architecture>
</cpu_type>
...
</cpu_types>
<permits>
<permit id="1">
<name>create_vm</name>
<administrative>false</administrative>
</permit>
...
</permits>
</cluster_level>
5518 5519 5520 |
# File 'lib/ovirtsdk4/services.rb', line 5518 def get(opts = {}) internal_get(GET, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 |
# File 'lib/ovirtsdk4/services.rb', line 5538 def service(path) if path.nil? || path == '' return self end if path == 'clusterfeatures' return cluster_features_service end if path.start_with?('clusterfeatures/') return cluster_features_service.service(path[16..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |