Yair Zaslavsky has posted comments on this change.

Change subject: core : Add Entity API for CoCo commands
......................................................................


Patch Set 2:

(2 comments)

I wonder how much this API will be used, and if this cannot be automated 
somehow.
Some ideas -
Create a dynamic proxy that intercepts DAO methods and for parameters that are 
instance of businessentities, record them in the command_assoc_entities table, 
with the given command id.
The disadvantage here is that this mechanism might be error prawn, and you 
might need to provide another hint on the DAOs, or maybe for each command 
provide a list of DAO methods that participate in the API. Still, I think it's 
worth thinking.

http://gerrit.ovirt.org/#/c/37463/2/packaging/dbscripts/command_entities_sp.sql
File packaging/dbscripts/command_entities_sp.sql:

Line 162:       command_id NOT IN(SELECT command_id FROM async_tasks);
Line 163: END; $procedure$
Line 164: LANGUAGE plpgsql;
Line 165: 
Line 166: Create or replace FUNCTION InsertCoCoCmdEntities(
See my other comment regarding table names.
Line 167:         v_command_id UUID,
Line 168:         v_entity_id UUID,
Line 169:         v_entity_type varchar(128))
Line 170: 


http://gerrit.ovirt.org/#/c/37463/2/packaging/dbscripts/upgrade/03_06_0890_add_coco_cmd_entities_table.sql
File packaging/dbscripts/upgrade/03_06_0890_add_coco_cmd_entities_table.sql:

Line 3:     entity_id uuid NOT NULL,
Line 4:     entity_type character varying(128)
Line 5: );
Line 6: 
Line 7: SELECT fn_db_create_constraint('coco_cmd_entities', 
'fk_coco_cmd_entity', 'FOREIGN KEY (command_id) REFERENCES 
command_entities(command_id) ON DELETE CASCADE');
Maybe "command_assoc_entities" ?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I96b934ffc44f87407df77c8e097164ca30f3a6e6
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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