diff options
Diffstat (limited to 'lorrycontroller/gitano.py')
-rw-r--r-- | lorrycontroller/gitano.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lorrycontroller/gitano.py b/lorrycontroller/gitano.py index b2c9123..2de291c 100644 --- a/lorrycontroller/gitano.py +++ b/lorrycontroller/gitano.py @@ -128,3 +128,26 @@ class GitanoCommand(object): self.trovehost, ' '.join(gitano_args), str(e)) return response.read() + + +class LocalTroveGitanoCommand(GitanoCommand): + + '''Run commands on the local Trove's Gitano. + + This is a version of the GitanoCommand class specifically for + accessing the local Trove's Gitano. + + ''' + + def __init__(self): + GitanoCommand.__init__(self, 'localhost', 'ssh', '', '') + + + +def new_gitano_command(statedb, trovehost): + trove_info = statedb.get_trove_info(trovehost) + return lorrycontroller.GitanoCommand( + trovehost, + trove_info['protocol'], + trove_info['username'], + trove_info['password']) |