From: Eric Harney Date: Tue, 18 Aug 2015 20:22:01 +0000 (-0400) Subject: Revert "mark oslo.vmware as optional dependency" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6da01c1b4102b36314b96ad73ec38a3fdec1355b;p=openstack-build%2Fcinder-build.git Revert "mark oslo.vmware as optional dependency" This reverts commit e67adc385ce6997249fbf70e9402264f758fc6f4. Adding optional dependency tracking would be nice, but Cinder is not yet in a place to do this. - Cinder supports tox 1.6 (minversion in tox.ini) - This functionality does not work on 1.6, requires 1.7. Tox fails to build a test environment if using tox 1.6. - We have decided we can't move to tox 1.7 for now. ( https://review.openstack.org/#/c/211614/ ) This reverts commit 478e8e970e54aaf3a034dc6347605c1b18291d0d. - Need to remove oslo.vmware from test-requirements.txt now, as well. Closes-Bug: #1484035 Change-Id: Icff52508ff1cd67e8c17964c840d3a5cdcfbbce3 --- diff --git a/cinder/volume/drivers/vmware/vmdk.py b/cinder/volume/drivers/vmware/vmdk.py index b61d45ff8..0f925ee5b 100644 --- a/cinder/volume/drivers/vmware/vmdk.py +++ b/cinder/volume/drivers/vmware/vmdk.py @@ -32,16 +32,11 @@ from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import units from oslo_utils import uuidutils -try: - import oslo_vmware -except ImportError: - oslo_vmware = None -else: - from oslo_vmware import api - from oslo_vmware import exceptions - from oslo_vmware import image_transfer - from oslo_vmware import pbm - from oslo_vmware import vim_util +from oslo_vmware import api +from oslo_vmware import exceptions +from oslo_vmware import image_transfer +from oslo_vmware import pbm +from oslo_vmware import vim_util import six from cinder import exception @@ -278,11 +273,6 @@ class VMwareEsxVmdkDriver(driver.VolumeDriver): :param context: Context information """ - if oslo_vmware is None: - msg = _("Missing 'oslo_vmware' python module, ensure the library" - " is installed and available.") - raise exception.VolumeDriverException(message=msg) - # Throw error if required parameters are not set. required_params = ['vmware_host_ip', 'vmware_host_username', diff --git a/requirements.txt b/requirements.txt index 21c14e05a..a8c54eeaa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -50,4 +50,5 @@ stevedore>=1.5.0 # Apache-2.0 suds-jurko>=0.6 WebOb>=1.2.3 oslo.i18n>=1.5.0 # Apache-2.0 +oslo.vmware>=1.16.0 # Apache-2.0 os-brick>=0.3.2 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index f5190acd3..c7f7e5e26 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,10 +25,6 @@ setup-hooks = packages = cinder -[extras] -vmdk = - oslo.vmware>=1.16.0 # Apache-2.0 - [entry_points] cinder.scheduler.filters = AvailabilityZoneFilter = cinder.openstack.common.scheduler.filters.availability_zone_filter:AvailabilityZoneFilter diff --git a/test-requirements.txt b/test-requirements.txt index 7223739b8..9baf38923 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,7 +11,6 @@ discover fixtures>=1.3.1 mock>=1.2 mox3>=0.7.0 -oslo.vmware>=1.16.0 # Apache-2.0 PyMySQL>=0.6.2 # MIT License psycopg2 oslotest>=1.10.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index dc91a71f5..b4bcb57f6 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,6 @@ install_command = pip install {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - .[vmdk] # By default ostestr will set concurrency # to ncpu, to specify something else use