def py_to_val(pyval):
    if isinstance(pyval, bool):
        return 'true' if pyval is True else 'false'
    elif pyval == '':
        return '""'
    else:
        return pyval
Convert python value to ovs-vsctl value argument
dataset/ETHPy150Open openstack/neutron/neutron/agent/ovsdb/api.py/py_to_val