def id_to_ec2_snap_id(snapshot_id):
 if uuidutils.is_uuid_like(snapshot_id):
  ctxt = context.get_admin_context()
  int_id = get_int_id_from_snapshot_uuid(ctxt, snapshot_id)
  return id_to_ec2_id(int_id, 'snap-%08x')
 else:
  return id_to_ec2_id(snapshot_id, 'snap-%08x')

def id_to_ec2_snap_id ( snapshot_id ) : if uuidutils . is_uuid_like ( snapshot_id ) : ctxt = context . get_admin_context ( ) int_id = get_int_id_from_snapshot_uuid ( ctxt , snapshot_id ) return id_to_ec2_id ( int_id , 'snap-%08x' ) else : return id_to_ec2_id ( snapshot_id , 'snap-%08x' )
get or create an ec2 volume id from uuid .