Eli Mesika has posted comments on this change.

Change subject: core: Configurable Default for Wipe After Delete per Storage 
Domain
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.ovirt.org/#/c/35909/3/packaging/dbscripts/upgrade/03_06_0590_add_wipe_after_delete_to_storage_domain_static.sql
File 
packaging/dbscripts/upgrade/03_06_0590_add_wipe_after_delete_to_storage_domain_static.sql:

Line 5: 
Line 6:   begin
Line 7:     v_table = 'storage_domain_static';
Line 8:     v_column = 'wipe_after_delete';
Line 9:     if (not exists (SELECT  1
This check is already done inside fn_db_add_column , the function skips the 
addition if already exists
Line 10:                     FROM    information_schema.columns
Line 11:                     WHERE   table_name = v_table AND
Line 12:                             column_name = v_column)) then
Line 13:       -- The wipe_after_delete column does not exist.


Line 26: 
Line 27: SELECT add_wipe_after_delete_to_storage_domain_static();
Line 28: 
Line 29: DROP FUNCTION add_wipe_after_delete_to_storage_domain_static();
Line 30
all can be replaced with (and no need SP) :


fn_db_add_column( 'storage_domain_static', 'wipe_after_delete', 'boolean NOT 
NULL DEFAULT false');

      UPDATE  storage_domain_static
      SET     wipe_after_delete = true
      FROM    vdc_options
      WHERE   vdc_options.option_name = 'SANWipeAfterDelete' AND
              vdc_options.version = 'general' AND
              vdc_options.option_value = 'true' AND
              storage_domain_static.storage_type IN (2, 3); -- 2 and 3 are the 
only storage types which are block domains.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4e0d5a1c9158be1284ffe05d1bf1397c9113f6c0
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ish...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Idan Shaby <ish...@redhat.com>
Gerrit-Reviewer: Ori Liel <ol...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@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