summaryrefslogtreecommitdiffstats
path: root/smoketests/base.py
diff options
context:
space:
mode:
authorNTT PF Lab. <openstack@lab.ntt.co.jp>2010-12-24 20:38:49 +0900
committerNTT PF Lab. <openstack@lab.ntt.co.jp>2010-12-24 20:38:49 +0900
commitc5c58cb20def79401a374f863983a343139b53f3 (patch)
tree779776e3e04787318212572a96a0dc8a0f7ffb79 /smoketests/base.py
parent0a93a9298dda075b5519e71289d0bac6fb461404 (diff)
downloadnova-c5c58cb20def79401a374f863983a343139b53f3.tar.gz
nova-c5c58cb20def79401a374f863983a343139b53f3.tar.xz
nova-c5c58cb20def79401a374f863983a343139b53f3.zip
Support IPv6
Diffstat (limited to 'smoketests/base.py')
-rw-r--r--smoketests/base.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/smoketests/base.py b/smoketests/base.py
index 5a14d3e09..610270c5c 100644
--- a/smoketests/base.py
+++ b/smoketests/base.py
@@ -17,6 +17,7 @@
# under the License.
import boto
+import boto_v6
import commands
import httplib
import os
@@ -69,6 +70,17 @@ class SmokeTestCase(unittest.TestCase):
'test.')
parts = self.split_clc_url(clc_url)
+ if FLAGS.use_ipv6:
+ return boto_v6.connect_ec2(aws_access_key_id=access_key,
+ aws_secret_access_key=secret_key,
+ is_secure=parts['is_secure'],
+ region=RegionInfo(None,
+ 'nova',
+ parts['ip']),
+ port=parts['port'],
+ path='/services/Cloud',
+ **kwargs)
+
return boto.connect_ec2(aws_access_key_id=access_key,
aws_secret_access_key=secret_key,
is_secure=parts['is_secure'],
@@ -115,7 +127,8 @@ class SmokeTestCase(unittest.TestCase):
return True
def upload_image(self, bucket_name, image):
- cmd = 'euca-upload-bundle -b %s -m /tmp/%s.manifest.xml' % (bucket_name, image)
+ cmd = 'euca-upload-bundle -b '
+ cmd += '%s -m /tmp/%s.manifest.xml' % (bucket_name, image)
status, output = commands.getstatusoutput(cmd)
if status != 0:
print '%s -> \n %s' % (cmd, output)
@@ -130,6 +143,7 @@ class SmokeTestCase(unittest.TestCase):
raise Exception(output)
return True
+
def run_tests(suites):
argv = FLAGS(sys.argv)
@@ -151,4 +165,3 @@ def run_tests(suites):
else:
for suite in suites.itervalues():
unittest.TextTestRunner(verbosity=2).run(suite)
-