Closed willejs closed 8 years ago
@nilstoedtmann I don't mind which one gets merged! @tbarbugli can you merge either my pull request or the other patch?
This seems like a great addition. Perhaps a super solution to this specific problem is to have a mechanism that allows us to send optional args straight to fabric. (eg. send every arg that starts with --fabric- to fabric option parser to configure it). what do you guys think about it?
i dont mind either
@tbarbugli Have a look at other options we added, maybe some of it is interesting to others as well: https://github.com/DemandLogic/cassandra_snapshotter/commits/master
(I've been to busy/lazy to file pull requests yet)
+1 to the generic "--fabric-*" idea
@tbarbugli seems like a better idea really. could just loop through the args, and match on 'fabric-.*', then strip it and have a 1:1 mapping of args to options, then call getattr on them with the value as the argument?
yes, i was thinking about something like that. It would be great to send the list of options to fabric option parser so that we don't do to touch fab's env ourselves.
On Wed, Jan 28, 2015 at 10:33 AM, Will Salt notifications@github.com wrote:
@tbarbugli https://github.com/tbarbugli seems like a better idea really. could just loop through the args, and match on 'fabric-.*', then strip it and have a 1:1 mapping of args to options, then call getattr on them with the value as the argument?
— Reply to this email directly or view it on GitHub https://github.com/tbarbugli/cassandra_snapshotter/pull/39#issuecomment-71854125 .
@tbarbugli I hadnt read the code properly when making my previous assumptions. When you use the API it imports the env dictionary which is populated with defaults it seems. You cant set the options anywhere else, apart from with settings, which isnt appropriate. Therefore looping through the dictionary and checking existence of the keys before setting and warning if they don't exist is perhaps better? Lets merge this now, and in a separate pr include netter fabric options.
is this pull request still active? Or @nilstoedtmann do you plan on pull-requesting your changes?
added support for this with a newer PR, sorry for the long wait!
Add the ability to use ssh keys to auth with hosts.