From 7c655a5ab35999d57634749214f1e9d9b74e2be3 Mon Sep 17 00:00:00 2001 From: rahuel Date: Mon, 8 Nov 2004 09:31:52 +0000 Subject: [PATCH] Restore without ContainersManager & ContainersManager --- Makefile.in | 1 - bin/runSalome.py | 2 +- bin/startContainer.py | 83 -------------------------- idl/ContainersManager.idl | 98 ------------------------------- idl/Makefile.in | 4 +- idl/ResourcesManager.idl | 120 -------------------------------------- 6 files changed, 2 insertions(+), 306 deletions(-) delete mode 100755 bin/startContainer.py delete mode 100644 idl/ContainersManager.idl delete mode 100644 idl/ResourcesManager.idl diff --git a/Makefile.in b/Makefile.in index ff10130f9..17257bd9b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -91,7 +91,6 @@ runIDLparser \ VERSION \ orbmodule.py \ runSalome.py \ -startContainer.py \ killSalome.py \ runSalome \ runNS.sh diff --git a/bin/runSalome.py b/bin/runSalome.py index a984e4d4f..8a3e03463 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -454,7 +454,7 @@ def startSalome(): # Lancement Container Supervision local # - ContainerPYServer().run() + ContainerSUPERVServer().run() # # Attente de la disponibilité du Container Supervision local dans le Naming Service # diff --git a/bin/startContainer.py b/bin/startContainer.py deleted file mode 100755 index 7aceb7d2c..000000000 --- a/bin/startContainer.py +++ /dev/null @@ -1,83 +0,0 @@ -#! /usr/bin/env python -# -# SALOME startContainer : implementation of container and engine for Kernel -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : startContainer.py -# Author : Jean Rahuel, CEA -# Module : SALOME -# $Header: - -import os -import sys -import string -from omniORB import CORBA, PortableServer -import Containers -import Engines -from SALOME_NamingServicePy import * - -if sys.argv[1] == '--help' : - print 'USAGE : startContainer.py with_xterm HostName ContainerName ContainerType NSHostName NSHostPort' - print ' ContainerType : Engines.CppContainer or Engines.PythonContainer' - sys.exit(0) - -orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) - -naming_service = SALOME_NamingServicePy_i(orb) - -MyContainersMgr = naming_service.Resolve("/Kernel/ContainersManager") -DefaultParams = MyContainersMgr.Parameters() -DefaultParams.with_xterm = int( sys.argv[1] ) -DefaultParams.HostName = sys.argv[2] -DefaultParams.ContainerName = sys.argv[3] -if sys.argv[4] == 'Engines.CppContainer' : - DefaultParams.ContainerType = Engines.CppContainer -elif sys.argv[4] == 'Engines.PythonContainer' : - DefaultParams.ContainerType = Engines.PythonContainer -else : - DefaultParams.ContainerType = Engines.UndefinedContainerType -DefaultParams.NsHostName = sys.argv[5] -DefaultParams.NsPort = int( sys.argv[6] ) - -#print "startContainer Parameters :" -#print "with_xterm :",DefaultParams.with_xterm -#print "Os :",DefaultParams.Os -#print "Memory :",DefaultParams.Memory -#print "CpuClock :",DefaultParams.CpuClock -#print "NbProc :",DefaultParams.NbProc -#print "NbNode :",DefaultParams.NbNode -#print "HostName :",DefaultParams.HostName -#print "ContainerName :",DefaultParams.ContainerName -#print "ContainerType :",DefaultParams.ContainerType -#print "NsHostName :",DefaultParams.NsHostName -#print "NsPort :",DefaultParams.NsPort - -aContainer = MyContainersMgr.FindOrStartContainer( DefaultParams ) - -if aContainer != None : - aContainer.ping() -else : - print "startContainer failed" - - - diff --git a/idl/ContainersManager.idl b/idl/ContainersManager.idl deleted file mode 100644 index 27a112617..000000000 --- a/idl/ContainersManager.idl +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : ContainersManager.idl -// Author : Jean Rahuel -// $Header: - -#ifndef _CONTAINERSMANAGER_IDL_ -#define _CONTAINERSMANAGER_IDL_ - -#include "SALOME_Component.idl" - -module Containers { - - enum System { Unknown , Linux } ; - - const string DefaultContainerCpp = "FactoryServer" ; - const string DefaultContainerPython = "FactoryServerPy" ; - - struct MachineParameters { - long with_xterm ; - System Os ; - long Memory ; - long CpuClock ; - long NbProc ; - long NbNode ; - string HostName ; - string ContainerName ; - Engines::ContainerType ContainerType ; - string NsHostName ; - long NsPort ; - } ; - - interface Manager { - - MachineParameters Parameters() ; - - boolean ping() ; - - Engines::ListOfContainers AllContainers() ; - - Engines::Container FindOneContainer( in string aHostName , - in string aContainerName ) ; - - Engines::Container FindContainer( in MachineParameters MyParams ) ; - - Engines::ListOfContainers FindContainers( in MachineParameters MyParams ) ; - - Engines::Container FindOrStartContainer( in MachineParameters MyParams ) ; - - Engines::ListOfComponents AllComponents() ; - - Engines::Component FindComponent( in MachineParameters MyParams , - in string ComponentName ) ; - - Engines::Component FindOneComponent( in string aHostName , - in string aContainerName , - in string ComponentName ) ; - - Engines::ListOfComponents FindComponents( in MachineParameters MyParams , - in string ComponentName ) ; - - Engines::Component FindOrLoad_ComponentPath( in MachineParameters MyParams , - in string ComponentName , - in string ImplementationPath ) ; - - Engines::Component FindOrLoad_Component( in MachineParameters MyParams , - in string ComponentName ) ; - - boolean DestroyContainer( in string aHostName , in string aContainerName ) ; - - boolean DestroyContainers( in MachineParameters MyParams ) ; - - void destroy() ; - - } ; - -} ; - -#endif diff --git a/idl/Makefile.in b/idl/Makefile.in index 5b20a45ac..b02dbdc67 100644 --- a/idl/Makefile.in +++ b/idl/Makefile.in @@ -25,9 +25,7 @@ IDL_FILES = \ SALOME_MPIContainer.idl \ SALOME_TestMPIComponent.idl \ Logger.idl \ - SALOME_GenericObj.idl \ - ResourcesManager.idl \ - ContainersManager.idl + SALOME_GenericObj.idl PY_CLIENT_IDL = $(IDL_FILES) diff --git a/idl/ResourcesManager.idl b/idl/ResourcesManager.idl deleted file mode 100644 index ef043a1bb..000000000 --- a/idl/ResourcesManager.idl +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : ResourcesManager.idl -// Author : Jean Rahuel -// $Header: - -#ifndef _RESOURCESMANAGER_IDL_ -#define _RESOURCESMANAGER_IDL_ - -#include "SALOME_Component.idl" -#include "ContainersManager.idl" - -module Resources { - - struct ComputerParameters { - string FullName ; - string Alias ; - long SshAccess ; - long Interactive ; - long Batch ; - string UserName ; - Containers::System Os ; - long Memory ; - long Swap ; - long CpuClock ; - long NbProc ; - long NbNode ; - } ; - - typedef sequence ListOfStrings ; - - struct ComputerEnvironment { - ListOfStrings Module_Root_Dir_Names ; - ListOfStrings Module_Root_Dir_Values ; - } ; - - interface Computer ; - - typedef sequence ListOfComputers ; - - interface Computer { - - boolean ping() ; - - string FullName() ; - - string Alias() ; - - boolean IsAlive() ; - - boolean SshAccess() ; - - boolean RshAccess() ; - - boolean Interactive() ; - - boolean Batch() ; - - string UserName() ; - - Containers::System Os() ; - - long Memory() ; - - long Swap() ; - - long CpuClock() ; - - long NbProc() ; - - long NbNode() ; - - ComputerParameters Parameters() ; - - ComputerEnvironment Environment() ; - - } ; - - interface Manager { - - boolean ping() ; - - boolean SshAccess( in string aHostName ) ; - - string UserName( in string aHostName ) ; - - ListOfComputers AllComputers() ; - - ListOfComputers GetComputers( in Containers::MachineParameters aMachineParameters ) ; - - Computer SelectComputer( in Containers::MachineParameters aMachineParameters ) ; - - Computer GetComputer( in ListOfComputers aListOfComputers ) ; - - Computer SearchComputer( in string aComputerName ) ; - - } ; - -} ; - -#endif -- 2.39.2