Search in sources :

Example 31 with Template

use of org.ovirt.engine.api.model.Template in project ovirt-engine by oVirt.

the class BackendTemplateNicResource method addParents.

@Override
protected Nic addParents(Nic nic) {
    Template template = new Template();
    template.setId(templateId.toString());
    nic.setTemplate(template);
    return nic;
}
Also used : Template(org.ovirt.engine.api.model.Template)

Example 32 with Template

use of org.ovirt.engine.api.model.Template in project ovirt-engine by oVirt.

the class BackendTemplateNicsResource method addParents.

@Override
public Nic addParents(Nic nic) {
    Template template = new Template();
    template.setId(templateId.toString());
    nic.setTemplate(template);
    return nic;
}
Also used : Template(org.ovirt.engine.api.model.Template)

Example 33 with Template

use of org.ovirt.engine.api.model.Template in project ovirt-engine by oVirt.

the class BackendTemplateResource method update.

@Override
public Template update(Template incoming) {
    validateIconParams(incoming);
    Template result = performUpdate(incoming, new QueryIdResolver<>(QueryType.GetVmTemplate, GetVmTemplateParameters.class), ActionType.UpdateVmTemplate, new UpdateParametersProvider());
    if (result != null) {
        DisplayHelper.adjustDisplayData(this, result);
    }
    return result;
}
Also used : GetVmTemplateParameters(org.ovirt.engine.core.common.queries.GetVmTemplateParameters) Template(org.ovirt.engine.api.model.Template) VmTemplate(org.ovirt.engine.core.common.businessentities.VmTemplate)

Example 34 with Template

use of org.ovirt.engine.api.model.Template in project ovirt-engine by oVirt.

the class BackendTemplateTagResource method addParents.

@Override
protected Tag addParents(Tag tag) {
    Template template = new Template();
    template.setId(templateId.toString());
    tag.setTemplate(template);
    return tag;
}
Also used : Template(org.ovirt.engine.api.model.Template)

Example 35 with Template

use of org.ovirt.engine.api.model.Template in project ovirt-engine by oVirt.

the class BackendTemplateWatchdogsResource method addParents.

@Override
public Watchdog addParents(Watchdog watchdog) {
    Template template = new Template();
    template.setId(templateId.toString());
    watchdog.setTemplate(template);
    return watchdog;
}
Also used : Template(org.ovirt.engine.api.model.Template)

Aggregations

Template (org.ovirt.engine.api.model.Template)57 VmTemplate (org.ovirt.engine.core.common.businessentities.VmTemplate)32 Test (org.junit.Test)21 Response (javax.ws.rs.core.Response)16 AsyncTaskStatus (org.ovirt.engine.core.common.businessentities.AsyncTaskStatus)12 Vm (org.ovirt.engine.api.model.Vm)11 WebApplicationException (javax.ws.rs.WebApplicationException)6 VmPool (org.ovirt.engine.api.model.VmPool)4 Cluster (org.ovirt.engine.api.model.Cluster)3 InstanceType (org.ovirt.engine.api.model.InstanceType)3 TimeZone (org.ovirt.engine.api.model.TimeZone)3 GetVmTemplateParameters (org.ovirt.engine.core.common.queries.GetVmTemplateParameters)3 ArrayList (java.util.ArrayList)2 Boot (org.ovirt.engine.api.model.Boot)2 Host (org.ovirt.engine.api.model.Host)2 OperatingSystem (org.ovirt.engine.api.model.OperatingSystem)2 StorageDomain (org.ovirt.engine.api.model.StorageDomain)2 Tag (org.ovirt.engine.api.model.Tag)2 TemplateVersion (org.ovirt.engine.api.model.TemplateVersion)2 Templates (org.ovirt.engine.api.model.Templates)2