'Get converted DotHill volume name.
Converts the openstack volume id from
fceec30e-98bc-4ce5-85ff-d7309cc17cc2
to
v_O7DDpi8TOWF_9cwnMF
We convert the 128(32*4) bits of the uuid into a 24 characters long
base64 encoded string. This still exceeds the limit of 20 characters
in some models so we return 19 characters because the
_get_{vol,snap}_name functions prepend a character.'

def _encode_name(self, name):

    uuid_str = name.replace('-', '')
    vol_uuid = uuid.UUID(('urn:uuid:%s' % uuid_str))
    vol_encoded = base64.urlsafe_b64encode(vol_uuid.bytes)
    if six.PY3:
        vol_encoded = vol_encoded.decode('ascii')
    return vol_encoded[:19]
