def to_bool(value):
    '''
    Convert python bool to zfs on/off bool
    '''
    value = from_bool(value)
    if isinstance(value, bool):
        value = 'on' if value else 'off'
    elif value is None:
        value = 'none'

    return value
def to_bool ( value ) : value = from_bool ( value ) if isinstance ( value , bool ) : value = 'on' if value else 'off' elif value is None : value = 'none' return value
Convert python bool to zfs on/off bool