use of org.ovirt.engine.api.model.Role in project ovirt-engine by oVirt.
the class BackendEntityAssignedPermissionsResourceTest method getModel.
@Override
protected Permission getModel() {
Permission model = new Permission();
model.setUser(new User());
model.getUser().setId(GUIDS[1].toString());
model.setRole(new Role());
model.getRole().setId(GUIDS[3].toString());
return model;
}
use of org.ovirt.engine.api.model.Role in project ovirt-engine by oVirt.
the class BackendGroupAssignedPermissionsResourceTest method getModel.
@Override
protected Permission getModel() {
Permission model = new Permission();
model.setDataCenter(new DataCenter());
model.getDataCenter().setId(GUIDS[2].toString());
model.setRole(new Role());
model.getRole().setId(GUIDS[3].toString());
return model;
}
use of org.ovirt.engine.api.model.Role in project ovirt-engine by oVirt.
the class BackendGroupAssignedPermissionsResourceTest method testAddIncompletePermission.
@Test
public void testAddIncompletePermission() throws Exception {
Permission model = new Permission();
model.setGroup(new Group());
model.getGroup().setId(GUIDS[1].toString());
model.setRole(new Role());
model.getRole().setId(GUIDS[3].toString());
setUriInfo(setUpBasicUriExpectations());
try {
collection.add(model);
} catch (WebApplicationException wae) {
verifyIncompleteException(wae, "Permission", "add", "dataCenter|cluster|host|storageDomain|vm|vmPool|template.id");
}
}
use of org.ovirt.engine.api.model.Role in project ovirt-engine by oVirt.
the class BackendUserAssignedPermissionsResourceTest method getModel.
@Override
protected Permission getModel() {
Permission model = new Permission();
model.setDataCenter(new DataCenter());
model.getDataCenter().setId(GUIDS[2].toString());
model.setRole(new Role());
model.getRole().setId(GUIDS[3].toString());
return model;
}
use of org.ovirt.engine.api.model.Role in project ovirt-engine by oVirt.
the class BackendRoleResourceTest method getModel.
private Role getModel() {
Role role = new Role();
role.setName(NAMES[0]);
return role;
}
Aggregations