Commit 9486f6ae authored by Manuel Franceschini's avatar Manuel Franceschini

Support for IPv6 QA

Signed-off-by: default avatarManuel Franceschini <livewire@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent b43dcc5a
......@@ -2,6 +2,7 @@
"name": "xen-test",
"rename": "xen-test-rename",
"enabled-hypervisors": "xen-pvm",
"primary_ip_version": 4,
"os": "debian-etch",
"mem": "512M",
......
#
#
# Copyright (C) 2007 Google Inc.
# Copyright (C) 2007, 2010 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -80,6 +80,9 @@ def TestClusterInit(rapi_user, rapi_secret):
# Initialize cluster
cmd = ['gnt-cluster', 'init']
cmd.append("--primary-ip-version=%d" %
qa_config.get("primary_ip_version", 4))
if master.get('secondary', None):
cmd.append('--secondary-ip=%s' % master['secondary'])
......
#
#
# Copyright (C) 2007 Google Inc.
# Copyright (C) 2007, 2010 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -69,14 +69,19 @@ def TestIcmpPing():
"""
nodes = qa_config.get('nodes')
pingargs = ['-w', '3', '-c', '1 ']
pingprimary = "ping"
if qa_config.get("primary_ip_version") == 6:
pingprimary = "ping6"
for node in nodes:
check = []
for i in nodes:
check.append(i['primary'])
cmd = [pingprimary] + pingargs + [i['primary']]
check.append(utils.ShellQuoteArgs(cmd))
if i.has_key('secondary'):
check.append(i['secondary'])
ping = lambda ip: utils.ShellQuoteArgs(['ping', '-w', '3', '-c', '1', ip])
cmd = ' && '.join([ping(i) for i in check])
cmd = ["ping"] + pingargs + [i["secondary"]]
check.append(utils.ShellQuoteArgs(cmd))
AssertEqual(StartSSH(node['primary'], cmd).wait(), 0)
cmdall = ' && '.join(check)
AssertEqual(StartSSH(node['primary'], cmdall).wait(), 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment