From c79afcbbf8a01e72c3cb7471c9ba0ffbac499cb8 Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Tue, 1 Oct 2013 16:00:24 +0000 Subject: [PATCH] Remove unecessary `get_boolean` function `get_boolean` is entirely equivalent to `bool_from_string` so just use that instead. Change-Id: I3cdcea2db882d49f6b4208ea579cff6f898c29e2 --- nova/utils.py | 8 -------- nova/virt/vmwareapi/vmops.py | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/nova/utils.py b/nova/utils.py index 5615f3710fb3..7ac6d18b3ec0 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -49,7 +49,6 @@ from nova.openstack.common import lockutils from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova.openstack.common.rpc import common as rpc_common -from nova.openstack.common import strutils from nova.openstack.common import timeutils notify_decorator = 'nova.notifications.notify_decorator' @@ -1283,10 +1282,3 @@ def get_image_from_system_metadata(system_meta): image_meta['properties'] = properties return image_meta - - -def get_boolean(value): - if isinstance(value, bool): - return value - else: - return strutils.bool_from_string(value) diff --git a/nova/virt/vmwareapi/vmops.py b/nova/virt/vmwareapi/vmops.py index 22a85736a667..c8f6eb416ed9 100644 --- a/nova/virt/vmwareapi/vmops.py +++ b/nova/virt/vmwareapi/vmops.py @@ -41,6 +41,7 @@ from nova import exception from nova.openstack.common import excutils from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging +from nova.openstack.common import strutils from nova import utils from nova.virt import configdrive from nova.virt import driver @@ -635,7 +636,7 @@ class VMwareVMOps(object): # this will never be not-set by this point. value = global_linked_clone - return utils.get_boolean(value) + return strutils.bool_from_string(value) def get_copy_virtual_disk_spec(self, client_factory, adapter_type, disk_type):