def doWork(self): configHolder = ConfigHolder(self.options.__dict__) monitor = Monitor(configHolder) for vmId in self.vmIds: host, port = monitor.getVmConnectionInfo(vmId) if host and port: Util.sshInteractive(host, port=port, sshKey=self.options.userPrivateKeyFile) else: sys.stderr.write("Couldn't find enough information to connect to VM '%s'\n" % vmId)