> On Mar 29, 2015, at 6:19 AM, Daniel Gruno <humbed...@apache.org> wrote: > > > > On 2015-03-29 15:10, Greg Stein wrote: >> On Sun, Mar 29, 2015 at 7:38 AM, <humbed...@apache.org> wrote: >>> ... >>> +++ steve/trunk/pysteve/lib/backends/es.py Sun Mar 29 12:38:08 2015 >>> >>> ... >>> +constants.appendBackend( { >>> + 'id': 'elasticsearch', >>> + 'init': init, >>> + 'document_exists': exists, >>> + 'get_basedata': getBasedata, >>> + 'election_close': close, >>> + 'election_vote': vote, >>> + 'election_list': listElections, >>> + 'issue_list': listIssues, >>> + 'election_create': createElection, >>> + 'issue_create': createIssue, >>> + 'issue_delete': deleteIssue, >>> + 'election_update': updateElection, >>> + 'issue_update': updateIssue, >>> + 'issue_get': getIssue, >>> + 'vote': vote, >>> + 'votes_get': getVotes, >>> + 'votes_get_raw': getVotesRaw, >>> + 'voter_get_uid': voter_get, >>> + 'voter_add': voter_add, >>> + 'voter_remove': voter_remove, >>> + 'voter_has_voted': voter_has_voted >>> +}) >>> >> Why a dictionary mapping names to functions? .. that is why we have classes. > Yep, a class would be better suited, same thing for the vote types I can > imagine, and is on my TODO list (I had a bit of a brain fart while porting > it, so I just copied over the structure from vote types). > I am currently pressed for time (heading out the door), so I won't be able to > get this done till later this evening, hence getting in a quicker version > first. I wanted something down on paper before I left, so Chris could get > started whenever he wants on a Sold backend, but yes, I do realize it's not > ideal nor a final piece of work.
Take a look at my last checkin. I think this is what we want in terms of commands and plugins. Regards, Alan