Class: OvirtSDK4::ImageService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ Image
Returns the representation of the object managed by this service.
-
#import(opts = {}) ⇒ Object
Imports an image.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ Image
Returns the representation of the object managed by this service.
13009 13010 13011 |
# File 'lib/ovirtsdk4/services.rb', line 13009 def get(opts = {}) internal_get(GET, opts) end |
#import(opts = {}) ⇒ Object
Imports an image.
If the import_as_template parameter is true then the image will be imported as a template, otherwise it will
be imported as a disk.
When imported as a template, the name of the template can be specified by the optional template.name
parameter. If that parameter is not specified, then the name of the template will be automatically assigned by the
engine as GlanceTemplate-x (where x will be seven random hexadecimal characters).
When imported as a disk, the name of the disk can be specified by the optional disk.name parameter. If
that parameter is not specified, then the name of the disk will be automatically assigned by the engine as
GlanceDisk-x (where x will be the seven hexadecimal characters of the image identifier).
It is recommended to always explicitly specify the template or disk name, to avoid these automatic names generated by the engine.
13066 13067 13068 |
# File 'lib/ovirtsdk4/services.rb', line 13066 def import(opts = {}) internal_action(:import, nil, IMPORT, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
13077 13078 13079 13080 13081 13082 |
# File 'lib/ovirtsdk4/services.rb', line 13077 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |