For some reason it invented its own instead. This seems rather
pointless.
(probably of the form `LOGIN@HOSTNAME') and referring to the service
NAME.
"""
(probably of the form `LOGIN@HOSTNAME') and referring to the service
NAME.
"""
- super(SSHRemoteService, me).__init__(*args, **kw)
+ super(SSHRemoteService, me).__init__(name = name, *args, **kw)
def _describe(me):
"""Description of the remote service."""
def _describe(me):
"""Description of the remote service."""
- return "`%s' via SSH to `%s'" % (me._name, me._remote),
+ return "`%s' via SSH to `%s'" % (me.name, me._remote),
+ def _mkcmd(me, cmd, state):
"""Format a command for SSH. Mainly escaping arguments."""
return ['ssh', me._remote, ' '.join(map(CGI.urlencode, cmd))]
def setpasswd(me, user, passwd):
"""Service protocol: set the USER's password to PASSWD."""
"""Format a command for SSH. Mainly escaping arguments."""
return ['ssh', me._remote, ' '.join(map(CGI.urlencode, cmd))]
def setpasswd(me, user, passwd):
"""Service protocol: set the USER's password to PASSWD."""
- me._run_noout(['set', me._name, user], passwd + '\n')
+ me._run_noout(['set', me.name, user], passwd + '\n')
def clearpasswd(me, user):
"""Service protocol: clear the USER's password."""
def clearpasswd(me, user):
"""Service protocol: clear the USER's password."""
- me._run_noout(['clear', me._name, user])
+ me._run_noout(['clear', me.name, user])
CONF.export('SSHRemoteService')
CONF.export('SSHRemoteService')