use of org.ovirt.engine.api.v3.types.V3Permissions in project ovirt-engine by oVirt.
the class V3TemplatesServer method add.
@POST
@Consumes({ "application/xml", "application/json" })
public Response add(V3Template template) {
// cloned, but in V4 this element has been removed and replaced by a "clone_permissions" parameter:
if (template.isSetPermissions()) {
V3Permissions permissions = template.getPermissions();
if (permissions.isSetClone() && permissions.isClone()) {
Map<String, String> parameters = CurrentManager.get().getParameters();
parameters.put("clone_permissions", String.valueOf(true));
}
}
Response response = adaptAdd(getDelegate()::add, template);
V3TemplateHelper.addDisksLink(response);
return response;
}
Aggregations