use of org.ovirt.engine.api.model.Option in project ovirt-engine by oVirt.
the class BackendGlusterVolumeResourceTest method testResetOption.
@Test
public void testResetOption() throws Exception {
setupParentExpectations();
resource.setParent(volumesResourceMock);
setUriInfo(setUpActionExpectations(ActionType.ResetGlusterVolumeOptions, ResetGlusterVolumeOptionsParameters.class, new String[] { "VolumeId" }, new Object[] { GUIDS[0] }));
Action action = new Action();
action.setOption(new Option());
action.getOption().setName("auth.allow");
verifyActionResponse(resource.resetOption(action));
}
use of org.ovirt.engine.api.model.Option in project ovirt-engine by oVirt.
the class BackendGlusterVolumeResource method setOption.
@Override
public Response setOption(Action action) {
Option option = action.getOption();
validateParameters(option, "name", "value");
return doAction(ActionType.SetGlusterVolumeOption, new GlusterVolumeOptionParameters(new GlusterVolumeOptionEntity(guid, option.getName(), option.getValue())), action);
}
use of org.ovirt.engine.api.model.Option in project ovirt-engine by oVirt.
the class HostMapper method map.
@Mapping(from = Map.Entry.class, to = Option.class)
public static Option map(Map.Entry<String, String> entity, Option template) {
Option model = template != null ? template : new Option();
model.setName(entity.getKey());
model.setValue(entity.getValue());
return model;
}
Aggregations