Version: 9.12.0
LifeCycleCORBA.LifeCycleCORBA Class Reference
Inheritance diagram for LifeCycleCORBA.LifeCycleCORBA:

Public Member Functions

def __init__ (self, orb=None)
 
def FindOrLoadComponent (self, containerName, componentName)
 
Engines::EngineComponent_ptr FindComponent (const Engines::ContainerParameters &params, const char *componentName)
 Find an already existing and registered component instance. More...
 
Engines::EngineComponent_ptr LoadComponent (const Engines::ContainerParameters &params, const char *componentName)
 Load a component instance on a container defined by its parameters. More...
 
Engines::EngineComponent_ptr FindOrLoad_Component (const Engines::ContainerParameters &params, const char *componentName)
 Find an already existing and registered component instance or load a new component instance on a container defined by its parameters. More...
 
Engines::EngineComponent_ptr FindOrLoad_Component (const char *containerName, const char *componentName)
 Find an already existing and registered component instance or load a new component instance on a container defined by name. More...
 
Engines::EngineComponent_ptr Load_ParallelComponent (const Engines::ContainerParameters &params, const char *componentName)
 Load a parallel component instance. More...
 
bool isKnownComponentClass (const char *componentName)
 Check if the component class is known in module catalog. More...
 
int NbProc (const Engines::ContainerParameters &params)
 
Engines::ContainerManager_ptr getContainerManager ()
 Get the container manager. More...
 
Engines::ResourcesManager_ptr getResourcesManager ()
 Get the resources manager. More...
 
SALOME_NamingService_AbstractnamingService ()
 get the naming service used by the life cycle More...
 
CORBA::ORB_ptr orb ()
 get the orb used by the life cycle More...
 
void copyFile (const char *hostSrc, const char *fileSrc, const char *hostDest, const char *fileDest)
 copy a file from a source host to a destination host More...
 
void shutdownServers (bool shutdownLauncher=true)
 shutdown all the SALOME servers except SALOME_Session_Server and omniNames More...
 

Static Public Member Functions

static void preSet (Engines::ResourceParameters &outparams)
 Initialisation of a given Engines::ResourceParameters with default values. More...
 
static void preSet (Engines::ContainerParameters &outparams)
 Initialisation of a given Engines::ContainerParameters with default values. More...
 
static void killOmniNames ()
 shutdown omniNames More...
 

Protected Member Functions

Engines::EngineComponent_ptr _FindComponent (const Engines::ContainerParameters &params, const char *componentName, const Engines::ResourceList &listOfResources)
 Establish if a component called "componentName" in a container called "containerName" exists among the list of resources in "listOfMachines". More...
 
Engines::EngineComponent_ptr _LoadComponent (const Engines::ContainerParameters &params, const char *componentName)
 Load a component instance. More...
 

Protected Attributes

SALOME_NamingService_Abstract_NS
 
SALOME_NamingService_Abstract_NSnew
 
Engines::ContainerManager_var _ContManager
 
Engines::ResourcesManager_var _ResManager
 

Constructor & Destructor Documentation

◆ __init__()

def LifeCycleCORBA.LifeCycleCORBA.__init__ (   self,
  orb = None 
)

Member Function Documentation

◆ _FindComponent()

Engines::EngineComponent_ptr SALOME_LifeCycleCORBA::_FindComponent ( const Engines::ContainerParameters params,
const char *  componentName,
const Engines::ResourceList listOfResources 
)
protectedinherited

Establish if a component called "componentName" in a container called "containerName" exists among the list of resources in "listOfMachines".

Find an already existing and registered component instance.

This method uses Naming Service to find the component.

  • build a list of machines on which an instance of the component is running,
  • find the best machine among the list
Parameters
paramsmachine parameters like type or name...
componentNamethe name of component class
listOfMachineslist of machine address
Returns
a CORBA reference of the component instance, or _nil if not found

References SALOME_LifeCycleCORBA::_NS, SALOME_LifeCycleCORBA::_ResManager, Engines::ContainerParameters::container_name, SALOME_ContainerPy::containerName, SALOME_LifeCycleCORBA::NbProc(), KERNEL_PY.batchmode_salome::obj, and SALOME_NamingService_Abstract::ResolveComponent().

Referenced by SALOME_LifeCycleCORBA::FindComponent(), and SALOME_LifeCycleCORBA::FindOrLoad_Component().

◆ _LoadComponent()

Engines::EngineComponent_ptr SALOME_LifeCycleCORBA::_LoadComponent ( const Engines::ContainerParameters params,
const char *  componentName 
)
protectedinherited

Load a component instance.

  • Finds a container in the list of machine or start one.
  • Try to load the component library in the container,
  • then create an instance of the component.
Parameters
paramsmachine parameters like type or name...
componentNamethe name of component class
Returns
a CORBA reference of the component instance, or _nil if problem

References SALOME_LifeCycleCORBA::_ContManager, Engines::ContainerParameters::container_name, MESSAGE, Engines::ContainerParameters::mode, and SALOME_LifeCycleCORBA::NbProc().

