Class: OvirtSDK4::VmService
- Inherits:
-
MeasurableService
- Object
- Service
- MeasurableService
- OvirtSDK4::VmService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (AssignedAffinityLabelsService) affinity_labels_service
List of scheduling labels assigned to this VM.
-
- (VmApplicationsService) applications_service
Locates the
applicationsservice. -
- (Object) cancel_migration(opts = {})
Executes the
cancel_migrationmethod. -
- (VmCdromsService) cdroms_service
Locates the
cdromsservice. -
- (Object) clone(opts = {})
Executes the
clonemethod. -
- (Object) commit_snapshot(opts = {})
Executes the
commit_snapshotmethod. -
- (Object) detach(opts = {})
Executes the
detachmethod. -
- (DiskAttachmentsService) disk_attachments_service
List of disks attached to this virtual machine.
-
- (VmDisksService) disks_service
Locates the
disksservice. -
- (Object) export(opts = {})
Executes the
exportmethod. -
- (Object) freeze_filesystems(opts = {})
Executes the
freeze_filesystemsmethod. -
- (Vm) get(opts = {})
Retrieves the description of the virtual machine.
-
- (GraphicsConsolesService) graphics_consoles_service
Locates the
graphics_consolesservice. -
- (VmHostDevicesService) host_devices_service
Locates the
host_devicesservice. -
- (KatelloErrataService) katello_errata_service
Locates the
katello_errataservice. -
- (Object) logon(opts = {})
Executes the
logonmethod. -
- (Object) maintenance(opts = {})
Executes the
maintenancemethod. -
- (Object) migrate(opts = {})
Executes the
migratemethod. -
- (VmNicsService) nics_service
Locates the
nicsservice. -
- (VmNumaNodesService) numa_nodes_service
Locates the
numa_nodesservice. -
- (AssignedPermissionsService) permissions_service
Locates the
permissionsservice. -
- (Object) preview_snapshot(opts = {})
Executes the
preview_snapshotmethod. -
- (Object) reboot(opts = {})
Executes the
rebootmethod. -
- (Object) remove(opts = {})
Deletes the object managed by this service.
-
- (Object) reorder_mac_addresses(opts = {})
Executes the
reorder_mac_addressesmethod. -
- (VmReportedDevicesService) reported_devices_service
Locates the
reported_devicesservice. -
- (Service) service(path)
Locates the service corresponding to the given path.
-
- (VmSessionsService) sessions_service
Locates the
sessionsservice. -
- (Object) shutdown(opts = {})
Executes the
shutdownmethod. -
- (SnapshotsService) snapshots_service
Locates the
snapshotsservice. -
- (Object) start(opts = {})
Executes the
startmethod. -
- (StatisticsService) statistics_service
Locates the
statisticsservice. -
- (Object) stop(opts = {})
Executes the
stopmethod. -
- (Object) suspend(opts = {})
Executes the
suspendmethod. -
- (AssignedTagsService) tags_service
Locates the
tagsservice. -
- (Object) thaw_filesystems(opts = {})
Executes the
thaw_filesystemsmethod. -
- (Object) ticket(opts = {})
Executes the
ticketmethod. -
- (String) to_s
Returns an string representation of this service.
-
- (Object) undo_snapshot(opts = {})
Executes the
undo_snapshotmethod. -
- (Object) update(vm)
Updates the object managed by this service.
-
- (VmWatchdogsService) watchdogs_service
Locates the
watchdogsservice.
Instance Method Details
- (AssignedAffinityLabelsService) affinity_labels_service
List of scheduling labels assigned to this VM.
23927 23928 23929 |
# File 'lib/ovirtsdk4/services.rb', line 23927 def affinity_labels_service return AssignedAffinityLabelsService.new(@connection, "#{@path}/affinitylabels") end |
- (VmApplicationsService) applications_service
Locates the applications service.
23935 23936 23937 |
# File 'lib/ovirtsdk4/services.rb', line 23935 def applications_service return VmApplicationsService.new(@connection, "#{@path}/applications") end |
- (Object) cancel_migration(opts = {})
Executes the cancel_migration method.
23361 23362 23363 23364 23365 23366 23367 23368 23369 23370 23371 23372 23373 23374 23375 23376 23377 23378 23379 |
# File 'lib/ovirtsdk4/services.rb', line 23361 def cancel_migration(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/cancelmigration", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (VmCdromsService) cdroms_service
Locates the cdroms service.
23943 23944 23945 |
# File 'lib/ovirtsdk4/services.rb', line 23943 def cdroms_service return VmCdromsService.new(@connection, "#{@path}/cdroms") end |
- (Object) clone(opts = {})
Executes the clone method.
23384 23385 23386 23387 23388 23389 23390 23391 23392 23393 23394 23395 23396 23397 23398 23399 23400 23401 23402 |
# File 'lib/ovirtsdk4/services.rb', line 23384 def clone(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/clone", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Object) commit_snapshot(opts = {})
Executes the commit_snapshot method.
23407 23408 23409 23410 23411 23412 23413 23414 23415 23416 23417 23418 23419 23420 23421 23422 23423 23424 23425 |
# File 'lib/ovirtsdk4/services.rb', line 23407 def commit_snapshot(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/commitsnapshot", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Object) detach(opts = {})
Executes the detach method.
23430 23431 23432 23433 23434 23435 23436 23437 23438 23439 23440 23441 23442 23443 23444 23445 23446 23447 23448 |
# File 'lib/ovirtsdk4/services.rb', line 23430 def detach(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/detach", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (DiskAttachmentsService) disk_attachments_service
List of disks attached to this virtual machine.
23951 23952 23953 |
# File 'lib/ovirtsdk4/services.rb', line 23951 def return DiskAttachmentsService.new(@connection, "#{@path}/diskattachments") end |
- (VmDisksService) disks_service
Locates the disks service.
23959 23960 23961 |
# File 'lib/ovirtsdk4/services.rb', line 23959 def disks_service return VmDisksService.new(@connection, "#{@path}/disks") end |
- (Object) export(opts = {})
Executes the export method.
23453 23454 23455 23456 23457 23458 23459 23460 23461 23462 23463 23464 23465 23466 23467 23468 23469 23470 23471 |
# File 'lib/ovirtsdk4/services.rb', line 23453 def export(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/export", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Object) freeze_filesystems(opts = {})
Executes the freeze_filesystems method.
23476 23477 23478 23479 23480 23481 23482 23483 23484 23485 23486 23487 23488 23489 23490 23491 23492 23493 23494 |
# File 'lib/ovirtsdk4/services.rb', line 23476 def freeze_filesystems(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/freezefilesystems", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Vm) get(opts = {})
Retrieves the description of the virtual machine.
Note that some elements of the description of the virtual machine won’t be returned unless the All-Content
header is present in the request and has the value true. The elements that aren’t currently returned are
the following:
-
console -
initialization.configuration.data- The OVF document describing the virtual machine. -
rng_source -
soundcard -
virtio_scsi
With the Python SDK the All-Content header can be set using the all_content parameter of the get
method:
api.vms.get(name="myvm", all_content=True)
Note that the reason for not including these elements is performance: they are seldom used and they require
additional queries in the server. So try to use the All-Content header only when it is really needed.
23545 23546 23547 23548 23549 23550 23551 23552 23553 23554 23555 23556 23557 23558 23559 23560 23561 23562 23563 23564 23565 23566 23567 23568 23569 23570 |
# File 'lib/ovirtsdk4/services.rb', line 23545 def get(opts = {}) query = {} value = opts[:filter] unless value.nil? value = Writer.render_boolean(value) query['filter'] = value end value = opts[:next_run] unless value.nil? value = Writer.render_boolean(value) query['next_run'] = value end request = Request.new(:method => :GET, :path => @path, :query => query) response = @connection.send(request) case response.code when 200 begin reader = XmlReader.new(response.body) return VmReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (GraphicsConsolesService) graphics_consoles_service
Locates the graphics_consoles service.
23967 23968 23969 |
# File 'lib/ovirtsdk4/services.rb', line 23967 def graphics_consoles_service return GraphicsConsolesService.new(@connection, "#{@path}/graphicsconsoles") end |
- (VmHostDevicesService) host_devices_service
Locates the host_devices service.
23975 23976 23977 |
# File 'lib/ovirtsdk4/services.rb', line 23975 def host_devices_service return VmHostDevicesService.new(@connection, "#{@path}/hostdevices") end |
- (KatelloErrataService) katello_errata_service
Locates the katello_errata service.
23983 23984 23985 |
# File 'lib/ovirtsdk4/services.rb', line 23983 def katello_errata_service return KatelloErrataService.new(@connection, "#{@path}/katelloerrata") end |
- (Object) logon(opts = {})
Executes the logon method.
23575 23576 23577 23578 23579 23580 23581 23582 23583 23584 23585 23586 23587 23588 23589 23590 23591 23592 23593 |
# File 'lib/ovirtsdk4/services.rb', line 23575 def logon(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/logon", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Object) maintenance(opts = {})
Executes the maintenance method.
23598 23599 23600 23601 23602 23603 23604 23605 23606 23607 23608 23609 23610 23611 23612 23613 23614 23615 23616 |
# File 'lib/ovirtsdk4/services.rb', line 23598 def maintenance(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/maintenance", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Object) migrate(opts = {})
Executes the migrate method.
23621 23622 23623 23624 23625 23626 23627 23628 23629 23630 23631 23632 23633 23634 23635 23636 23637 23638 23639 |
# File 'lib/ovirtsdk4/services.rb', line 23621 def migrate(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/migrate", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (VmNicsService) nics_service
Locates the nics service.
23991 23992 23993 |
# File 'lib/ovirtsdk4/services.rb', line 23991 def nics_service return VmNicsService.new(@connection, "#{@path}/nics") end |
- (VmNumaNodesService) numa_nodes_service
Locates the numa_nodes service.
23999 24000 24001 |
# File 'lib/ovirtsdk4/services.rb', line 23999 def numa_nodes_service return VmNumaNodesService.new(@connection, "#{@path}/numanodes") end |
- (AssignedPermissionsService) permissions_service
Locates the permissions service.
24007 24008 24009 |
# File 'lib/ovirtsdk4/services.rb', line 24007 def return AssignedPermissionsService.new(@connection, "#{@path}/permissions") end |
- (Object) preview_snapshot(opts = {})
Executes the preview_snapshot method.
23644 23645 23646 23647 23648 23649 23650 23651 23652 23653 23654 23655 23656 23657 23658 23659 23660 23661 23662 |
# File 'lib/ovirtsdk4/services.rb', line 23644 def preview_snapshot(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/previewsnapshot", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Object) reboot(opts = {})
Executes the reboot method.
23667 23668 23669 23670 23671 23672 23673 23674 23675 23676 23677 23678 23679 23680 23681 23682 23683 23684 23685 |
# File 'lib/ovirtsdk4/services.rb', line 23667 def reboot(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/reboot", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Object) remove(opts = {})
Deletes the object managed by this service.
23694 23695 23696 23697 23698 23699 23700 23701 23702 23703 23704 23705 23706 |
# File 'lib/ovirtsdk4/services.rb', line 23694 def remove(opts = {}) query = {} value = opts[:async] unless value.nil? value = Writer.render_boolean(value) query['async'] = value end request = Request.new(:method => :DELETE, :path => @path, :query => query) response = @connection.send(request) unless response.code == 200 check_fault(response) end end |
- (Object) reorder_mac_addresses(opts = {})
Executes the reorder_mac_addresses method.
23711 23712 23713 23714 23715 23716 23717 23718 23719 23720 23721 23722 23723 23724 23725 23726 23727 23728 23729 |
# File 'lib/ovirtsdk4/services.rb', line 23711 def reorder_mac_addresses(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/reordermacaddresses", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (VmReportedDevicesService) reported_devices_service
Locates the reported_devices service.
24015 24016 24017 |
# File 'lib/ovirtsdk4/services.rb', line 24015 def reported_devices_service return VmReportedDevicesService.new(@connection, "#{@path}/reporteddevices") end |
- (Service) service(path)
Locates the service corresponding to the given path.
24066 24067 24068 24069 24070 24071 24072 24073 24074 24075 24076 24077 24078 24079 24080 24081 24082 24083 24084 24085 24086 24087 24088 24089 24090 24091 24092 24093 24094 24095 24096 24097 24098 24099 24100 24101 24102 24103 24104 24105 24106 24107 24108 24109 24110 24111 24112 24113 24114 24115 24116 24117 24118 24119 24120 24121 24122 24123 24124 24125 24126 24127 24128 24129 24130 24131 24132 24133 24134 24135 24136 24137 24138 24139 24140 24141 24142 24143 24144 24145 24146 24147 24148 24149 24150 24151 24152 24153 24154 24155 24156 24157 24158 24159 24160 24161 24162 24163 24164 24165 24166 24167 24168 24169 24170 24171 24172 24173 |
# File 'lib/ovirtsdk4/services.rb', line 24066 def service(path) if path.nil? || path == '' return self end if path == 'affinitylabels' return affinity_labels_service end if path.start_with?('affinitylabels/') return affinity_labels_service.service(path[15..-1]) end if path == 'applications' return applications_service end if path.start_with?('applications/') return applications_service.service(path[13..-1]) end if path == 'cdroms' return cdroms_service end if path.start_with?('cdroms/') return cdroms_service.service(path[7..-1]) end if path == 'diskattachments' return end if path.start_with?('diskattachments/') return .service(path[16..-1]) end if path == 'disks' return disks_service end if path.start_with?('disks/') return disks_service.service(path[6..-1]) end if path == 'graphicsconsoles' return graphics_consoles_service end if path.start_with?('graphicsconsoles/') return graphics_consoles_service.service(path[17..-1]) end if path == 'hostdevices' return host_devices_service end if path.start_with?('hostdevices/') return host_devices_service.service(path[12..-1]) end if path == 'katelloerrata' return katello_errata_service end if path.start_with?('katelloerrata/') return katello_errata_service.service(path[14..-1]) end if path == 'nics' return nics_service end if path.start_with?('nics/') return nics_service.service(path[5..-1]) end if path == 'numanodes' return numa_nodes_service end if path.start_with?('numanodes/') return numa_nodes_service.service(path[10..-1]) end if path == 'permissions' return end if path.start_with?('permissions/') return .service(path[12..-1]) end if path == 'reporteddevices' return reported_devices_service end if path.start_with?('reporteddevices/') return reported_devices_service.service(path[16..-1]) end if path == 'sessions' return sessions_service end if path.start_with?('sessions/') return sessions_service.service(path[9..-1]) end if path == 'snapshots' return snapshots_service end if path.start_with?('snapshots/') return snapshots_service.service(path[10..-1]) end if path == 'statistics' return statistics_service end if path.start_with?('statistics/') return statistics_service.service(path[11..-1]) end if path == 'tags' return end if path.start_with?('tags/') return .service(path[5..-1]) end if path == 'watchdogs' return watchdogs_service end if path.start_with?('watchdogs/') return watchdogs_service.service(path[10..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
- (VmSessionsService) sessions_service
Locates the sessions service.
24023 24024 24025 |
# File 'lib/ovirtsdk4/services.rb', line 24023 def sessions_service return VmSessionsService.new(@connection, "#{@path}/sessions") end |
- (Object) shutdown(opts = {})
Executes the shutdown method.
23734 23735 23736 23737 23738 23739 23740 23741 23742 23743 23744 23745 23746 23747 23748 23749 23750 23751 23752 |
# File 'lib/ovirtsdk4/services.rb', line 23734 def shutdown(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/shutdown", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (SnapshotsService) snapshots_service
Locates the snapshots service.
24031 24032 24033 |
# File 'lib/ovirtsdk4/services.rb', line 24031 def snapshots_service return SnapshotsService.new(@connection, "#{@path}/snapshots") end |
- (Object) start(opts = {})
Executes the start method.
23757 23758 23759 23760 23761 23762 23763 23764 23765 23766 23767 23768 23769 23770 23771 23772 23773 23774 23775 |
# File 'lib/ovirtsdk4/services.rb', line 23757 def start(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/start", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (StatisticsService) statistics_service
Locates the statistics service.
24039 24040 24041 |
# File 'lib/ovirtsdk4/services.rb', line 24039 def statistics_service return StatisticsService.new(@connection, "#{@path}/statistics") end |
- (Object) stop(opts = {})
Executes the stop method.
23780 23781 23782 23783 23784 23785 23786 23787 23788 23789 23790 23791 23792 23793 23794 23795 23796 23797 23798 |
# File 'lib/ovirtsdk4/services.rb', line 23780 def stop(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/stop", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Object) suspend(opts = {})
Executes the suspend method.
23803 23804 23805 23806 23807 23808 23809 23810 23811 23812 23813 23814 23815 23816 23817 23818 23819 23820 23821 |
# File 'lib/ovirtsdk4/services.rb', line 23803 def suspend(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/suspend", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (AssignedTagsService) tags_service
Locates the tags service.
24047 24048 24049 |
# File 'lib/ovirtsdk4/services.rb', line 24047 def return AssignedTagsService.new(@connection, "#{@path}/tags") end |
- (Object) thaw_filesystems(opts = {})
Executes the thaw_filesystems method.
23826 23827 23828 23829 23830 23831 23832 23833 23834 23835 23836 23837 23838 23839 23840 23841 23842 23843 23844 |
# File 'lib/ovirtsdk4/services.rb', line 23826 def thaw_filesystems(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/thawfilesystems", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Object) ticket(opts = {})
Executes the ticket method.
23849 23850 23851 23852 23853 23854 23855 23856 23857 23858 23859 23860 23861 23862 23863 23864 23865 23866 23867 23868 |
# File 'lib/ovirtsdk4/services.rb', line 23849 def ticket(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/ticket", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) return action.ticket else check_fault(response) end end |
- (String) to_s
Returns an string representation of this service.
24180 24181 24182 |
# File 'lib/ovirtsdk4/services.rb', line 24180 def to_s return "#<#{VmService}:#{@path}>" end |
- (Object) undo_snapshot(opts = {})
Executes the undo_snapshot method.
23873 23874 23875 23876 23877 23878 23879 23880 23881 23882 23883 23884 23885 23886 23887 23888 23889 23890 23891 |
# File 'lib/ovirtsdk4/services.rb', line 23873 def undo_snapshot(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/undosnapshot", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Object) update(vm)
Updates the object managed by this service.
23896 23897 23898 23899 23900 23901 23902 23903 23904 23905 23906 23907 23908 23909 23910 23911 23912 23913 23914 23915 23916 23917 23918 23919 23920 23921 |
# File 'lib/ovirtsdk4/services.rb', line 23896 def update(vm) if vm.is_a?(Hash) vm = OvirtSDK4::Vm.new(vm) end request = Request.new(:method => :PUT, :path => @path) begin writer = XmlWriter.new(nil, true) VmWriter.write_one(vm, writer, 'vm') request.body = writer.string ensure writer.close end response = @connection.send(request) case response.code when 200 begin reader = XmlReader.new(response.body) return VmReader.read_one(reader) ensure reader.close end return result else check_fault(response) end end |
- (VmWatchdogsService) watchdogs_service
Locates the watchdogs service.
24055 24056 24057 |
# File 'lib/ovirtsdk4/services.rb', line 24055 def watchdogs_service return VmWatchdogsService.new(@connection, "#{@path}/watchdogs") end |