]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
VMware: Fix protocol in backend stats
authorVipin Balachandran <vbala@vmware.com>
Thu, 30 Jul 2015 08:58:01 +0000 (14:28 +0530)
committerVipin Balachandran <vbala@vmware.com>
Thu, 30 Jul 2015 10:43:14 +0000 (16:13 +0530)
The VMDK driver reports the protocol as 'LSI Logic SCSI' in
backend stats. This patch changes the protocol to 'vmdk'
which is in sync with driver support matrix at:
https://wiki.openstack.org/wiki/CinderSupportMatrix

Change-Id: I8f9255088ce3d25a6b0d7f38dcbabfd15082ff32
Closes-Bug: #1479693

cinder/tests/unit/test_vmware_vmdk.py
cinder/volume/drivers/vmware/vmdk.py

index bd14c0c641518220dad2c3c0496bb9865e5f5e13..d28c5eb8bd269ccaa049a55ad2be10381d11f1b6 100644 (file)
@@ -198,12 +198,12 @@ class VMwareEsxVmdkDriverTestCase(test.TestCase):
     def test_get_volume_stats(self):
         """Test get_volume_stats."""
         stats = self._driver.get_volume_stats()
-        self.assertEqual(stats['vendor_name'], 'VMware')
-        self.assertEqual(stats['driver_version'], self._driver.VERSION)
-        self.assertEqual(stats['storage_protocol'], 'LSI Logic SCSI')
-        self.assertEqual(stats['reserved_percentage'], 0)
-        self.assertEqual(stats['total_capacity_gb'], 'unknown')
-        self.assertEqual(stats['free_capacity_gb'], 'unknown')
+        self.assertEqual('VMware', stats['vendor_name'])
+        self.assertEqual(self._driver.VERSION, stats['driver_version'])
+        self.assertEqual('vmdk', stats['storage_protocol'])
+        self.assertEqual(0, stats['reserved_percentage'])
+        self.assertEqual('unknown', stats['total_capacity_gb'])
+        self.assertEqual('unknown', stats['free_capacity_gb'])
 
     def test_create_volume(self):
         """Test create_volume."""
index c374af31bdfa2a788fc306d2ce0b4a0a4d7b795e..79edb36f011a2faca4c0e3aeea19a371968fd8bf 100644 (file)
@@ -303,7 +303,7 @@ class VMwareEsxVmdkDriver(driver.VolumeDriver):
             data = {'volume_backend_name': backend_name,
                     'vendor_name': 'VMware',
                     'driver_version': self.VERSION,
-                    'storage_protocol': 'LSI Logic SCSI',
+                    'storage_protocol': 'vmdk',
                     'reserved_percentage': 0,
                     'total_capacity_gb': 'unknown',
                     'free_capacity_gb': 'unknown'}