def id_to_ec2_vol_id(volume_id):
 if uuidutils.is_uuid_like(volume_id):
  ctxt = context.get_admin_context()
  int_id = get_int_id_from_volume_uuid(ctxt, volume_id)
  return id_to_ec2_id(int_id, 'vol-%08x')
 else:
  return id_to_ec2_id(volume_id, 'vol-%08x')

def id_to_ec2_vol_id ( volume_id ) : if uuidutils . is_uuid_like ( volume_id ) : ctxt = context . get_admin_context ( ) int_id = get_int_id_from_volume_uuid ( ctxt , volume_id ) return id_to_ec2_id ( int_id , 'vol-%08x' ) else : return id_to_ec2_id ( volume_id , 'vol-%08x' )
get or create an ec2 volume id from uuid .