Daniel Erez has posted comments on this change.

Change subject: restapi: openstack_volume_type on Disk entity
......................................................................


Patch Set 2:

(3 comments)

https://gerrit.ovirt.org/#/c/41966/2/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml:

Line 605:           disk.wipe_after_delete: xs:boolean
Line 606:           disk.quota.id: xs:string
Line 607:           disk.disk_profile.id: xs:string
Line 608:           disk.storage_domains.storage_domain--COLLECTION: 
{storage_domain.id|name: 'xs:string'}
Line 609:           disk.openstack_volume_type: xs:string
> Should be "disk.openstack_volume_type.name".
yeah, already fixed those in patch-set 3 :)
Line 610:         description: add a new disk to the virtual machine allocating 
space from the storage domain
Line 611:         #the signature below is for direct-LUN disk, which doesn't 
require size, but requires the lun id, the lun type, and the lun 
connection-details.
Line 612:       - mandatoryArguments: {disk.interface: 'xs:string', 
disk.lun_storage.type: 'xs:string',
Line 613:           disk.lun_storage.logical_unit--COLLECTION: 
{logical_unit.id: 'xs:string', logical_unit.address: 'xs:string', 
logical_unit.port: 'xs:int', logical_unit.target: 'xs:string'}}


https://gerrit.ovirt.org/#/c/41966/2/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/DiskMapper.java
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/DiskMapper.java:

Line 161:         if (disk.isSetDiskProfile() && 
disk.getDiskProfile().isSetId()) {
Line 162:             
diskImage.setDiskProfileId(GuidUtils.asGuid(disk.getDiskProfile().getId()));
Line 163:         }
Line 164:         if (disk.isSetOpenstackVolumeType()) {
Line 165:             
diskImage.setCinderVolumeType(disk.getOpenstackVolumeType().getName());
> This should check if "name" has a value before calling "getName". If no nam
Done
Line 166:         }
Line 167:     }
Line 168: 
Line 169:     @Mapping(from = 
org.ovirt.engine.core.common.businessentities.storage.Disk.class, to = 
Disk.class)


Line 240:             DiskProfile diskProfile = new DiskProfile();
Line 241:             diskProfile.setId(entity.getDiskProfileId().toString());
Line 242:             model.setDiskProfile(diskProfile);
Line 243:         }
Line 244:         if (entity.getCinderVolumeType() != null) {
> The "openstack_volume_type" element my have already been populated, and thi
Done
Line 245:             OpenStackVolumeType volumeType = new 
OpenStackVolumeType();
Line 246:             volumeType.setName(entity.getCinderVolumeType());
Line 247:             model.setOpenstackVolumeType(volumeType);
Line 248:         }


-- 
To view, visit https://gerrit.ovirt.org/41966
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I952c431b8f7e7d0508855892b518c43bef9c7b7f
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: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to