Salome HOME
remove SalomeOnDemandTK
[modules/kernel.git] / idl / SALOME_ContainerManager.idl
1 // Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #ifndef _SALOME_CONTAINERMANAGER_IDL_
24 #define _SALOME_CONTAINERMANAGER_IDL_
25
26 #include "SALOME_Exception.idl"
27 #include "SALOME_Component.idl"
28 #include "SALOME_ResourcesManager.idl"
29
30 /*! \file SALOME_ContainerManager.idl \brief interfaces for %SALOME Container Manager service
31 */
32
33 module Engines
34 {
35
36 //! Type to describe required properties of a container
37 struct ContainerParameters
38 {
39   //! container name if given else automatic
40   string container_name;
41
42   //! creation mode for GiveContainer if given else automatic 
43   /*! List of possible values:
44    * "find" : search the first container whose name is container_name on
45    *          resources listed in resource_params.resList.
46    *          Return nil if none found.
47    * "findorstart" : same as "find", but start a new container if none found.
48    * "start" : create a new container. If there is already a container with the
49    *           same name on the chosen resource, it will be shut down.
50    * "get" : search an existing container on the best fitting resource.
51    * "getorstart" : same as "get", but start a new container if none found.
52    */
53   string mode;
54
55   //! container working directory if given else automatic
56   string workingdir;
57
58   // Parallel part
59   //! Number of proc of a parallel container
60   long nb_proc;
61   //! if true start a MPI container
62   boolean isMPI;
63   //! PaCO specific information
64   string parallelLib;
65
66   //! Parameters to choose a resource
67   ResourceParameters resource_params;
68 };
69
70 struct KeyValPairString
71 {
72   string key;
73   string val;
74 };
75
76 typedef sequence<KeyValPairString> KeyValDict;
77
78 /*! \brief Interface of the %containerManager
79     This interface is used for interaction with the unique instance
80     of ContainerManager
81 */
82 interface ContainerManager
83 {
84   //! GiveContainer - use mode parameter of ContainerParameters to configure
85   //! how this method works
86   //! Currently: get, start, getorstart, findorstart, find
87   Container GiveContainer(in ContainerParameters params) raises (SALOME::SALOME_Exception);
88
89   //!  Shutdown all containers that have been launched by the container manager
90   void ShutdownContainers();
91
92   long GetTimeOutToLaunchServerInSecond();
93
94   void SetTimeOutToLaunchServerInSecond(in long timeInSecond);
95
96   long GetDeltaTimeBetweenNSLookupAtLaunchTimeInMilliSecond();
97
98   void SetDeltaTimeBetweenNSLookupAtLaunchTimeInMilliSecond(in long timeInMS);
99   
100   long GetDeltaTimeBetweenCPUMemMeasureInMilliSecond();
101
102   void SetDeltaTimeBetweenCPUMemMeasureInMilliSecond(in long timeInMS);
103
104   void SetOverrideEnvForContainers(in KeyValDict env);
105
106   KeyValDict GetOverrideEnvForContainers();
107
108   void SetCodeOnContainerStartUp(in string code);
109 } ;
110
111 };
112   
113 #endif