Referenced by SALOME_LifeCycleCORBA::FindOrLoad_Component(), and SALOME_LifeCycleCORBA::LoadComponent().

◆ copyFile()

void SALOME_LifeCycleCORBA::copyFile ( const char *  hostSrc,
const char *  fileSrc,
const char *  hostDest,
const char *  fileDest 
)
inherited

copy a file from a source host to a destination host

Parameters
hostSrcthe source host
fileSrcthe file to copy from the source host to the destination host
hostDestthe destination host
fileDestthe destination file

References SALOME_LifeCycleCORBA::getContainerManager(), SALOME_FileTransferCORBA::getLocalFile(), Engines::ResourceParameters::hostname, Engines::ContainerParameters::mode, SALOME_LifeCycleCORBA::preSet(), and Engines::ContainerParameters::resource_params.

◆ FindComponent()

Engines::EngineComponent_ptr SALOME_LifeCycleCORBA::FindComponent ( const Engines::ContainerParameters params,
const char *  componentName 
)
inherited

Find an already existing and registered component instance.

Parameters
paramscontainer parameters like type or name...
componentNamethe name of component class
Returns
a CORBA reference of the component instance, or _nil if not found

< TODO: unused variable

References SALOME_LifeCycleCORBA::_FindComponent(), SALOME_LifeCycleCORBA::_ResManager, Engines::ResourceParameters::can_run_containers, Engines::ResourceParameters::componentList, SALOME_LifeCycleCORBA::isKnownComponentClass(), and Engines::ContainerParameters::resource_params.

◆ FindOrLoad_Component() [1/2]

Engines::EngineComponent_ptr SALOME_LifeCycleCORBA::FindOrLoad_Component ( const char *  containerName,
const char *  componentName 
)
inherited

Find an already existing and registered component instance or load a new component instance on a container defined by name.

Parameters
containerNamethe name of container, under one of the forms
  • 1 aContainer (local container)
  • 2 machine/aContainer (container on hostname = machine)
componentNamethe name of component class
Returns
a CORBA reference of the component instance, or _nil if problem

References Engines::ContainerParameters::container_name, SALOME_ContainerPy::containerName, SALOME_LifeCycleCORBA::FindOrLoad_Component(), Engines::ResourceParameters::hostname, SALOME_LifeCycleCORBA::isKnownComponentClass(), Engines::ContainerParameters::isMPI, MESSAGE, SALOME_LifeCycleCORBA::preSet(), Engines::ContainerParameters::resource_params, and SCRUTE.

◆ FindOrLoad_Component() [2/2]

Engines::EngineComponent_ptr SALOME_LifeCycleCORBA::FindOrLoad_Component ( const Engines::ContainerParameters params,
const char *  componentName 
)
inherited

Find an already existing and registered component instance or load a new component instance on a container defined by its parameters.

Parameters
paramscontainer parameters like type or name...
componentNamethe name of component class
Returns
a CORBA reference of the component instance, or _nil if problem

< TODO: unused variable

References SALOME_LifeCycleCORBA::_FindComponent(), SALOME_LifeCycleCORBA::_LoadComponent(), SALOME_LifeCycleCORBA::_ResManager, Engines::ResourceParameters::can_run_containers, Engines::ResourceParameters::componentList, SALOME_LifeCycleCORBA::isKnownComponentClass(), Engines::ResourceParameters::resList, and Engines::ContainerParameters::resource_params.

Referenced by SALOME_LifeCycleCORBA::FindOrLoad_Component(), LifeCycleCORBA.LifeCycleCORBA::FindOrLoadComponent(), LifeCycleCORBA.LifeCycleCORBASSL::FindOrLoadComponent(), SALOMEDS_DriverFactory_i::GetDriverByType(), main(), KERNEL::RetrieveCompo(), TEST_getLifeCycleCORBA(), KernelHelpersUnitTests::TEST_getLifeCycleCORBA(), LifeCycleCORBATest::testFindOrLoad_Component_LaunchContainer(), LifeCycleCORBATest::testFindOrLoad_Component_LaunchContainerHostname(), LifeCycleCORBATest::testFindOrLoad_Component_ParamsContainerName(), LifeCycleCORBATest::testFindOrLoad_Component_ParamsEmpty(), LifeCycleCORBATest::testFindOrLoad_Component_ParamsLocalContainer(), LifeCycleCORBATest::testFindOrLoad_Component_ParamsRemoteComputer(), LifeCycleCORBATest::testFindOrLoad_Component_ParamsRemoteComputer2(), LifeCycleCORBATest::testFindOrLoad_Component_PythonInCppContainer(), LifeCycleCORBATest::testFindOrLoad_Component_PythonSameInstance(), LifeCycleCORBATest::testFindOrLoad_Component_RemoteComputer(), LifeCycleCORBATest::testFindOrLoad_Component_SameContainer(), LifeCycleCORBATest::testFindOrLoad_Component_SameInstance(), LifeCycleCORBATest::testFindOrLoad_Component_UnknownInCatalog(), LifeCycleCORBATest::testFindOrLoad_Component_UnknownMachine(), and SALOMEDSTest::testStudyBuilder().

