- def __init__(self,hostname,buildname=None,key=None, username=None):
- self.hostname=hostname
- self.buildname=buildname
- self.key=key
- self.username=username
+ # some boxes have their working space in user's homedir (/root),
+ # some others in a dedicated area with max. space (/vservers)
+ # when root is not specified we use the homedir
+ def __init__(self, hostname, buildname=None, key=None, username=None, unknown_host=True, root=None):
+ self.hostname = hostname
+ self.buildname = buildname
+ self.key = key
+ self.username = username
+ self.unknown_host = unknown_host
+ self.root = root
+
+ def __repr__(self):
+ result = "{}@{}".format(self.username or 'root', self.hostname)
+ if self.key:
+ result += " <key {}>".format(self.key)
+ return result