'Helper function to get current and requested spec.
:param diff: A difference dictionary.
:param volume_name: The volume name we are working with.
:param specname: The pretty name of the parameter.
:param spectype: The actual spec string.
:return: current, requested spec.
:raises VolumeBackendAPIException:'

def _get_retype_spec(self, diff, volume_name, specname, spectype):

    spec = diff['extra_specs'].get(spectype)
    if spec:
        if (len(spec) != 2):
            msg = (_('Unable    to    retype    %(specname)s,    expected    to    receive    current    and    requested    %(spectype)s    values.    Value    received:    %(spec)s') % {'specname': specname, 'spectype': spectype, 'spec': spec})
            LOG.error(msg)
            raise exception.VolumeBackendAPIException(data=msg)
        current = spec[0]
        requested = spec[1]
        if (current != requested):
            LOG.debug('Retyping    volume    %(vol)s    to    use    %(specname)s    %(spec)s.', {'vol': volume_name, 'specname': specname, 'spec': requested})
            return (current, requested)
        else:
            LOG.info('Retype    was    to    same    Storage    Profile.')
    return (None, None)
