Laszlo Hornyak has posted comments on this change.
Change subject: engine: fix add watchdog
......................................................................
Patch Set 1: (4 inline comments)
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/TemplateResource.java
Line 59: @Path("permissions")
Line 60: public AssignedPermissionsResource getPermissionsResource();
Line 61:
Line 62: @Path("watchdogs")
Line 63: public DevicesResource<WatchDog, WatchDogs> getWatchdogsResource();
Some collections need extra methods, after some cleanup the watchdog collection
did not need any, so I removed the interface for the collection
Line 64:
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/VmResource.java
Line 116: @Path("cdroms")
Line 117: public DevicesResource<CdRom, CdRoms> getCdRomsResource();
Line 118:
Line 119: @Path("watchdogs")
Line 120: public DevicesResource<WatchDog, WatchDogs>
getWatchdogsResource();
I followed the pattern in [1]
[1] DevicesResource<CdRom, CdRoms> getCdRomsResource()
Line 121:
Line 122: @Path("disks")
Line 123: public VmDisksResource getDisksResource();
Line 124:
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendWatchdogsResource.java
Line 60: return new String[] {};
Line 61: }
Line 62:
Line 63: @Override
Line 64: protected VdcActionParametersBase getAddParameters(VmWatchdog
entity, WatchDog device) {
Done
Line 65: WatchdogParameters watchdogParameters = new
WatchdogParameters();
Line 66: watchdogParameters.setAction(getMapper(WatchdogAction.class,
VmWatchdogAction.class).map(WatchdogAction.valueOf(StringUtils.upperCase(device.getAction())),
Line 67: null));
Line 68: watchdogParameters.setModel(getMapper(WatchdogModel.class,
VmWatchdogType.class).map(WatchdogModel.valueOf(StringUtils.upperCase(device.getModel())),
Line 65: WatchdogParameters watchdogParameters = new
WatchdogParameters();
Line 66: watchdogParameters.setAction(getMapper(WatchdogAction.class,
VmWatchdogAction.class).map(WatchdogAction.valueOf(StringUtils.upperCase(device.getAction())),
Line 67: null));
Line 68: watchdogParameters.setModel(getMapper(WatchdogModel.class,
VmWatchdogType.class).map(WatchdogModel.valueOf(StringUtils.upperCase(device.getModel())),
Line 69: null));
It is calling getMapper(..).map(..) so what is the way you want it to invoke
the mapper?
Line 70: watchdogParameters.setId(parentId);
Line 71: watchdogParameters.setVm(isVm(parentId));
Line 72: return watchdogParameters;
Line 73: }
--
To view, visit http://gerrit.ovirt.org/17434
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I95362fda69b8ec7c02893ba30cdf19be7eee5eac
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches