summaryrefslogtreecommitdiff
path: root/cpp/config/IcePackAdmin.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2002-07-22 18:27:40 +0000
committerBenoit Foucher <benoit@zeroc.com>2002-07-22 18:27:40 +0000
commitf8ad6db815b1584bd55b8e56c2e8d1bd5cc66279 (patch)
tree394a626cf81c18d96d8c3efa9da325133080ff14 /cpp/config/IcePackAdmin.py
parentFixed null dereference caused by silly typo in exception action. (diff)
downloadice-f8ad6db815b1584bd55b8e56c2e8d1bd5cc66279.tar.bz2
ice-f8ad6db815b1584bd55b8e56c2e8d1bd5cc66279.tar.xz
ice-f8ad6db815b1584bd55b8e56c2e8d1bd5cc66279.zip
Initial IcePack deployment implementation.
Diffstat (limited to 'cpp/config/IcePackAdmin.py')
-rw-r--r--cpp/config/IcePackAdmin.py33
1 files changed, 25 insertions, 8 deletions
diff --git a/cpp/config/IcePackAdmin.py b/cpp/config/IcePackAdmin.py
index 4d60bddc9ff..3bf2c475c4c 100644
--- a/cpp/config/IcePackAdmin.py
+++ b/cpp/config/IcePackAdmin.py
@@ -13,7 +13,7 @@ import sys, os, TestUtil
icePackPort = "0";
-def startIcePack(toplevel, port):
+def startIcePack(toplevel, port, testdir):
global icePackPort
@@ -24,11 +24,12 @@ def startIcePack(toplevel, port):
icePack = os.path.join(toplevel, "bin", "icepack")
print "starting icepack...",
- command = icePack + options + ' --nowarn' + \
+ command = icePack + options + ' --nowarn ' + \
r' --IcePack.Locator.Endpoints="default -p ' + icePackPort + ' -t 5000" ' + \
r' --IcePack.LocatorRegistry.Endpoints=default' + \
- r' --IcePack.Admin.Endpoints=default'
-
+ r' --IcePack.Admin.Endpoints=default' + \
+ r' --IcePack.Data=' + os.path.join(testdir, "db")
+
icePackPipe = os.popen(command)
TestUtil.getServerPid(icePackPipe)
TestUtil.getAdapterReady(icePackPipe)
@@ -58,7 +59,25 @@ def shutdownIcePack(toplevel, icePackPipe):
sys.exit(1)
-def addServer(toplevel, name, server, serverPwd, serverOptions, serverAdapters):
+def addServer(toplevel, name, server, libpath, serverDescriptor):
+
+ global icePackPort
+ icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
+
+ options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
+
+ command = icePackAdmin + options + \
+ r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' -e "server add \"' + name + '\\" \\"' + server + '\\" ' + \
+ r' \"' + libpath + '\\" ' + serverDescriptor + '\"'
+
+ icePackAdminPipe = os.popen(command)
+ icePackAdminStatus = icePackAdminPipe.close()
+ if icePackAdminStatus:
+ TestUtil.killServers()
+ sys.exit(1)
+
+def removeServer(toplevel, name):
global icePackPort
icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
@@ -67,9 +86,7 @@ def addServer(toplevel, name, server, serverPwd, serverOptions, serverAdapters):
command = icePackAdmin + options + \
r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
- r' -e "server add \"' + name + '\\" \\"' + server + '\\" ' + serverPwd + \
- r' options { ' + serverOptions + ' } ' + \
- r' adapters {' + serverAdapters + ' } \" '
+ r' -e "server remove \"' + name + '\\" \"'
icePackAdminPipe = os.popen(command)
icePackAdminStatus = icePackAdminPipe.close()