Saggi Mizrahi has posted comments on this change.
Change subject: Refactor storage connection subsystem
......................................................................
Patch Set 1: (13 inline comments)
....................................................
File vdsm/storage/connectionMonitor.py
Line 137: nonHierarchical = True
I think so too but this is how they declare it in the python URI module.
Line 142: localPathBase = "/tmp"
It's a default. You can change is with setLocaPathBase() It is changed on HSM init.
Line 190: if self._mount.isMounted():
No reason. It doesn't really matter
Line 220: DEFAULT_OPTIONS = ["soft", "nosharecache",
"vers=3"]
Yea, I kinda did both patches at the same time. I need to remove this.
Line 245: pass
The point is that uri.port is a property and can throw a Value Error. I missed the fact
that I throw one as well. I will have to find a way around this.
Line 247: if uri.username:
Maybe in the future.
Line 249: if uri.password:
a uri can have a password with blank user name.
Line 250: raise ValueError("Custom login is not supported")
I'm actually kinda hating the overly specific errors. You know what you are doing when
you fail.
When you get ENOENT from open you don't need it to say you failed during file open you
already there, you got the stack trace.
Line 252: for key, val in params:
I think you mean:
for key in ("timeout", "retrans", "version"):
if not key in params:
continue
kwargs[key] = int(params[key])
The arg parsing part is something I'm not sure I want per class yet and might like a
way for the class to declare what part of the uri should contain what arg and in what form
and just have a method that does it right.
Anyway it's not really important.
Line 314: kwargs["target"] = uri.path[1:] # ignore the / at path start
How would you differentiate from the host
google.comindex.html?
Line 325: elif key == "initiator_name":
Our variable names are mixedCaps but I would like to have the URIs to be case insensitive
so they use underscores to separate between words so they are easy to read in any form,
Line 437: raise ValueError("Custom port is not supported")
Intentional see above comments
....................................................
File vdsm/storage/Makefile.am
Line 59: sync.py \
In the future I will move all sync related stuff from misc to this file.
Like RWLock, sampling methods, etc...
--
To view, visit
http://gerrit.ovirt.org/1038
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifc5c160aba9b4cc88225dde0c44f9b766c6a4c0d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>