]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Merge "Make VNX Cinder Driver aware of VNX Pool Full Threshold"
authorJenkins <jenkins@review.openstack.org>
Sun, 28 Jun 2015 14:27:10 +0000 (14:27 +0000)
committerGerrit Code Review <review@openstack.org>
Sun, 28 Jun 2015 14:27:10 +0000 (14:27 +0000)
1  2 
cinder/tests/unit/test_emc_vnxdirect.py
cinder/volume/drivers/emc/emc_vnx_cli.py

index edcaff66d62f58df93c6ae86181a81fad8a0bdec,a16e1e8615f57b4fe8576212e876a93b02c27381..9d1eb7c3ec41e8345cb6cd742d1da4427cd32528
@@@ -1990,10 -2046,10 +2047,10 @@@ Time Remaining:  0 second(s
                            self.driver.create_volume,
                            self.testData.test_failed_volume)
          expect_cmd = [mock.call(*self.testData.LUN_CREATION_CMD(
-             'failed_vol1', 1, 'unit_test_pool', None, None, False))]
+             'failed_vol1', 1, 'unit_test_pool', None, None, poll=False))]
          fake_cli.assert_has_calls(expect_cmd)
  
 -    @mock.patch('cinder.openstack.common.loopingcall.FixedIntervalLoopingCall',
 +    @mock.patch('oslo_service.loopingcall.FixedIntervalLoopingCall',
                  new=utils.ZeroIntervalLoopingCall)
      def test_create_faulted_volume(self):
          volume_name = 'faulted_volume'
                        poll=True),
              mock.call(*self.testData.MIGRATION_VERIFY_CMD(1),
                        poll=True)]
-         fake_cli.assert_has_calls(expect_cmd)
+         fake_cli1.assert_has_calls(expect_cmd1)
+         self.configuration.ignore_pool_full_threshold = True
+         fake_cli2 = self.driverSetup(commands, results)
+         self.driver.create_volume_from_snapshot(self.testData.test_volume2,
+                                                 self.testData.test_snapshot)
+         expect_cmd2 = [
+             mock.call(*self.testData.LUN_CREATION_CMD(
+                 'vol2_dest', 1, 'unit_test_pool', None, None,
+                 ignore_thresholds=True))]
+         fake_cli2.assert_has_calls(expect_cmd2)
  
 -    @mock.patch('cinder.openstack.common.loopingcall.FixedIntervalLoopingCall',
 +    @mock.patch('oslo_service.loopingcall.FixedIntervalLoopingCall',
                  new=utils.ZeroIntervalLoopingCall)
      def test_create_volume_from_snapshot_sync_failed(self):