Re: [PATCH master 08/10] gnt-node add: Use prepare-node-join

2012-10-26 Thread Iustin Pop
On Fri, Oct 26, 2012 at 03:11:56PM +0100, Michael Hanselmann wrote: > 2012/10/26 Iustin Pop : > > Please add a TODO at least, thanks. > > Turns out I also forgot some docstrings: LGTM, thanks. iustin

Re: [PATCH master 08/10] gnt-node add: Use prepare-node-join

2012-10-26 Thread Michael Hanselmann
2012/10/26 Iustin Pop : > Please add a TODO at least, thanks. Turns out I also forgot some docstrings: --- a/lib/client/gnt_node.py +++ b/lib/client/gnt_node.py @@ -139,6 +139,16 @@ def ConvertStorageType(user_storage_type): def _TryReadFile(path): + """Tries to read a file. + + If the file

Re: [PATCH master 08/10] gnt-node add: Use prepare-node-join

2012-10-26 Thread Iustin Pop
On Fri, Oct 26, 2012 at 02:57:31PM +0100, Michael Hanselmann wrote: > 2012/10/26 Iustin Pop : > > On Wed, Oct 24, 2012 at 02:21:56AM +0200, Michael Hanselmann wrote: > >> +def _TryReadFile(path): > >> + try: > >> +return utils.ReadFile(path) > >> + except EnvironmentError, err: > >> +if e

Re: [PATCH master 08/10] gnt-node add: Use prepare-node-join

2012-10-26 Thread Michael Hanselmann
2012/10/26 Iustin Pop : > On Wed, Oct 24, 2012 at 02:21:56AM +0200, Michael Hanselmann wrote: >> +def _TryReadFile(path): >> + try: >> +return utils.ReadFile(path) >> + except EnvironmentError, err: >> +if err.errno == errno.ENOENT: >> + return None >> +else: >> + raise > >

Re: [PATCH master 08/10] gnt-node add: Use prepare-node-join

2012-10-26 Thread Iustin Pop
On Wed, Oct 24, 2012 at 02:21:56AM +0200, Michael Hanselmann wrote: > This patch changes “gnt-node add” to use the newly added > “prepare-node-join” tool. Hereby Paramiko is no longer a hard dependency > for setting up SSH on nodes. > > In “gnt_cluster.py”, a positional parameter is no longer pass

[PATCH master 08/10] gnt-node add: Use prepare-node-join

2012-10-23 Thread Michael Hanselmann
This patch changes “gnt-node add” to use the newly added “prepare-node-join” tool. Hereby Paramiko is no longer a hard dependency for setting up SSH on nodes. In “gnt_cluster.py”, a positional parameter is no longer passed as a keyword parameter. --- NEWS |4 ++ lib/clien