summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmrith Kumar <amrith@amrith.org>2017-03-09 15:25:42 -0500
committerAmrith Kumar <amrith@amrith.org>2017-03-10 08:14:20 -0500
commit107bc5e4b4580edfc00aae34067cb405e859127c (patch)
tree3f21a364e0dd5112e0219a10e59a05a524868e6c
parent880f8cc519e766a57f3434ac4e367f4c862ef716 (diff)
downloadtrove-107bc5e4b4580edfc00aae34067cb405e859127c.tar.gz
we now need to have dib installed explicitly
dib is now going to have to be installed explicitly for us to actually run the gate. the old method of just cloning the repo won't work with dib v2. There are other ways to accomplish this but I'm choosing this approach knowing that it isn't ideal. First, what's the downside? This means that dib gets installed wherever trove control plane is installed. Is that necessary, NO. Is it the end of the world, NO. What are the options? - do what Octavia did and have a second requirements.txt in a folder called diskimage-create. Would this work, yes but we don't have such a mechanism right now and nothing would keep this requirements.txt file in sync with g-r that I know of. - hardcode the pip install command somewhere in the devstack plugin. yes, this would work but this would also have no ability to sync with g-r. So, while the solution proposed here isn't ideal, it strikes me as not bad, and much less risk than the other two options. We also need to figure out where the elements are and fix the path for disk-image-create. Some pep8 failures appears to have crept in as well, those are addressed. Change-Id: Ic64d91e082102057417995a0f6851d03b9e0ca74
-rw-r--r--integration/scripts/functions_qemu4
-rw-r--r--integration/scripts/trovestack.rc2
-rw-r--r--requirements.txt1
-rw-r--r--tox.ini2
4 files changed, 5 insertions, 4 deletions
diff --git a/integration/scripts/functions_qemu b/integration/scripts/functions_qemu
index ac91efc8..e0cbac19 100644
--- a/integration/scripts/functions_qemu
+++ b/integration/scripts/functions_qemu
@@ -38,7 +38,7 @@ function build_vm() {
export GUEST_LOGDIR
export ESCAPED_GUEST_LOGDIR
export ELEMENTS_PATH=$TROVESTACK_SCRIPTS/files/elements
- export ELEMENTS_PATH+=:$PATH_DISKIMAGEBUILDER/elements
+ export ELEMENTS_PATH+=:$PATH_DISKIMAGEBUILDER_ELEMENTS
export ELEMENTS_PATH+=:$PATH_TRIPLEO_ELEMENTS/elements
export DIB_CLOUD_INIT_DATASOURCES="ConfigDrive"
export DATASTORE_PKG_LOCATION
@@ -46,7 +46,7 @@ function build_vm() {
export DIB_APT_CONF_DIR=/etc/apt/apt.conf.d
export DIB_CLOUD_INIT_ETC_HOSTS=true
local QEMU_IMG_OPTIONS=$(! $(qemu-img | grep -q 'version 1') && echo "--qemu-img-options compat=0.10")
- ${PATH_DISKIMAGEBUILDER}/bin/disk-image-create -a amd64 -o "${VM}" \
+ disk-image-create -a amd64 -o "${VM}" \
-x ${QEMU_IMG_OPTIONS} ${DISTRO} ${EXTRA_ELEMENTS} vm heat-cfntools \
cloud-init-datasources ${DISTRO}-${RELEASE}-guest ${DISTRO}-${RELEASE}-${SERVICE_TYPE}
}
diff --git a/integration/scripts/trovestack.rc b/integration/scripts/trovestack.rc
index 8982c2fa..54646886 100644
--- a/integration/scripts/trovestack.rc
+++ b/integration/scripts/trovestack.rc
@@ -51,7 +51,7 @@ PATH_OPENSTACKCLIENT=$DEST/python-openstackclient
PATH_PYTHON_SWIFTCLIENT=$DEST/python-swiftclient
PATH_PYTHON_TROVECLIENT=$DEST/python-troveclient
PATH_TROVE_DASHBOARD=$DEST/trove-dashboard
-PATH_DISKIMAGEBUILDER=$DEST/diskimage-builder
+PATH_DISKIMAGEBUILDER_ELEMENTS=$(python -c 'import os, diskimage_builder, pkg_resources;print(os.path.abspath(pkg_resources.resource_filename(diskimage_builder.__name__, "elements")))')
PATH_TRIPLEO_ELEMENTS=$DEST/tripleo-image-elements
# Save the state of TROVE_BRANCH first, since it's used in trovestack
diff --git a/requirements.txt b/requirements.txt
index e8735878..9a8e9616 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -47,3 +47,4 @@ enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' #
xmltodict>=0.10.1 # MIT
pycrypto>=2.6 # Public Domain
oslo.policy>=1.17.0 # Apache-2.0
+diskimage-builder>=1.1.2,!=1.6.0,!=1.7.0,!=1.7.1 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index 310629db..4b294691 100644
--- a/tox.ini
+++ b/tox.ini
@@ -72,7 +72,7 @@ commands = {posargs}
show-source = True
# H301 is ignored on purpose.
# The rest of the ignores are TODOs.
-ignore = F821,H301,H404,H405,H501
+ignore = F821,H301,H404,H405,H501,E402,W503,E731
enable-extensions = H203,H106
builtins = _
exclude=.venv,.tox,.git,dist,doc,*egg,tools,etc,build,*.po,*.pot,integration,releasenotes