fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: [Fab-user] How is config file merged into environment?


From: Steve Steiner
Subject: Fwd: [Fab-user] How is config file merged into environment?
Date: Sat, 27 Jun 2009 09:42:47 -0400

On Jun 26, 2009, at 10:55 PM, Jeff Forcier wrote:

On Fri, Jun 26, 2009 at 10:36 PM, Steve Steiner
(listsin)<address@hidden> wrote:

After the annoying deprecation warnings from Parimiko

What version are you on? You ought to be using 1.7.4 if at all
possible; I know there've been at least one or two irritating/nasty
bugs caused by using something other than that latest Paramiko
version. Just FYI. I don't seem to recall ever seeing Paramiko
deprecation warnings in my own usage.

I think Python 2.6 is the difference. I need the multiprocessing package so have to use 2.6. 2.5 is sooooooooo, '06... ;-)

(cloud-o-tron)(~/work/cloud-o-tron)# python
Python 2.6.2 (r262:71600, Jun  9 2009, 10:09:41)
[GCC 4.0.1 (Apple Inc. build 5484)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import parimko
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: No module named parimko
>>> import paramiko
/Users/ssteiner/.virtualenvs/cloud-o-tron/lib/python2.6/site-packages/ pycrypto-2.0.1-py2.6-macosx-10.3-i386.egg/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
 import warnings
/Users/ssteiner/.virtualenvs/cloud-o-tron/lib/python2.6/site-packages/ pycrypto-2.0.1-py2.6-macosx-10.3-i386.egg/Crypto/Hash/MD5.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
 import warnings
>>> paramiko.__version__
'1.7.4 (Desmond)'
>>>

What idiotically simple thing am I missing?

Config files are really stupid simple right now and can only be used
to set...string values :( so lists are right out.

But a simple:

host = "xxx.yyy.zzz.kkk"

Or:

hosts = xxx.yyy.zzz.kkk

or, any other variation I could think of.

If you check out
http://github.com/bitprophet/fabric/blob/master/fabric/main.py#L34
you'll see that it's literally doing a partition or split on the '='
character, using the LHS as the key string and the RHS as a value
string. That's it.

Right, and producing a dictionary.

Then the "env" dictionary is update()d from that. So the value from the config should overwrite/get added to the env dict, no?

This is not documented as far as I can tell (it was always a under the
radar kind of thing even back in 0.1.x, IIRC, though it may have been
mentioned in the old docs) and is, again, really simplistic. I'd like
to make it more useful, though that will likely have to wait till 1.0.

There doesn't seem to be any doc on the whole command line util which is how I mostly use fabric, at this point. I looked in the old_docs directory, and there's nothing in there either. Would you like me to whip together a quick outline of docs that need to be filled in? Even if it's just place-holders at this point, with a dump of the command line output, that' d be better than what we have so far.

Will flag this thread so I remember to add a big fat TODO note about
this if there isn't one (I don't think there is). Apologies for the
confusion!

How's that bug tracker coming...stupid TODO...

S






reply via email to

[Prev in Thread] Current Thread [Next in Thread]