.. versionadded:: 2017.7.0

    Create and attach multiple volumes to a node. The 'volumes' and 'node'
    arguments are required, where 'node' is a libcloud node, and 'volumes'
    is a list of maps, where each map contains:

    size
        The size of the new disk in GB. Required.

    type
        The disk type, either pd-standard or pd-ssd. Optional, defaults to pd-standard.

    image
        An image to use for this new disk. Optional.

    snapshot
        A snapshot to use for this new disk. Optional.

    auto_delete
        An option(bool) to keep or remove the disk upon instance deletion.
        Optional, defaults to False.

    Volumes are attached in the order in which they are given, thus on a new
    node the first volume will be /dev/sdb, the second /dev/sdc, and so on.

def create_attach_volumes(name, kwargs, call=None):
    '''
    .. versionadded:: 2017.7.0

    Create and attach multiple volumes to a node. The 'volumes' and 'node'
    arguments are required, where 'node' is a libcloud node, and 'volumes'
    is a list of maps, where each map contains:

    size
        The size of the new disk in GB. Required.

    type
        The disk type, either pd-standard or pd-ssd. Optional, defaults to pd-standard.

    image
        An image to use for this new disk. Optional.

    snapshot
        A snapshot to use for this new disk. Optional.

    auto_delete
        An option(bool) to keep or remove the disk upon instance deletion.
        Optional, defaults to False.

    Volumes are attached in the order in which they are given, thus on a new
    node the first volume will be /dev/sdb, the second /dev/sdc, and so on.
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The create_attach_volumes action must be called with '
            '-a or --action.'
        )

    volumes = literal_eval(kwargs['volumes'])
    node = kwargs['node']
    conn = get_conn()
    node_data = _expand_node(conn.ex_get_node(node))
    letter = ord('a') - 1

    for idx, volume in enumerate(volumes):
        volume_name = '{0}-sd{1}'.format(name, chr(letter + 2 + idx))

        volume_dict = {
          'disk_name': volume_name,
          'location': node_data['extra']['zone']['name'],
          'size': volume['size'],
          'type': volume.get('type', 'pd-standard'),
          'image': volume.get('image', None),
          'snapshot': volume.get('snapshot', None),
          'auto_delete': volume.get('auto_delete', False)
        }

        create_disk(volume_dict, 'function')
        attach_disk(name, volume_dict, 'action')