Salome HOME
updated copyright message
[modules/kernel.git] / src / ResourcesManager / SALOME_ResourcesManager.cxx
index 5b168e26557d0bc0d8c4567d93b2d8e99666dc21..632a326b651fbe580c212c436365748ea5f9b44f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -146,7 +146,10 @@ void SALOME_ResourcesManager::Shutdown()
 }
 
 /*!
- * Return list of resources available (regarding content of CatalogResources.xml). And for each resource the number of proc available of it.
+ * Return list of resources available (regarding content of CatalogResources.xml) but select only those with canRunContainers attribute set to true.
+ * And for each resource the number of proc available of it.
+ * 
+ * \sa SALOME_ResourcesManager::ListAllResourcesInCatalog
  */
 void SALOME_ResourcesManager::ListAllAvailableResources(Engines::ResourceList_out machines, Engines::IntegerList_out nbProcsOfMachines)
 {
@@ -173,6 +176,25 @@ void SALOME_ResourcesManager::ListAllAvailableResources(Engines::ResourceList_ou
     }
 }
 
+/*!
+ * Return list of resources available (regarding content of CatalogResources.xml) whatever canRunContainers attribute value.
+ * 
+ * \sa SALOME_ResourcesManager::ListAllAvailableResources
+ */
+Engines::ResourceList *SALOME_ResourcesManager::ListAllResourcesInCatalog()
+{
+  const MapOfParserResourcesType& zeList(_rm->GetList());
+  auto sz = zeList.size();
+  Engines::ResourceList *ret(new Engines::ResourceList);
+  ret->length( sz );
+  CORBA::ULong i(0);
+  for(auto it : zeList)
+  {
+    (*ret)[i++] = CORBA::string_dup( it.second.HostName.c_str() );
+  }
+  return ret;
+}
+
 //=============================================================================
 //! get the name of resources fitting the specified constraints (params)
 /*!