Saggi Mizrahi has posted comments on this change.
Change subject: constants: unify the BLANK_UUID definition
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
I agree that code duplication is an issue but constants.py is not the answer.
Having a file names constants.py which is *system wide* no less is an encapsulation
nightmare and points out to a deeper problem.
The solution is putting BLANK_UUID = str(uuid.UUID(int=0))
at various places. If you use it only once you don't even need to declare it.
This means that you always use a correct 0 UUID
....................................................
File lib/vdsm/constants.py.in
Line 52: # future we might slice it (eg. tuple(DOMAIN_VERSION[1:]))
Line 53: SUPPORTED_DOMAIN_VERSIONS = DOMAIN_VERSIONS
Line 54:
Line 55: UUID_GLOB_PATTERN = '*-*-*-*-*'
Line 56: BLANK_UUID = '00000000-0000-0000-0000-000000000000'
We already moved it out of here.
constants.py is a mistake and we are (slowly) moving stuff *out* of it. *Don't* add
anything in.
Line 57:
Line 58: MEGAB = 2 ** 20 # = 1024 ** 2 = 1 MiB
Line 59:
Line 60: #
--
To view, visit
http://gerrit.ovirt.org/15442
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9260d74ae1da1382394a375843b2edff112e6f7
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Alissa Bonas <abonas(a)redhat.com>
Gerrit-Reviewer: Better Saggi <bettersaggi(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: humble devassy <hchiramm(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes