summaryrefslogtreecommitdiff
path: root/java/config/IcePackAdmin.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2002-08-09 14:47:51 +0000
committerBenoit Foucher <benoit@zeroc.com>2002-08-09 14:47:51 +0000
commit8774379a65a2f03c22bd57a9f601ca2d65921acf (patch)
treeed4e80924ed87bacc30e9140470735d5eee5ef78 /java/config/IcePackAdmin.py
parentAdded new IcePack test suite, add IcePack tracing properties, added IcePack (diff)
downloadice-8774379a65a2f03c22bd57a9f601ca2d65921acf.tar.bz2
ice-8774379a65a2f03c22bd57a9f601ca2d65921acf.tar.xz
ice-8774379a65a2f03c22bd57a9f601ca2d65921acf.zip
Added Ice application shutdown hook. Fixed IceBox to use Ice Application.
Added new IcePack deployer test suite.
Diffstat (limited to 'java/config/IcePackAdmin.py')
-rw-r--r--java/config/IcePackAdmin.py54
1 files changed, 47 insertions, 7 deletions
diff --git a/java/config/IcePackAdmin.py b/java/config/IcePackAdmin.py
index d6a00bab4f3..1ecd20231ce 100644
--- a/java/config/IcePackAdmin.py
+++ b/java/config/IcePackAdmin.py
@@ -28,10 +28,17 @@ def startIcePack(toplevel, port, testdir):
r' --IcePack.Locator.Endpoints="default -p ' + icePackPort + ' -t 5000" ' + \
r' --IcePack.LocatorRegistry.Endpoints=default' + \
r' --IcePack.Admin.Endpoints=default' + \
- r' --IcePack.Data=' + os.path.join(testdir, "data")
+ r' --IcePack.Yellow.Query=Yellow/Query@YellowQueryAdapter' + \
+ r' --IcePack.Yellow.Admin=Yellow/Admin@YellowAdminAdapter' + \
+ r' --IcePack.Data=' + os.path.join(testdir, "db") + \
+ r' --Ice.ProgramName=icepack' + \
+ r' --IcePack.Trace.Activator=0 --IcePack.Trace.AdapterManager=0 --IcePack.Trace.ServerManager=0'
icePackPipe = os.popen(command)
TestUtil.getServerPid(icePackPipe)
+ TestUtil.getServerPid(icePackPipe)
+ TestUtil.getAdapterReady(icePackPipe)
+ TestUtil.getAdapterReady(icePackPipe)
TestUtil.getAdapterReady(icePackPipe)
TestUtil.getAdapterReady(icePackPipe)
print "ok"
@@ -46,7 +53,7 @@ def shutdownIcePack(toplevel, icePackPipe):
print "shutting down icepack...",
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "shutdown" '
icePackAdminPipe = os.popen(command)
@@ -58,6 +65,39 @@ def shutdownIcePack(toplevel, icePackPipe):
TestUtil.killServers()
sys.exit(1)
+def addApplication(toplevel, descriptor, targets):
+
+ 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 "application add \"' + descriptor + '\\" ' + targets + ' \"'
+
+ icePackAdminPipe = os.popen(command)
+ icePackAdminStatus = icePackAdminPipe.close()
+ if icePackAdminStatus:
+ TestUtil.killServers()
+ sys.exit(1)
+
+def removeApplication(toplevel, descriptor):
+
+ 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 "application remove \"' + descriptor + '\\" \"'
+
+ icePackAdminPipe = os.popen(command)
+ icePackAdminStatus = icePackAdminPipe.close()
+ if icePackAdminStatus:
+ TestUtil.killServers()
+ sys.exit(1)
def addServer(toplevel, name, serverDescriptor, server, libpath, targets):
@@ -67,7 +107,7 @@ def addServer(toplevel, name, serverDescriptor, server, libpath, targets):
options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server add \"' + name + '\\" \\"' + serverDescriptor + '\\" ' + \
r' \"' + server + '\\" \\"' + libpath + '\\" ' + targets + '\"'
@@ -85,7 +125,7 @@ def removeServer(toplevel, name):
options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server remove \"' + name + '\\" \"'
icePackAdminPipe = os.popen(command)
@@ -101,7 +141,7 @@ def startServer(toplevel, name):
options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server start \"' + name + '\\""'
icePackAdminPipe = os.popen(command)
@@ -117,7 +157,7 @@ def listAdapters(toplevel):
options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "adapter list"'
icePackAdminPipe = os.popen(command)
@@ -131,7 +171,7 @@ def removeAdapter(toplevel, name):
options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "adapter remove \"' + name + '\\""'
icePackAdminPipe = os.popen(command)