Ori Liel has posted comments on this change.

Change subject: restapi: LunStatus Enum and CreateVG force flag
......................................................................


Patch Set 2: (6 inline comments)

....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata_v-3.1.yaml
Line 639:         optionalArguments: {storagdomain.force: 'xs:boolean'}
right now now in sync with there you added 'force', which is in LogicalUnit, 
but I think adding force in LogicalUnit is not the best approach anyway, as you 
don't want to decide for each lun whether to force or not, but rather decide 
once for all luns (that's the requirement). I think the best way would be to 
add a level: LogicalUnits object under Storage and add force to it. (take 
example from VM Custom-properties)

....................................................
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/StorageLogicalUnitMapper.java
Line 39:             model.setStatus(entity.getStatus().name());
you first need to map the Backend enum value to the equivalent Rest-API enum 
value, then .value()

Line 94:     }
This should map not to String, but rather to the equivalent rest enum

....................................................
File 
backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/StorageLogicalUnitMapperTest.java
Line 58:         assertEquals(entity.getStatus(), LunStatus.Free.name());
use .value() instead of .name()

Line 62:    public void storageDomainMappings() {
rename to testStorageDomainMappings

Line 67:        assertEquals(LunStatus.Unusable.name(), 
StorageLogicalUnitMapper.map(org.ovirt.engine.core.common
modify test according to changes in mapper (mapping between enums, not 
enum-to-string).

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I97615bf04c40f580d56352cb022530b5a0043192
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com>
Gerrit-Reviewer: Ori Liel <ol...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to