Code review comment for lp:~canonical-platform-qa/snappy-ecosystem-tests/adding-ssh-client-driver

Revision history for this message
Santiago Baldassin (sbaldassin) wrote :

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