Deletes a virtual machine snapshot from the provided VM.

    .. versionadded:: 2016.3.0

    vm_name
        The name of the VM from which to delete the snapshot.

    snapshot_id
        The ID of the snapshot to be deleted.

    CLI Example:

    .. code-block:: bash

        salt-cloud -a vm_snapshot_delete my-vm snapshot_id=8

def vm_snapshot_delete(vm_name, kwargs=None, call=None):
    '''
    Deletes a virtual machine snapshot from the provided VM.

    .. versionadded:: 2016.3.0

    vm_name
        The name of the VM from which to delete the snapshot.

    snapshot_id
        The ID of the snapshot to be deleted.

    CLI Example:

    .. code-block:: bash

        salt-cloud -a vm_snapshot_delete my-vm snapshot_id=8
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The vm_snapshot_delete action must be called with -a or --action.'
        )

    if kwargs is None:
        kwargs = {}

    snapshot_id = kwargs.get('snapshot_id', None)
    if snapshot_id is None:
        raise SaltCloudSystemExit(
            'The vm_snapshot_delete function requires a \'snapshot_id\' to be provided.'
        )

    server, user, password = _get_xml_rpc()
    auth = ':'.join([user, password])
    vm_id = int(get_vm_id(kwargs={'name': vm_name}))
    response = server.one.vm.snapshotdelete(auth, vm_id, int(snapshot_id))

    data = {
        'action': 'vm.snapshotdelete',
        'snapshot_deleted': response[0],
        'vm_id': response[1],
        'error_code': response[2],
    }

    return data