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
« Back to merge proposal
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 get_instance( self.ip, self.user, self.port)
def ssh(self):
return SSHManager.
class Snapcraft( EcosystemObject ):
class Snapd(Ecosystem Object)
That way every time you instantiate Snapcraft or Snapd, you'll get a property ssh that will always point to an active ssh connection