def snapshot_list(kwargs=None, call=None):
    ret = {}
    vms = []

    conn = get_conn()

    qry = conn._retrieve_properties_traversal(
        property_names=['name', 'rootSnapshot'],
        obj_type="VirtualMachine"
    )

    for prop in qry:
        has_snapshots = False
        name = ""

        for i in prop.PropSet:
            if i.Name == 'rootSnapshot' and i.Val.ManagedObjectReference:
                has_snapshots = True
            if i.Name == 'name':
                name = i.Val
        if has_snapshots:
            vms.append(name)

    for vm in vms:
        _vm = conn.get_vm_by_name(vm)

        ret[vm] = {'snapshots': []}

        for snap in _vm.get_snapshots():
            ret[vm]['snapshots'] = {
                'name': snap.get_name(),
                'description': snap.get_description(),
                'created': time.strftime("%Y-%m-%d %H:%M:%S", snap.get_create_time()),
                'state': snap.get_state(),
                'path': snap.get_path()
            }

    return ret
Testing the PUT review-requests/<id>/draft/ API
dataset/ETHPy150Open saltstack/salt/salt/cloud/clouds/vsphere.py/snapshot_list--crossover with--dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/webapi/tests/test_review_request_draft.py/ResourceTests.test_put_as_other_user_with_permission