'Return booleanized version of body dict.
:param Request req: The request object (containing \'nova-context\'
env var).
:param str id: The host name.
:param dict body: example format {\'host\': {\'status\': \'enable\',
\'maintenance_mode\': \'enable\'}}
:return: Same dict as body but \'enable\' strings for \'status\' and
\'maintenance_mode\' are converted into True, else False.
:rtype: dict'

@wsgi.Controller.api_version('2.1', '2.42')
@extensions.expected_errors((400, 404, 501))
@validation.schema(hosts.update)
def update(self, req, id, body):

    def read_enabled(orig_val):
        val = orig_val.strip().lower()
        return (val == 'enable')
    context = req.environ['nova.context']
    context.can(hosts_policies.BASE_POLICY_NAME)
    status = body.get('status')
    maint_mode = body.get('maintenance_mode')
    if (status is not None):
        status = read_enabled(status)
    if (maint_mode is not None):
        maint_mode = read_enabled(maint_mode)
    result = {'host': id}
    if (status is not None):
        result['status'] = self._set_enabled_status(context, id, status)
    if (maint_mode is not None):
        result['maintenance_mode'] = self._set_host_maintenance(context, id, maint_mode)
    return result
