Class TemplatesServiceImpl
- java.lang.Object
-
- org.ovirt.engine.sdk4.internal.services.ServiceImpl
-
- org.ovirt.engine.sdk4.internal.services.TemplatesServiceImpl
-
- All Implemented Interfaces:
Service
,TemplatesService
public class TemplatesServiceImpl extends ServiceImpl implements TemplatesService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ovirt.engine.sdk4.services.TemplatesService
TemplatesService.AddFromConfigurationRequest, TemplatesService.AddFromConfigurationResponse, TemplatesService.AddFromVmRequest, TemplatesService.AddFromVmResponse, TemplatesService.AddFromVmSnapshotRequest, TemplatesService.AddFromVmSnapshotResponse, TemplatesService.AddRequest, TemplatesService.AddResponse, TemplatesService.ListRequest, TemplatesService.ListResponse
-
-
Constructor Summary
Constructors Constructor Description TemplatesServiceImpl(HttpConnection connection, String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TemplatesService.AddRequest
add()
Creates a new template.TemplatesService.AddFromConfigurationRequest
addFromConfiguration()
Add a virtual machine template to the system from a configuration.TemplatesService.AddFromVmRequest
addFromVm()
Add a virtual machine template to the system from an existing virtual machine.TemplatesService.AddFromVmSnapshotRequest
addFromVmSnapshot()
Add a virtual machine template to the system from a snapshot.TemplatesService.ListRequest
list()
Returns the list of virtual machine templates.Service
service(String path)
Service locator method, returns individual service on which the URI is dispatched.TemplateService
templateService(String id)
Returns a reference to the service that manages a specific virtual machine template.String
toString()
-
Methods inherited from class org.ovirt.engine.sdk4.internal.services.ServiceImpl
checkAction, checkFault, getConnection, getPath, throwError
-
-
-
-
Constructor Detail
-
TemplatesServiceImpl
public TemplatesServiceImpl(HttpConnection connection, String path)
-
-
Method Detail
-
add
public TemplatesService.AddRequest add()
Description copied from interface:TemplatesService
Creates a new template. This requires the `name` and `vm` elements. To identify the virtual machine use the `vm.id` or `vm.name` attributes. For example, to create a template from a virtual machine with the identifier `123` send a request like this: [source] ---- POST /ovirt-engine/api/templates ---- With a request body like this: [source,xml] ----mytemplate ---- Since version 4.3, in order to create virtual machine template from a snapshot send a request body like this: [source,xml] ---- mytemplate > and make it < >, send a request body like this: [source,xml] ---- mytemplate mydisk cow true mytemplate mytemplate_001 mytemplate cow true mytemplate cow true - Specified by:
add
in interfaceTemplatesService
-
addFromConfiguration
public TemplatesService.AddFromConfigurationRequest addFromConfiguration()
Description copied from interface:TemplatesService
Add a virtual machine template to the system from a configuration. Requires the configuration type, the configuration data, and the target cluster.- Specified by:
addFromConfiguration
in interfaceTemplatesService
-
addFromVm
public TemplatesService.AddFromVmRequest addFromVm()
Description copied from interface:TemplatesService
Add a virtual machine template to the system from an existing virtual machine.- Specified by:
addFromVm
in interfaceTemplatesService
-
addFromVmSnapshot
public TemplatesService.AddFromVmSnapshotRequest addFromVmSnapshot()
Description copied from interface:TemplatesService
Add a virtual machine template to the system from a snapshot.- Specified by:
addFromVmSnapshot
in interfaceTemplatesService
-
list
public TemplatesService.ListRequest list()
Description copied from interface:TemplatesService
Returns the list of virtual machine templates. For example: [source] ---- GET /ovirt-engine/api/templates ---- Will return the list of virtual machines and virtual machine templates. The order of the returned list of templates is not guaranteed.- Specified by:
list
in interfaceTemplatesService
-
templateService
public TemplateService templateService(String id)
Description copied from interface:TemplatesService
Returns a reference to the service that manages a specific virtual machine template.- Specified by:
templateService
in interfaceTemplatesService
-
service
public Service service(String path)
Description copied from interface:TemplatesService
Service locator method, returns individual service on which the URI is dispatched.- Specified by:
service
in interfaceTemplatesService
-
-