@log_call
def metadef_object_get_by_id(context, namespace_name, object_id):
 namespace = metadef_namespace_get(context, namespace_name)
 _check_namespace_visibility(context, namespace, namespace_name)
 for object in DATA['metadef_objects']:
  if ((object['namespace_id'] == namespace['id']) and (object['id'] == object_id)):
   return object
 else:
  msg = (_('Metadata definition object not found for id=%s') % object_id)
  LOG.warn(msg)
  raise exception.MetadefObjectNotFound(msg)

@ log_call def metadef_object_get_by_id ( context , namespace_name , object_id ) : namespace = metadef_namespace_get ( context , namespace_name ) _check_namespace_visibility ( context , namespace , namespace_name ) for object in DATA [ 'metadef_objects' ] : if ( ( object [ 'namespace_id' ] == namespace [ 'id' ] ) and ( object [ 'id' ] == object_id ) ) : return object else : msg = ( _ ( 'Metadata definition object not found for id=%s' ) % object_id ) LOG . warn ( msg ) raise exception . MetadefObjectNotFound ( msg )
get a metadef object .