use of org.ovirt.engine.core.common.queries.GetVmTemplateParameters in project ovirt-engine by oVirt.
the class BackendTemplateCdromResource method get.
@Override
public Cdrom get() {
GetVmTemplateParameters parameters = new GetVmTemplateParameters(templateId);
VmTemplate entity = getEntity(VmTemplate.class, QueryType.GetVmTemplate, parameters, templateId.toString(), true);
return addLinks(populate(map(entity), entity));
}
use of org.ovirt.engine.core.common.queries.GetVmTemplateParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getVmTemplatesByBaseTemplateId.
public void getVmTemplatesByBaseTemplateId(AsyncQuery<List<VmTemplate>> asyncQuery, Guid baseTemplate) {
asyncQuery.converterCallback = new ListConverter<>();
Frontend.getInstance().runQuery(QueryType.GetVmTemplatesByBaseTemplateId, new GetVmTemplateParameters(baseTemplate), asyncQuery);
}
use of org.ovirt.engine.core.common.queries.GetVmTemplateParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getTemplateById.
public void getTemplateById(AsyncQuery<VmTemplate> aQuery, Guid templateId) {
aQuery.converterCallback = new CastingConverter<>();
Frontend.getInstance().runQuery(QueryType.GetVmTemplate, new GetVmTemplateParameters(templateId), aQuery);
}
use of org.ovirt.engine.core.common.queries.GetVmTemplateParameters in project ovirt-engine by oVirt.
the class BackendVmPoolsResource method loadInstanceType.
private org.ovirt.engine.core.common.businessentities.InstanceType loadInstanceType(VmPool pool) {
validateParameters(pool.getInstanceType(), "id|name");
GetVmTemplateParameters params;
String identifier;
InstanceType instanceType = pool.getInstanceType();
if (instanceType.isSetId()) {
params = new GetVmTemplateParameters(asGuid(instanceType.getId()));
identifier = "InstanceType: id=" + instanceType.getId();
} else {
params = new GetVmTemplateParameters(instanceType.getName());
identifier = "InstanceType: name=" + instanceType.getName();
}
return getEntity(VmTemplate.class, QueryType.GetInstanceType, params, identifier);
}
use of org.ovirt.engine.core.common.queries.GetVmTemplateParameters in project ovirt-engine by oVirt.
the class BackendVmPoolsResource method getVmTemplate.
protected VmTemplate getVmTemplate(VmPool pool) {
if (pool.getTemplate().isSetId()) {
return getEntity(VmTemplate.class, QueryType.GetVmTemplate, new GetVmTemplateParameters(asGuid(pool.getTemplate().getId())), pool.getTemplate().getId());
} else {
GetVmTemplateParameters params = new GetVmTemplateParameters(pool.getTemplate().getName());
params.setClusterId(asGuid(pool.getCluster().getId()));
return getEntity(VmTemplate.class, QueryType.GetVmTemplate, params, "Template: name=" + pool.getTemplate().getName());
}
}
Aggregations