Ori Liel has posted comments on this change.

Change subject: REST: add activate/deactivate actions to vm nic
......................................................................


Patch Set 2: (5 inline comments)

....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/NicResource.java
Line 51: }
NicResource interface is implemented by both BackendVmNicResource and 
BackendTemplateNicResource. So  by adding the signatures here (and the 
implementation to BackendNicResource), you have essentially enabled 
attach/detach of nic on both Template and VM. Was it your intention to add this 
behavior to template nic as well?

....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata_v-3.1.yaml
Line 301:       signatures: []
For actions, parameter-type is always the object: 'Action' (not null)

Line 306:       parameterType: null
again, parameter type should be Action

....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
Line 127:         return inject(new BackendVmNicsResource(guid));
must make sure RSDL works with this

....................................................
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/NicMapper.java
Line 38:         }
This is a status field. It should not be mapped from REST-API to Backend. The 
way that the user changes this status is by running activate/deactivate action. 
So please remove this mapping.

The mapping in the other direction is ok (REST-API should show the status, so 
the status should be mapped from Backend --> REST)

--
To view, visit http://gerrit.ovirt.org/3206
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie38f648bf2a13e2e8b2e9a1283a40f27bcb34425
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Ori Liel <ol...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to