'Get clone type from volume type.
:param volume: Volume object
:return: Clone type from the extra spec if present, else return
default \'full\' clone type'

@staticmethod
def _get_clone_type(volume):

    clone_type = _get_volume_type_extra_spec(volume['volume_type_id'], 'clone_type', default_value=volumeops.FULL_CLONE_TYPE)
    if ((clone_type != volumeops.FULL_CLONE_TYPE) and (clone_type != volumeops.LINKED_CLONE_TYPE)):
        msg = (_("Clone    type    '%(clone_type)s'    is    invalid;    valid    values    are:    '%(full_clone)s'    and    '%(linked_clone)s'.") % {'clone_type': clone_type, 'full_clone': volumeops.FULL_CLONE_TYPE, 'linked_clone': volumeops.LINKED_CLONE_TYPE})
        LOG.error(msg)
        raise exception.Invalid(message=msg)
    return clone_type
