Using common method 'bool_from_string' from oslo strutils

Using common method 'bool_from_string' from oslo strutils to replace
utils.string_to_bool.

partially implements blueprint common-client-library-2

Change-Id: I23924db3000feadcfe823c6cc979ea9752a13fa9
This commit is contained in:
llg8212
2014-01-22 11:45:42 +08:00
parent e4d1961c92
commit e5f6dee95d
4 changed files with 19 additions and 15 deletions
+1 -5
View File
@@ -48,7 +48,7 @@ def schema_args(schema_getter, omit=[]):
typemap = {
'string': str,
'integer': int,
'boolean': string_to_bool,
'boolean': strutils.bool_from_string,
'array': list
}
@@ -176,10 +176,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