]> SALOME platform Git repositories - modules/kernel.git/blob - src/LifeCycleCORBA_SWIG/LifeCycleCORBA.py
Salome HOME
- Launcher can now load and save its jobs list
[modules/kernel.git] / src / LifeCycleCORBA_SWIG / LifeCycleCORBA.py
1 #  -*- coding: iso-8859-1 -*-
2 #  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 #
7 #  This library is free software; you can redistribute it and/or
8 #  modify it under the terms of the GNU Lesser General Public
9 #  License as published by the Free Software Foundation; either
10 #  version 2.1 of the License.
11 #
12 #  This library is distributed in the hope that it will be useful,
13 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 #  Lesser General Public License for more details.
16 #
17 #  You should have received a copy of the GNU Lesser General Public
18 #  License along with this library; if not, write to the Free Software
19 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 #
21 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #
23
24 #  SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++
25 #  File   : LifeCycleCORBA.py
26 #  Author : Paul RASCLE, EDF
27 #  Module : SALOME
28 #  $Header$
29 #
30 import Engines
31 from libSALOME_LifeCycleCORBA import *
32
33 class LifeCycleCORBA (SALOME_LifeCycleCORBA):
34
35     def __init__(self, orb = None):
36         SALOME_LifeCycleCORBA.__init__(self)
37
38     def FindOrLoadComponent(self, containerName, componentName):
39         return SALOME_LifeCycleCORBA.FindOrLoad_Component(self,
40                                                           containerName,
41                                                           componentName)
42
43 class MachineParameters (Engines.MachineParameters):
44           def __init__(self, container_name='', hostname='', componentList=[], computerList=[], OS='', 
45                              mem_mb=0, cpu_clock=0, nb_proc_per_node=0, nb_node=0, isMPI=False, workingdir='', 
46                              mode='start', policy='altcycl', parallelLib='', nb_component_nodes=0):
47             Engines.MachineParameters.__init__(self,container_name, hostname, componentList, computerList, OS, 
48                                                     mem_mb, cpu_clock, nb_proc_per_node, nb_node, isMPI, workingdir, 
49                                                     mode, policy, parallelLib, nb_component_nodes)
50
51 class ResourceParameters (Engines.ResourceParameters):
52   def __init__(self, name="", hostname="", OS="", componentList=[],
53                      nb_proc=0, mem_mb=0, cpu_clock=0, nb_node=0, nb_proc_per_node=0,
54                      policy="", resList=[]):
55     Engines.ResourceParameters.__init__(self, name, hostname, OS, componentList,
56                                               nb_proc, mem_mb, cpu_clock, nb_node, nb_proc_per_node,
57                                               policy, resList)
58
59 class JobParameters (Engines.JobParameters):
60   def __init__(self, job_name="", job_type="", job_file="", env_file="", in_files=[], out_files=[],
61                      work_directory="", local_directory="", result_directory="", maximum_duration="",
62                      resource_required=None, queue="", specific_parameters=[]):
63     Engines.JobParameters.__init__(self, job_name, job_type, job_file, env_file, in_files, out_files,
64                                          work_directory, local_directory, result_directory, maximum_duration,
65                                          resource_required, queue, specific_parameters)