def _get_all_by_resource_types(context, session, filters, marker=None, limit=None, sort_key=None, sort_dir=None):
 resource_types = filters['resource_types']
 resource_type_list = resource_types.split(',')
 db_recs = session.query(models.MetadefResourceType).join(models.MetadefResourceType.associations).filter(models.MetadefResourceType.name.in_(resource_type_list)).values(models.MetadefResourceType.name, models.MetadefNamespaceResourceType.namespace_id)
 namespace_id_list = []
 for (name, namespace_id) in db_recs:
  namespace_id_list.append(namespace_id)
 if (len(namespace_id_list) is 0):
  return []
 filters2 = filters
 filters2.update({'id_list': namespace_id_list})
 return _get_all(context, session, filters2, marker, limit, sort_key, sort_dir)

def _get_all_by_resource_types ( context , session , filters , marker = None , limit = None , sort_key = None , sort_dir = None ) : resource_types = filters [ 'resource_types' ] resource_type_list = resource_types . split ( ',' ) db_recs = session . query ( models . MetadefResourceType ) . join ( models . MetadefResourceType . associations ) . filter ( models . MetadefResourceType . name . in_ ( resource_type_list ) ) . values ( models . MetadefResourceType . name , models . MetadefNamespaceResourceType . namespace_id ) namespace_id_list = [ ] for ( name , namespace_id ) in db_recs : namespace_id_list . append ( namespace_id ) if ( len ( namespace_id_list ) is 0 ) : return [ ] filters2 = filters filters2 . update ( { 'id_list' : namespace_id_list } ) return _get_all ( context , session , filters2 , marker , limit , sort_key , sort_dir )
get all visible namespaces for the specified resource_types .