Merge "Use Tempest-lib's aggregate client"
diff --git a/requirements.txt b/requirements.txt
index ddd2a6b..c0a9254 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -22,6 +22,6 @@
iso8601>=0.1.9
fixtures>=1.3.1
testscenarios>=0.4
-tempest-lib>=0.9.0
+tempest-lib>=0.10.0
PyYAML>=3.1.0
stevedore>=1.5.0 # Apache-2.0
diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
index 0324df2..dc62620 100644
--- a/tempest/api/compute/images/test_images.py
+++ b/tempest/api/compute/images/test_images.py
@@ -14,6 +14,7 @@
from tempest.api.compute import base
from tempest.common.utils import data_utils
+from tempest.common import waiters
from tempest import config
from tempest import test
@@ -48,3 +49,18 @@
name=snapshot_name,
wait_until='SAVING')
self.client.delete_image(image['id'])
+
+ @test.idempotent_id('aaacd1d0-55a2-4ce8-818a-b5439df8adc9')
+ def test_create_image_from_stopped_server(self):
+ server = self.create_test_server(wait_until='ACTIVE')
+ self.servers_client.stop_server(server['id'])
+ waiters.wait_for_server_status(self.servers_client,
+ server['id'], 'SHUTOFF')
+ self.addCleanup(self.servers_client.delete_server, server['id'])
+ snapshot_name = data_utils.rand_name('test-snap')
+ image = self.create_image_from_server(server['id'],
+ name=snapshot_name,
+ wait_until='ACTIVE',
+ wait_for_server=False)
+ self.addCleanup(self.client.delete_image, image['id'])
+ self.assertEqual(snapshot_name, image['name'])
diff --git a/tempest/api/compute/images/test_images_negative.py b/tempest/api/compute/images/test_images_negative.py
index 126d092..9197adf 100644
--- a/tempest/api/compute/images/test_images_negative.py
+++ b/tempest/api/compute/images/test_images_negative.py
@@ -71,22 +71,6 @@
'!@#$%^&*()', name=name, meta=meta)
@test.attr(type=['negative'])
- @test.idempotent_id('aaacd1d0-55a2-4ce8-818a-b5439df8adc9')
- def test_create_image_from_stopped_server(self):
- server = self.create_test_server(wait_until='ACTIVE')
- self.servers_client.stop_server(server['id'])
- waiters.wait_for_server_status(self.servers_client,
- server['id'], 'SHUTOFF')
- self.addCleanup(self.servers_client.delete_server, server['id'])
- snapshot_name = data_utils.rand_name('test-snap')
- image = self.create_image_from_server(server['id'],
- name=snapshot_name,
- wait_until='ACTIVE',
- wait_for_server=False)
- self.addCleanup(self.client.delete_image, image['id'])
- self.assertEqual(snapshot_name, image['name'])
-
- @test.attr(type=['negative'])
@test.idempotent_id('ec176029-73dc-4037-8d72-2e4ff60cf538')
def test_create_image_specify_uuid_35_characters_or_less(self):
# Return an error if Image ID passed is 35 characters or less
diff --git a/tempest/scenario/test_network_v6.py b/tempest/scenario/test_network_v6.py
index a9394cb..3df92cf 100644
--- a/tempest/scenario/test_network_v6.py
+++ b/tempest/scenario/test_network_v6.py
@@ -143,8 +143,9 @@
self._list_ports(device_id=sid,
network_id=self.network_v6.id)]
self.assertEqual(1, len(ports),
- message="Multiple IPv6 ports found on network %s"
- % self.network_v6)
+ message=("Multiple IPv6 ports found on network %s. "
+ "ports: %s")
+ % (self.network_v6, ports))
mac6 = ports[0]
ssh.turn_nic_on(ssh.get_nic_name(mac6))
diff --git a/tempest/services/compute/json/services_client.py b/tempest/services/compute/json/services_client.py
index f82a18f..6e2f320 100644
--- a/tempest/services/compute/json/services_client.py
+++ b/tempest/services/compute/json/services_client.py
@@ -33,25 +33,25 @@
self.validate_response(schema.list_services, resp, body)
return service_client.ResponseBody(resp, body)
- def enable_service(self, host_name, binary):
+ def enable_service(self, **kwargs):
"""
Enable service on a host
host_name: Name of host
binary: Service binary
"""
- post_body = json.dumps({'binary': binary, 'host': host_name})
+ post_body = json.dumps(kwargs)
resp, body = self.put('os-services/enable', post_body)
body = json.loads(body)
self.validate_response(schema.enable_disable_service, resp, body)
return service_client.ResponseBody(resp, body)
- def disable_service(self, host_name, binary):
+ def disable_service(self, **kwargs):
"""
Disable service on a host
host_name: Name of host
binary: Service binary
"""
- post_body = json.dumps({'binary': binary, 'host': host_name})
+ post_body = json.dumps(kwargs)
resp, body = self.put('os-services/disable', post_body)
body = json.loads(body)
self.validate_response(schema.enable_disable_service, resp, body)