Class: OvirtSDK4::AffinityGroupService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ AffinityGroup
Retrieve the affinity group details.
-
#remove(opts = {}) ⇒ Object
Remove the affinity group.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#update(group, opts = {}) ⇒ AffinityGroup
Update the affinity group.
-
#vms_service ⇒ AffinityGroupVmsService
Returns a reference to the service that manages the list of all virtual machines attached to this affinity group.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ AffinityGroup
Retrieve the affinity group details.
<affinity_group id="00000000-0000-0000-0000-000000000000">
<name>AF_GROUP_001</name>
<cluster id="00000000-0000-0000-0000-000000000000"/>
<positive>true</positive>
<enforcing>true</enforcing>
</affinity_group>
858 859 860 |
# File 'lib/ovirtsdk4/services.rb', line 858 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Remove the affinity group.
DELETE /ovirt-engine/api/clusters/000-000/affinitygroups/123-456
888 889 890 |
# File 'lib/ovirtsdk4/services.rb', line 888 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
939 940 941 942 943 944 945 946 947 948 949 950 |
# File 'lib/ovirtsdk4/services.rb', line 939 def service(path) if path.nil? || path == '' return self end if path == 'vms' return vms_service end if path.start_with?('vms/') return vms_service.service(path[4..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#update(group, opts = {}) ⇒ AffinityGroup
Update the affinity group.
917 918 919 |
# File 'lib/ovirtsdk4/services.rb', line 917 def update(group, opts = {}) internal_update(group, AffinityGroup, UPDATE, opts) end |
#vms_service ⇒ AffinityGroupVmsService
Returns a reference to the service that manages the list of all virtual machines attached to this affinity group.
928 929 930 |
# File 'lib/ovirtsdk4/services.rb', line 928 def vms_service @vms_service ||= AffinityGroupVmsService.new(self, 'vms') end |