提交 e26b3af2 编写于 作者: Z zhencliu

gluster_peers now is a string in json

Signed-off-by: NZhenchao Liu <zhencliu@redhat.com>
上级 91888285
import os
import netaddr
import logging
import json
from avocado.utils import process
......@@ -23,9 +24,10 @@ def run(test, params, env):
" socket is supported by now.")
hosts = []
if params.get("enable_gluster") == "yes":
if params.get_boolean("enable_gluster"):
hosts.append(params["gluster_server"])
hosts.extend(params.get("gluster_peers", "").split())
hosts.extend([peer['host'] for peer in json.loads(
params.get('gluster_peers', '[]')) if 'host' in peer])
_check_hosts(hosts)
hosts.pop() # The last server should be accessible
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册