From 35631e282592a87f3afba0a161ab4a4defa616f5 Mon Sep 17 00:00:00 2001 From: Sonia Ghanekar Date: Tue, 28 Jul 2015 10:11:50 -0700 Subject: [PATCH] Set VERSION on the Nimble driver. The Nimble driver does not set the VERSION variable causing its version to be logged as N/A. This patch updates that variable so that the correct version number is reflected in the log. Change-Id: I922257cf79e1a65247fd5384fa1fa746660efae3 Closes-Bug: #1476859 --- cinder/tests/unit/test_nimble.py | 2 +- cinder/volume/drivers/nimble.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cinder/tests/unit/test_nimble.py b/cinder/tests/unit/test_nimble.py index 8bbcc28c1..f2d4a5cbd 100755 --- a/cinder/tests/unit/test_nimble.py +++ b/cinder/tests/unit/test_nimble.py @@ -462,7 +462,7 @@ class NimbleDriverVolumeTestCase(NimbleDriverBaseTestCase): def test_get_volume_stats(self): self.mock_client_service.service.getGroupConfig.return_value = \ FAKE_POSITIVE_GROUP_CONFIG_RESPONSE - expected_res = {'driver_version': '1.1.0', + expected_res = {'driver_version': '1.1.1', 'total_capacity_gb': 7466.30419921875, 'QoS_support': False, 'reserved_percentage': 0, diff --git a/cinder/volume/drivers/nimble.py b/cinder/volume/drivers/nimble.py index 0bd4bb84d..b51f681ff 100755 --- a/cinder/volume/drivers/nimble.py +++ b/cinder/volume/drivers/nimble.py @@ -36,7 +36,7 @@ from cinder.volume.drivers.san import san from cinder.volume import volume_types -DRIVER_VERSION = '1.1.0' +DRIVER_VERSION = '1.1.1' AES_256_XTS_CIPHER = 2 DEFAULT_CIPHER = 3 EXTRA_SPEC_ENCRYPTION = 'nimble:encryption' @@ -82,9 +82,12 @@ class NimbleISCSIDriver(san.SanISCSIDriver): Version history: 1.0 - Initial driver 1.1.0 - Added Extra Spec Capability + 1.1.1 - Updated VERSION to Nimble driver version """ + VERSION = DRIVER_VERSION + def __init__(self, *args, **kwargs): super(NimbleISCSIDriver, self).__init__(*args, **kwargs) self.APIExecutor = None -- 2.45.2