diff options
| author | Zandrr <campbellalex11@gmail.com> | 2015-06-27 07:21:59 +0000 | 
|---|---|---|
| committer | Zandrr <campbellalex11@gmail.com> | 2015-06-27 07:21:59 +0000 | 
| commit | cd6e853a5f7c6faa26822fb7669d16ce57997744 (patch) | |
| tree | f3829c9bae21acf1e4a6ce7d722669f4e8fbf212 | |
| parent | 2c468ae0d5a1e25998373abb72d87b1ee7693816 (diff) | |
changed unmount to umount
Change-Id: Iced9bb59a33c38964e012f9d6c9ef13efc1f184c
| -rwxr-xr-x | gluster/gfapi.py | 6 | ||||
| -rw-r--r-- | test/functional/libgfapi-python-tests.py | 12 | ||||
| -rw-r--r-- | test/unit/gluster/test_gfapi.py | 10 | 
3 files changed, 14 insertions, 14 deletions
diff --git a/gluster/gfapi.py b/gluster/gfapi.py index bd6f240..9b0d9a8 100755 --- a/gluster/gfapi.py +++ b/gluster/gfapi.py @@ -453,7 +453,7 @@ class Volume(object):              else:                  self._mounted = True -    def unmount(self): +    def umount(self):          """          Unmount a mounted GlusterFS volume. @@ -465,13 +465,13 @@ class Volume(object):              if ret < 0:                  raise LibgfapiException("glfs_fini(%s) failed." % (self.fs))              else: -                # Succeeded. Protect against multiple unmount() calls. +                # Succeeded. Protect against multiple umount() calls.                  self._mounted = False                  self.fs = None      def __del__(self):          try: -            self.unmount() +            self.umount()          except LibgfapiException:              pass diff --git a/test/functional/libgfapi-python-tests.py b/test/functional/libgfapi-python-tests.py index 776390d..13ae54d 100644 --- a/test/functional/libgfapi-python-tests.py +++ b/test/functional/libgfapi-python-tests.py @@ -548,7 +548,7 @@ class DirOpsTest(unittest.TestCase):  class TestVolumeInit(unittest.TestCase): -    def test_mount_unmount_default(self): +    def test_mount_umount_default(self):          # Create volume object instance          vol = Volume(HOST, VOLNAME)          # Check attribute init @@ -563,18 +563,18 @@ class TestVolumeInit(unittest.TestCase):          # Check mounted property          self.assertTrue(vol.mounted)          # Unmount the volume -        vol.unmount() +        vol.umount()          # Check mounted property again          self.assertFalse(vol.mounted) -        # Do a double unmount - should not crash or raise exception -        vol.unmount() +        # Do a double umount - should not crash or raise exception +        vol.umount()          self.assertFalse(vol.mounted)          # Do a double mount - should not crash or raise exception          vol.mount()          vol.mount()          self.assertTrue(vol.mounted)          # Unmount the volume -        vol.unmount() +        vol.umount()          self.assertFalse(vol.mounted)      def test_mount_err(self): @@ -608,5 +608,5 @@ class TestVolumeInit(unittest.TestCase):          vol.set_logging(log_file2, 7)          self.assertEqual(vol.log_file, log_file2)          # Unmount the volume -        vol.unmount() +        vol.umount()          self.assertFalse(vol.mounted) diff --git a/test/unit/gluster/test_gfapi.py b/test/unit/gluster/test_gfapi.py index f850f0f..62d7266 100644 --- a/test/unit/gluster/test_gfapi.py +++ b/test/unit/gluster/test_gfapi.py @@ -329,12 +329,12 @@ class TestVolume(unittest.TestCase):          self.assertEqual(v.port, 9876)          self.assertFalse(v.mounted) -    def test_mount_unmount_success(self): +    def test_mount_umount_success(self):          v = Volume("host", "vol")          v.mount()          self.assertTrue(v.mounted)          self.assertTrue(v.fs) -        v.unmount() +        v.umount()          self.assertFalse(v.mounted)          self.assertFalse(v.fs) @@ -379,14 +379,14 @@ class TestVolume(unittest.TestCase):              self.assertFalse(v.mounted)              _m_glfs_init.assert_caled_once_with(v.fs) -    def test_unmount_error(self): +    def test_umount_error(self):          v = Volume("host", "vol")          v.mount()          _m_glfs_fini = Mock(return_value=-1)          with patch("gluster.gfapi.api.glfs_fini", _m_glfs_fini): -            self.assertRaises(LibgfapiException, v.unmount) +            self.assertRaises(LibgfapiException, v.umount)              _m_glfs_fini.assert_called_once_with(v.fs) -            # Should still be mounted as unmount failed. +            # Should still be mounted as umount failed.              self.assertTrue(v.mounted)      def test_set_logging(self):  | 
