未验证 提交 e22e79eb 编写于 作者: Y YongxueHong 提交者: GitHub

Merge pull request #2247 from zhencliu/bz1842766

gluster_peers is a string in json
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.
先完成此消息的编辑!
想要评论请 注册