> Thanks for the explanation. What about keeping the ssh client and have
> something like this?
>
> class EcosystemObject:
>
> def __init__(ip, user, port):
> self.ip = ip
> self.user = user
> self.port = port
>
> @property
> def ssh(self):
> return SSHManager.get_instance(self.ip, self.user, self.port)
>
> class Snapcraft(EcosystemObject):
>
> class Snapd(EcosystemObject)
>
> That way every time you instantiate Snapcraft or Snapd, you'll get a property
> ssh that will always point to an active ssh connection
Thanks for the feedback. Comments addressed:
* Deleting SShDriver and adding back Sshclient
* Cwd parameter removed from client and adding in helper (To mantain paramiko's method signature)
* adding ssh property in each helper that needs ssh, to ensure an active connection for every command execution.
> Thanks for the explanation. What about keeping the ssh client and have get_instance( self.ip, self.user, self.port) EcosystemObject ): Object)
> something like this?
>
> class EcosystemObject:
>
> def __init__(ip, user, port):
> self.ip = ip
> self.user = user
> self.port = port
>
> @property
> def ssh(self):
> return SSHManager.
>
> class Snapcraft(
>
> class Snapd(Ecosystem
>
> That way every time you instantiate Snapcraft or Snapd, you'll get a property
> ssh that will always point to an active ssh connection
Thanks for the feedback. Comments addressed:
* Deleting SShDriver and adding back Sshclient
* Cwd parameter removed from client and adding in helper (To mantain paramiko's method signature)
* adding ssh property in each helper that needs ssh, to ensure an active connection for every command execution.