]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Removed differences with upstream release.
authorThomas Goirand <thomas@goirand.fr>
Sat, 29 Jun 2013 04:41:46 +0000 (12:41 +0800)
committerThomas Goirand <thomas@goirand.fr>
Sat, 29 Jun 2013 04:41:46 +0000 (12:41 +0800)
.gitreview
cinder/tests/test_netapp.py
cinder/tests/test_nfs.py
cinder/volume/drivers/san/hp/hp_3par_common.py
cinder/volume/manager.py

index 6ff8eed795e605c9a6bca88ac3ef8b0ece58564a..eecf939449df795079aefc1ab6962eda685208a4 100644 (file)
@@ -2,4 +2,3 @@
 host=review.openstack.org
 port=29418
 project=openstack/cinder.git
-defaultbranch=stable/grizzly
index 28540812f4261034ae815add2a3c443a39fca63d..c5e5738814e1d67e6365cdf2035b540302214b42 100644 (file)
@@ -1017,11 +1017,9 @@ class NetAppDriverTestCase(test.TestCase):
         shutil.rmtree(self.tempdir)
         super(NetAppDriverTestCase, self).tearDown()
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_connect(self):
         self.driver.check_for_setup_error()
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_create_destroy(self):
         self.driver._discover_luns()
         self.driver._provision(self.VOLUME_NAME, None, self.PROJECT_ID,
@@ -1031,7 +1029,6 @@ class NetAppDriverTestCase(test.TestCase):
     def test_destroy_uncreated_volume(self):
         self.driver._remove_destroy('fake-nonexistent-volume', self.PROJECT_ID)
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_map_unmap(self):
         self.driver._discover_luns()
         self.driver._provision(self.VOLUME_NAME, None, self.PROJECT_ID,
@@ -1048,13 +1045,11 @@ class NetAppDriverTestCase(test.TestCase):
         self.driver.terminate_connection(volume, connector)
         self.driver._remove_destroy(self.VOLUME_NAME, self.PROJECT_ID)
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_clone(self):
         self.driver._discover_luns()
         self.driver._clone_lun(0, '/vol/vol/qtree/src', '/vol/vol/qtree/dst',
                                False)
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_clone_fail(self):
         self.driver._discover_luns()
         self.driver._is_clone_done(0, '0', 'xxx')
@@ -1440,16 +1435,13 @@ class NetAppCmodeISCSIDriverTestCase(test.TestCase):
                               hostname='localhost', port=8080, cache=False)
         self.driver = driver
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_connect(self):
         self.driver.check_for_setup_error()
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_create_destroy(self):
         self.driver.create_volume(self.volume)
         self.driver.delete_volume(self.volume)
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_create_vol_snapshot_destroy(self):
         self.driver.create_volume(self.volume)
         self.driver.create_snapshot(self.snapshot)
@@ -1457,7 +1449,6 @@ class NetAppCmodeISCSIDriverTestCase(test.TestCase):
         self.driver.delete_snapshot(self.snapshot)
         self.driver.delete_volume(self.volume)
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_map_unmap(self):
         self.driver.create_volume(self.volume)
         updates = self.driver.create_export(None, self.volume)
@@ -1473,7 +1464,6 @@ class NetAppCmodeISCSIDriverTestCase(test.TestCase):
         self.driver.terminate_connection(self.volume, self.connector)
         self.driver.delete_volume(self.volume)
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_fail_vol_from_snapshot_creation(self):
         self.driver.create_volume(self.volume)
         try:
@@ -1485,14 +1475,12 @@ class NetAppCmodeISCSIDriverTestCase(test.TestCase):
         finally:
             self.driver.delete_volume(self.volume)
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_cloned_volume_destroy(self):
         self.driver.create_volume(self.volume)
         self.driver.create_cloned_volume(self.snapshot, self.volume)
         self.driver.delete_volume(self.snapshot)
         self.driver.delete_volume(self.volume)
 
-    @test.skip_test("Failing due to suds error - skip until fixed")
     def test_fail_cloned_volume_creation(self):
         self.driver.create_volume(self.volume)
         try:
index 3b42c1bb8bcdcb68870488fee82f03261ca4c70f..3f967c6f2eb5159300cec23a3569ee087d558644 100644 (file)
@@ -664,28 +664,3 @@ class NfsDriverTestCase(test.TestCase):
         self.assertEqual(drv._stats['free_capacity_gb'], 5.0)
 
         mox.VerifyAll()
-
-    def test_get_volume_stats(self):
-        """get_volume_stats must fill the correct values"""
-        mox = self._mox
-        drv = self._driver
-
-        drv._mounted_shares = [self.TEST_NFS_EXPORT1, self.TEST_NFS_EXPORT2]
-
-        mox.StubOutWithMock(drv, '_ensure_shares_mounted')
-        mox.StubOutWithMock(drv, '_get_available_capacity')
-
-        drv._ensure_shares_mounted()
-
-        drv._get_available_capacity(self.TEST_NFS_EXPORT1).\
-            AndReturn((2 * self.ONE_GB_IN_BYTES, 10 * self.ONE_GB_IN_BYTES))
-        drv._get_available_capacity(self.TEST_NFS_EXPORT2).\
-            AndReturn((3 * self.ONE_GB_IN_BYTES, 20 * self.ONE_GB_IN_BYTES))
-
-        mox.ReplayAll()
-
-        drv.get_volume_stats()
-        self.assertEqual(drv._stats['total_capacity_gb'], 30.0)
-        self.assertEqual(drv._stats['free_capacity_gb'], 5.0)
-
-        mox.VerifyAll()
index a3fb8aafdd957ad814f244df9bab459852c63985..9468904994c53e82f272d02192a4381bc07c33f0 100644 (file)
@@ -450,38 +450,6 @@ exit
 
         self.stats = stats
 
-    def _update_volume_stats(self, client):
-
-        # storage_protocol and volume_backend_name are
-        # set in the child classes
-        stats = {'driver_version': '1.0',
-                 'free_capacity_gb': 'unknown',
-                 'reserved_percentage': 0,
-                 'storage_protocol': None,
-                 'total_capacity_gb': 'unknown',
-                 'vendor_name': 'Hewlett-Packard',
-                 'volume_backend_name': None}
-
-        try:
-            cpg = client.getCPG(self.config.hp3par_cpg)
-            if 'limitMiB' not in cpg['SDGrowth']:
-                total_capacity = 'infinite'
-                free_capacity = 'infinite'
-            else:
-                total_capacity = int(cpg['SDGrowth']['limitMiB'] * const)
-                free_capacity = int((cpg['SDGrowth']['limitMiB'] -
-                                    cpg['UsrUsage']['usedMiB']) * const)
-
-            stats['total_capacity_gb'] = total_capacity
-            stats['free_capacity_gb'] = free_capacity
-        except hpexceptions.HTTPNotFound:
-            err = (_("CPG (%s) doesn't exist on array")
-                   % self.config.hp3par_cpg)
-            LOG.error(err)
-            raise exception.InvalidInput(reason=err)
-
-        self.stats = stats
-
     def create_vlun(self, volume, host, client):
         """
         In order to export a volume on a 3PAR box, we have to
index 9a7513f3d2c84ef8e3cad3c49b3bf36331c64786..5e1397ec29cb06f132ca7f80d75288826680f2b8 100644 (file)
@@ -503,11 +503,6 @@ class VolumeManager(manager.SchedulerDependentManager):
         else:
             project_id = context.project_id
 
-        if context.project_id != snapshot_ref['project_id']:
-            project_id = snapshot_ref['project_id']
-        else:
-            project_id = context.project_id
-
         try:
             LOG.debug(_("snapshot %s: deleting"), snapshot_ref['name'])
             self.driver.delete_snapshot(snapshot_ref)