def propset_dict(propset):
    if propset is None:
        return {}

    return {prop.name: prop.val for prop in propset}
Turn a propset list into a dictionary
dataset/ETHPy150Open openstack/nova/nova/virt/vmwareapi/vm_util.py/propset_dict