◆ FindOrLoadComponent()

def LifeCycleCORBA.LifeCycleCORBA.FindOrLoadComponent (   self,
  containerName,
  componentName 
)

◆ getContainerManager()

Engines::ContainerManager_ptr SALOME_LifeCycleCORBA::getContainerManager ( )
inherited

Get the container manager.

Returns
the container Manager

References SALOME_LifeCycleCORBA::_ContManager.

Referenced by SALOME_LifeCycleCORBA::copyFile(), and SALOME_FileTransferCORBA::getLocalFile().

◆ getResourcesManager()

Engines::ResourcesManager_ptr SALOME_LifeCycleCORBA::getResourcesManager ( )
inherited

Get the resources manager.

Returns
the container Manager

References SALOME_LifeCycleCORBA::_ResManager.

Referenced by SALOME_FileTransferCORBA::getLocalFile().

◆ isKnownComponentClass()

bool SALOME_LifeCycleCORBA::isKnownComponentClass ( const char *  componentName)
inherited

Check if the component class is known in module catalog.

Parameters
componentNamethe name of component class
Returns
true if found, false otherwise

Referenced by SALOME_LifeCycleCORBA::FindComponent(), SALOME_LifeCycleCORBA::FindOrLoad_Component(), and SALOME_LifeCycleCORBA::LoadComponent().

◆ killOmniNames()

void SALOME_LifeCycleCORBA::killOmniNames ( )
staticinherited

shutdown omniNames

References runConsole::cmd, and MESSAGE.

◆ Load_ParallelComponent()

Engines::EngineComponent_ptr SALOME_LifeCycleCORBA::Load_ParallelComponent ( const Engines::ContainerParameters params,
const char *  componentName 
)
inherited

Load a parallel component instance.

Parameters
paramsmachine parameters like type or name...
componentNamethe name of component class
Returns
a CORBA reference of the parallel component instance, or _nil if problem

References SALOME_LifeCycleCORBA::_ContManager, Engines::ResourceParameters::componentList, INFOS, MESSAGE, Engines::ContainerParameters::mode, pythfilter::name, and Engines::ContainerParameters::resource_params.

◆ LoadComponent()

Engines::EngineComponent_ptr SALOME_LifeCycleCORBA::LoadComponent ( const Engines::ContainerParameters params,
const char *  componentName 
)
inherited

Load a component instance on a container defined by its parameters.

Parameters
paramscontainer parameters like type or name...
componentNamethe name of component class
Returns
a CORBA reference of the component instance, or _nil if problem

< TODO: unused variable

References SALOME_LifeCycleCORBA::_LoadComponent(), SALOME_LifeCycleCORBA::_ResManager, Engines::ResourceParameters::can_run_containers, Engines::ResourceParameters::componentList, SALOME_LifeCycleCORBA::isKnownComponentClass(), Engines::ResourceParameters::resList, and Engines::ContainerParameters::resource_params.

◆ namingService()

SALOME_NamingService_Abstract * SALOME_LifeCycleCORBA::namingService ( )
inherited

get the naming service used by the life cycle

Returns
the naming service

References SALOME_LifeCycleCORBA::_NS.

◆ NbProc()

int SALOME_LifeCycleCORBA::NbProc ( const Engines::ContainerParameters params)
inherited
Returns
a number of processors not 0, only for MPI containers

References Engines::ContainerParameters::isMPI, and Engines::ContainerParameters::nb_proc.

Referenced by SALOME_LifeCycleCORBA::_FindComponent(), and SALOME_LifeCycleCORBA::_LoadComponent().

◆ orb()

CORBA::ORB_ptr SALOME_LifeCycleCORBA::orb ( )
inherited

◆ preSet() [1/2]

◆ preSet() [2/2]

◆ shutdownServers()

void SALOME_LifeCycleCORBA::shutdownServers ( bool  shutdownLauncher = true)
inherited

shutdown all the SALOME servers except SALOME_Session_Server and omniNames

< TODO: unused variable

< TODO: unused variable

< TODO: unused variable

< TODO: unused variable

< TODO: unused variable

< TODO: unused variable

< TODO: unused variable

References SALOME_LifeCycleCORBA::_NS, TestModuleCatalog::catalog, SALOME_NamingService_Container_Abstract::Destroy_Name(), salome::dsm, Kernel_Utils::GetHostname(), KERNEL::GetRefToORB(), test::hostname, launcher_use_case::launcher, pythfilter::name, SALOME_ExternalServerLauncher::NAME_IN_NS, SALOMESDS::DataServerManager::NAME_IN_NS, SALOME_LifeCycleCORBA::orb(), SALOME_NamingService_Container_Abstract::Resolve(), and runSalomeOld::session.

Field Documentation

◆ _ContManager

◆ _NS

◆ _NSnew

◆ _ResManager