提交 f01454ad 编写于 作者: A Alex Bennée

tests/vm: fix basevm config

When the patch was merged it was part of a longer series which had
already merged the config changes. Semu-revert the config related
changes for now so things will build.

Fixes: b081986cSigned-off-by: NAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200323161514.23952-6-alex.bennee@linaro.org>
上级 2cc3e591
......@@ -358,23 +358,23 @@ class BaseVM(object):
"local-hostname: {}-guest\n".format(name)])
mdata.close()
udata = open(os.path.join(cidir, "user-data"), "w")
print("guest user:pw {}:{}".format(self._config['guest_user'],
self._config['guest_pass']))
print("guest user:pw {}:{}".format(self.GUEST_USER,
self.GUEST_PASS))
udata.writelines(["#cloud-config\n",
"chpasswd:\n",
" list: |\n",
" root:%s\n" % self._config['root_pass'],
" %s:%s\n" % (self._config['guest_user'],
self._config['guest_pass']),
" root:%s\n" % self.ROOT_PASS,
" %s:%s\n" % (self.GUEST_USER,
self.GUEST_PASS),
" expire: False\n",
"users:\n",
" - name: %s\n" % self._config['guest_user'],
" - name: %s\n" % self.GUEST_USER,
" sudo: ALL=(ALL) NOPASSWD:ALL\n",
" ssh-authorized-keys:\n",
" - %s\n" % self._config['ssh_pub_key'],
" - %s\n" % SSH_PUB_KEY,
" - name: root\n",
" ssh-authorized-keys:\n",
" - %s\n" % self._config['ssh_pub_key'],
" - %s\n" % SSH_PUB_KEY,
"locale: en_US.UTF-8\n"])
proxy = os.environ.get("http_proxy")
if not proxy is None:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册