diff options
author | Prashanth Pai <ppai@redhat.com> | 2015-02-24 14:40:25 +0530 |
---|---|---|
committer | Thiago da Silva <thiago@redhat.com> | 2015-06-17 12:58:49 -0700 |
commit | 658ebecb84951fd8e418f15a5c8e2c8b1901b9d4 (patch) | |
tree | 1d60080d82fa66218081481965c322aef361e854 /gluster/exceptions.py | |
parent | 904ca8ff630cb81fbd35ba337de12643376e058e (diff) |
Refactor volume initialization code
* Validate inputs during initialization of Volume object.
* Move glfs_new() and glfs_init() into mount() method.
* Provide user consumable unmount() method.
* Provide "mounted" property to Volume object. Users can now check state
whether a volume is virtual mounted or not.
Change-Id: Idc53ee7f9386ed995315bd5fb492a7d36f44875f
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'gluster/exceptions.py')
-rw-r--r-- | gluster/exceptions.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gluster/exceptions.py b/gluster/exceptions.py new file mode 100644 index 0000000..2bb4732 --- /dev/null +++ b/gluster/exceptions.py @@ -0,0 +1,18 @@ +# Copyright (c) 2012-2015 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +class LibgfapiException(Exception): + pass |