From c002d3b2bf322d1a763f1a4d99dd1214471d9c5a Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Thu, 1 Dec 2016 14:22:01 -0600 Subject: [PATCH] Fix an import error on nova driver Nova has moved 'arch' to 'fields.Architecture' [1], which caused the breakage. This commit fixed it. [1] https://review.openstack.org/#/c/356067/ Change-Id: I0cc7228571746961be5c1597bbb3cfde80bdd519 Closes-Bug: #1646609 --- nova/virt/docker/driver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nova/virt/docker/driver.py b/nova/virt/docker/driver.py index 86264fd51..5dd8d9ff4 100644 --- a/nova/virt/docker/driver.py +++ b/nova/virt/docker/driver.py @@ -33,7 +33,6 @@ from oslo_utils import importutils from oslo_utils import units from oslo_utils import versionutils -from nova.compute import arch from nova.compute import flavors from nova.compute import hv_type from nova.compute import power_state @@ -44,6 +43,7 @@ from nova.i18n import _LE from nova.i18n import _LI from nova.i18n import _LW from nova import objects +from nova.objects import fields from nova import utils from nova.virt.docker import client as docker_client from nova.virt.docker import hostinfo @@ -329,8 +329,8 @@ class DockerDriver(driver.ComputeDriver): 'cpu_info': '?', 'numa_topology': None, 'supported_instances': [ - (arch.I686, hv_type.DOCKER, vm_mode.EXE), - (arch.X86_64, hv_type.DOCKER, vm_mode.EXE) + (fields.Architecture.I686, hv_type.DOCKER, vm_mode.EXE), + (fields.Architecture.X86_64, hv_type.DOCKER, vm_mode.EXE) ] } return stats