Omer Frenkel has posted comments on this change.

Change subject: engine: Enable read of current CD via REST
......................................................................


Patch Set 5:

(3 comments)

http://gerrit.ovirt.org/#/c/20368/5/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCdRomResource.java
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCdRomResource.java:

Line 51:             // if the CD has changed during the run of VM
Line 52:             if (vm.getCurrentCd() != null) {
Line 53:                 // change the iso path so the result of 'map' will 
contain current cd instead of the
Line 54:                 // persistent configuration
Line 55:                 vm.setIsoPath(vm.getCurrentCd());
but when the vm will be down this will change again, right?
wouldn't it be better to have it in a new field? so user would know what cd is 
in the configuration and what is the current?
Line 56:             }
Line 57:             return addLinks(populate(map(vm), vm));
Line 58:         } else {
Line 59:             return super.get();


http://gerrit.ovirt.org/#/c/20368/5/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java:

Line 258:             vm.setLastWatchdogAction(action);
Line 259:         }
Line 260: 
Line 261:         if (xmlRpcStruct.containsKey(VdsProperties.CDRom)) {
Line 262:             String isoName = Paths.get((String) 
xmlRpcStruct.get(VdsProperties.CDRom)).getFileName().toString();
why using paths? isnt this just the iso name?
Line 263:             vm.setCurrentCd(isoName);
Line 264:         } else {
Line 265:             vm.setCurrentCd(null);
Line 266:         }


http://gerrit.ovirt.org/#/c/20368/5/packaging/dbscripts/create_views.sql
File packaging/dbscripts/create_views.sql:

Line 617: WHERE vm_static.entity_type = 'VM';
Line 618: 
Line 619: 
Line 620: 
Line 621: CREATE OR REPLACE VIEW vms_with_tags
please add to this view also
Line 622: AS
Line 623: SELECT      vms.vm_name, vms.vm_mem_size_mb, vms.nice_level, 
vms.cpu_shares, vms.vmt_guid, vms.vm_os, vms.vm_description, vms.vm_comment,
Line 624:             vms.vds_group_id, vms.vm_domain, vms.vm_creation_date, 
vms.auto_startup, vms.is_stateless, vms.is_smartcard_enabled, 
vms.is_delete_protected,
Line 625:             vms.sso_method, vms.dedicated_vm_for_vds, vms.fail_back, 
vms.default_boot_sequence, vms.vm_type,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifd6c80984143b7d953b6d76b9863465aabce0917
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mishka8...@yahoo.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to