@log_call
def metadef_namespace_get(context, namespace_name):
 try:
  namespace = next((namespace for namespace in DATA['metadef_namespaces'] if (namespace['namespace'] == namespace_name)))
 except StopIteration:
  LOG.debug('No namespace found with name %s', namespace_name)
  raise exception.MetadefNamespaceNotFound(namespace_name=namespace_name)
 _check_namespace_visibility(context, namespace, namespace_name)
 return namespace

@ log_call def metadef_namespace_get ( context , namespace_name ) : try : namespace = next ( ( namespace for namespace in DATA [ 'metadef_namespaces' ] if ( namespace [ 'namespace' ] == namespace_name ) ) ) except StopIteration : LOG . debug ( 'No namespace found with name %s' , namespace_name ) raise exception . MetadefNamespaceNotFound ( namespace_name = namespace_name ) _check_namespace_visibility ( context , namespace , namespace_name ) return namespace
get a namespace or raise if it does not exist or is not visible .