From a2568a55985efb268d436c7e6aaff2b20a9fadb0 Mon Sep 17 00:00:00 2001 From: Quique Llorente Date: Tue, 4 Dec 2018 15:51:06 +0100 Subject: [PATCH] Adapt python-tempestconf to python3 As part of running tripleo standalone jobs at fedora28 we found that parts of tempestconf were not adapted to python3, this review just add needed stuff to run tripleo-fedora-28-standalone job there. Story: https://tree.taiga.io/project/tripleo-ci-board/task/478?kanban-status=1447276 Change-Id: I850ff56c4ced2f3cbab05bb8c3b120e112a2acdd --- config_tempest/services/image.py | 2 +- config_tempest/services/services.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config_tempest/services/image.py b/config_tempest/services/image.py index 836ef299..b8a93492 100644 --- a/config_tempest/services/image.py +++ b/config_tempest/services/image.py @@ -187,7 +187,7 @@ class ImageService(VersionedService): else: visibility = 'public' - with open(path) as data: + with open(path, 'rb') as data: image = self.client.create_image(name=name, disk_format=self.disk_format, container_format='bare', diff --git a/config_tempest/services/services.py b/config_tempest/services/services.py index cb2f25d2..42ab7298 100644 --- a/config_tempest/services/services.py +++ b/config_tempest/services/services.py @@ -228,7 +228,7 @@ class Services(object): horizon.configure_horizon(self._conf) - for service, codename in C.SERVICE_NAMES.iteritems(): + for service, codename in C.SERVICE_NAMES.items(): # ceilometer is still transitioning from metering to telemetry if service == 'telemetry' and self.is_service('metering'): service = 'metering'