Red Hat Bugzilla – Bug 859233
ovirt-engine-restapi : two permissions has the same permit ID
Last modified: 2016-02-10 14:12:28 EST
Description of problem:
two permissions contain the same permit ID :
Version-Release number of selected component (if applicable):
Steps to Reproduce:
oved/yair - maybe also add a unitest to check no duplicate permits in the enum?
(i'd add this unitest to run on all enums actually!)
this will require a release note, since we won't handle upgrade on this...
The problem is in the restapi side, and not backend side.
There is a PermitType enum in the restapi-definition project, and the permit ID there for the port mirroring is wrong.
Movig the bug to restapi component.
why would we maintain these numbers manually in the code?
leftover from 2.3, enum member's id should be inherited from the BE
enum, and not being specified in the client side decorating enum,
Oved, please remove id from the org.ovirt.engine.api.model.PermitType
and inject it in the PermitMapper according to the ActionGroup,
<permit id="1104"><name>delete_disk</name><administrative>false</administrative></permit><permit id="1200"><name>port_mirroring</name><administrative>true</administrative></permit>
The ID's are different now