summaryrefslogtreecommitdiff
path: root/glanceclient/common/utils.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-01-31 02:38:12 +0000
committerGerrit Code Review <review@openstack.org>2014-01-31 02:38:12 +0000
commit238e9fffcc0211514f95600163c72e0bf13b6771 (patch)
tree8fa78b25e09b726568b927e1d80538a4e09175f0 /glanceclient/common/utils.py
parentff7b58860239307a5a1c1d4bea52235e7003fc8b (diff)
parente5f6dee95d7559fafc0e768366b3ac773ac91a4f (diff)
downloadpython-glanceclient-238e9fffcc0211514f95600163c72e0bf13b6771.tar.gz
Merge "Using common method 'bool_from_string' from oslo strutils"
Diffstat (limited to 'glanceclient/common/utils.py')
-rw-r--r--glanceclient/common/utils.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/glanceclient/common/utils.py b/glanceclient/common/utils.py
index c772822..fd284c1 100644
--- a/glanceclient/common/utils.py
+++ b/glanceclient/common/utils.py
@@ -49,7 +49,7 @@ def schema_args(schema_getter, omit=[]):
typemap = {
'string': str,
'integer': int,
- 'boolean': string_to_bool,
+ 'boolean': strutils.bool_from_string,
'array': list
}
@@ -177,10 +177,6 @@ def is_authentication_required(f):
return getattr(f, 'require_authentication', True)
-def string_to_bool(arg):
- return arg.strip().lower() in ('t', 'true', 'yes', '1')
-
-
def env(*vars, **kwargs):
"""Search for the first defined of possibly many env vars