Moti Asayag has posted comments on this change.

Change subject: core: macPool per DC, db changes
......................................................................


Patch Set 33:

(2 comments)

http://gerrit.ovirt.org/#/c/26795/33/packaging/dbscripts/upgrade/03_05_0720_add_mac_pool_ranges_to_storage_pool.sql
File 
packaging/dbscripts/upgrade/03_05_0720_add_mac_pool_ranges_to_storage_pool.sql:

Line 21:                       name,
Line 22:                       allow_duplicate_mac_addresses,
Line 23:                       description,
Line 24:                       default_pool)
Line 25: SELECT uuid_generate_v1(),
you can store uuid_generate_v1() into a local variable and reuse it when is 
needed instead of fetching it from the db each time.
Line 26:        'Default',
Line 27:        (SELECT option_value :: BOOLEAN
Line 28:         FROM   vdc_options
Line 29:         WHERE  option_name = 'AllowDuplicateMacAddresses'),


Line 34: INSERT INTO mac_pool_ranges (mac_pool_id,
Line 35:                        from_mac,
Line 36:                        to_mac)
Line 37: SELECT (SELECT id FROM mac_pools),
Line 38:        mac_range[1],
> I accept that this shouldn't be handled since a space wouldn't work anyway 
+1, the mac pool range should have been validated when it was inserted into the 
db, therefore we should consider that value as a valid one.

We also have MacAddressPoolRangesValueHelperTest which fails when a space 
character appears anywhere.

The only downside is the fact that the validator for mac pool ranges was 
introduced in ovirt-engine-3.3 iirc (or 3.4).

anyway i think it is sane to presume this value is valid.
Line 39:        mac_range[2]
Line 40: FROM (SELECT   string_to_array(unnest(string_to_array(option_value, 
',')),'-') as mac_range
Line 41:         FROM   vdc_options
Line 42:         WHERE  option_name = 'MacPoolRanges') as mac_ranges;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id30f3c384ecf933daaacdbdd6542e88afb98f7ca
Gerrit-PatchSet: 33
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@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