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>
855 856 857 |
# File 'lib/ovirtsdk4/services.rb', line 855 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
885 886 887 |
# File 'lib/ovirtsdk4/services.rb', line 885 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
936 937 938 939 940 941 942 943 944 945 946 947 |
# File 'lib/ovirtsdk4/services.rb', line 936 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.
914 915 916 |
# File 'lib/ovirtsdk4/services.rb', line 914 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.
925 926 927 |
# File 'lib/ovirtsdk4/services.rb', line 925 def vms_service @vms_service ||= AffinityGroupVmsService.new(self, 'vms') end |