Dan Kenigsberg has posted comments on this change.
Change subject: Define some constants in API.py
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(1 inline comment)
....................................................
File vdsm/API.py
Line 607: SHARED = 6
I understand why the Binding should not import vdsm internals. But I do not see how API.py
can get away without having these imports.
Here, you assume that API.Volume.Roles.SHARED == storage.volume.SHARED_VOL but this is
enforced only by hard-coding "6" for both enumerations, twice.
I do not fancy that. You can set
API.Volume.Roles.SHARED = storage.volume.SHARED_VOL
or have a completely different value there - but have an explicit conversion to the
internal value when you pass it to the internal function.
--
To view, visit
http://gerrit.ovirt.org/2262
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaef19f956ec1d6f83fd48e71a2f0a018505266be
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>