Enable Nova driver in gate pipeline

This setup the CI to run devstack with Nova driver. Then, run the
tempest tests againest it.

In addition, this commit performed the following fixes in order to
pass the CI check:
* Switch from hv_type to fields.HVType
* Switch from vm_mode to fields.VMMode
See the related changes in Nova [1][2].

[1] https://review.openstack.org/#/c/356424/
[2] https://review.openstack.org/#/c/356553/

Closes-Bug: #1649021
Change-Id: Icf3c48d00b49ee16fe42adfc6d0bd41bfecaf938
This commit is contained in:
Hongbin Lu 2016-12-09 16:26:43 -06:00
parent 5a899b6091
commit 546882333e
2 changed files with 13 additions and 4 deletions

View File

@ -18,4 +18,13 @@
# Keep all devstack settings here instead of project-config for easy
# maintain if we want to change devstack config settings in future.
driver=$1
if [ "$driver" = "docker" ]; then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"ZUN_DRIVER=docker"
elif [ "$driver" = "nova-docker" ]; then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"ZUN_DRIVER=nova-docker"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IP_VERSION=4"
fi
$BASE/new/devstack-gate/devstack-vm-gate.sh

View File

@ -34,9 +34,7 @@ from oslo_utils import units
from oslo_utils import versionutils
from nova.compute import flavors
from nova.compute import hv_type
from nova.compute import power_state
from nova.compute import vm_mode
from nova import exception
from nova.i18n import _
from nova.i18n import _LE
@ -322,8 +320,10 @@ class DockerDriver(driver.ComputeDriver):
'cpu_info': '?',
'numa_topology': None,
'supported_instances': [
(fields.Architecture.I686, hv_type.DOCKER, vm_mode.EXE),
(fields.Architecture.X86_64, hv_type.DOCKER, vm_mode.EXE)
(fields.Architecture.I686, fields.HVType.DOCKER,
fields.VMMode.EXE),
(fields.Architecture.X86_64, fields.HVType.DOCKER,
fields.VMMode.EXE)
]
}
return stats