Hi all,
I'm writing a Django site to allow me remotely manage a series of
customer installs of a web application using fabric.
My goal is to call fabric from within some of my Django views (i.e. run
some task in a fabfile on some remote servers, all from within the
webapp), but I wouldn't like to run "fab" necessarily as a subprocess.
I'd like to call the equivalent python methods of fabric instead of a
command line.
I was taking a look at the sources of the fabric.main module but it
seems to rely very much on command line argument parsing but it doesn't
seem to provide the necessary high-level functions to separate parsing
and execution (main() is 150 lines and does a lot of stuff).
So far I started using load_fabfile to load a fabfile and get a list of
tasks, so that I can present them in my view for selection. But since
the fabric.main module is an undocumented part of fabric, I'm not sure I
can rely on it staying stable across releases.
My questions, mainly to the developers:
- Can I rely on using functions in fabric.main?
- Are there plans to refactor fabric.main so that it is more usable in
the way I suggest, and eventually become a published API?
- Would you be open to contributions in that direction?
Thanks in advance.
C.
_______________________________________________
Fab-user mailing list
Fab-user@nongnu.org
http://lists.nongnu.org/mailman/listinfo/fab-user