Martin Betak has posted comments on this change.

Change subject: dal: Add HostDev passthrough support #2
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/38480/1/packaging/dbscripts/host_device_sp.sql
File packaging/dbscripts/host_device_sp.sql:

Line 154: BEGIN
Line 155:   UPDATE host_device
Line 156:   SET vm_id = v_vm_id
Line 157:   WHERE device_name IN (SELECT device
Line 158:                         FROM vm_device
> Maybe better to pass the type as a parameter to the SP ?
The issue is this logic is specific to 'hostdev' type of devices and cannot be 
used with other types of devices. This is part of the reason I put this logic 
into host_device_sp.sql instead of vm_device_sp.sql.
Line 159:                         WHERE vm_id = v_vm_id AND type = 'hostdev');
Line 160: END; $procedure$
Line 161: LANGUAGE plpgsql;
Line 162: 


https://gerrit.ovirt.org/#/c/38480/1/packaging/dbscripts/vm_device_sp.sql
File packaging/dbscripts/vm_device_sp.sql:

Line 155: AS $procedure$
Line 156: BEGIN
Line 157:     DELETE
Line 158:     FROM   vm_device
Line 159:     WHERE  vm_id = v_vm_id AND type = v_type;
> Here it is good, the type is passed as a parameter and is not a constant st
Yes, this is general purpose method that can be reused to other vm_device 
types. But the other methods are specific to host device handling.
Line 160: END; $procedure$
Line 161: LANGUAGE plpgsql;
Line 162: 
Line 163: Create or replace FUNCTION GetAllFromVmDevice() RETURNS SETOF 
vm_device_view STABLE


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I000c54776b4c3f8dc78608481b5700a895c3d478
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Martin Betak <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to