Class: OvirtSDK4::ExternalTemplateImportsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(import, opts = {}) ⇒ ExternalTemplateImport
This operation is used to import a template from external hypervisor.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(import, opts = {}) ⇒ ExternalTemplateImport
This operation is used to import a template from external hypervisor.
For example import of a template OVA can be facilitated using the following request:
POST /externaltemplateimports HTTP/1.1
With request body of type ExternalTemplateImport, for example:
<external_template_import>
<template>
<name>my_template</name>
</template>
<cluster id="2b18aca2-4469-11eb-9449-482ae35a5f83" />
<storage_domain id="8bb5ade5-e988-4000-8b93-dbfc6717fe50" />
<url>ova:///mnt/ova/ova_template.ova</url>
<host id="8bb5ade5-e988-4000-8b93-dbfc6717fe50" />
</external_template_import>
10191 10192 10193 |
# File 'lib/ovirtsdk4/services.rb', line 10191 def add(import, opts = {}) internal_add(import, ExternalTemplateImport, ADD, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
10202 10203 10204 10205 10206 10207 |
# File 'lib/ovirtsdk4/services.rb', line 10202 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |