diff --git a/cloudkittyclient/v2/scope.py b/cloudkittyclient/v2/scope.py index fc8a279..a17acb9 100644 --- a/cloudkittyclient/v2/scope.py +++ b/cloudkittyclient/v2/scope.py @@ -12,11 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. # +from oslo_utils import strutils + from cloudkittyclient.common import base from cloudkittyclient import exc -from distutils.util import strtobool - class ScopeManager(base.BaseManager): """Class used to handle /v2/scope endpoint""" @@ -133,7 +133,8 @@ class ScopeManager(base.BaseManager): ) if kwargs.get('active'): - body['active'] = strtobool(kwargs.get('active')) + body['active'] = strutils.bool_from_string( + kwargs.get('active'), strict=True) # Stripping None body = dict(filter(lambda elem: elem[1] is not None, body.items()))