@memoize
def glance_id_to_id(context, glance_id):
 if (not glance_id):
  return
 try:
  return objects.S3ImageMapping.get_by_uuid(context, glance_id).id
 except exception.NotFound:
  s3imap = objects.S3ImageMapping(context, uuid=glance_id)
  s3imap.create()
  return s3imap.id

@ memoize def glance_id_to_id ( context , glance_id ) : if ( not glance_id ) : return try : return objects . S3ImageMapping . get_by_uuid ( context , glance_id ) . id except exception . NotFound : s3imap = objects . S3ImageMapping ( context , uuid = glance_id ) s3imap . create ( ) return s3imap . id
convert a glance id to an internal id .