summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Parser.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-06-14 16:17:30 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-06-14 16:17:30 +0000
commit70bf2f6e9ec40a437d8181c8c2a9debfde584840 (patch)
tree8a791f73df28b9b55ebcf8d7baf5fa66a8f9f104 /cpp/src/IceGrid/Parser.cpp
parentPort to WinCE (diff)
downloadice-70bf2f6e9ec40a437d8181c8c2a9debfde584840.tar.bz2
ice-70bf2f6e9ec40a437d8181c8c2a9debfde584840.tar.xz
ice-70bf2f6e9ec40a437d8181c8c2a9debfde584840.zip
More fixes
Diffstat (limited to 'cpp/src/IceGrid/Parser.cpp')
-rw-r--r--cpp/src/IceGrid/Parser.cpp41
1 files changed, 32 insertions, 9 deletions
diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp
index cc30c6b9eb4..ee95ccbd916 100644
--- a/cpp/src/IceGrid/Parser.cpp
+++ b/cpp/src/IceGrid/Parser.cpp
@@ -373,14 +373,6 @@ Parser::usage()
"node shutdown NAME Shutdown node NAME.\n"
"\n"
"server list List all registered servers.\n"
- "server add DESC NODE [TARGET ... ] [NAME=VALUE ... ]\n"
- " Add server described in descriptor DESC to the node\n"
- " NODE. If specified the optional targets TARGET will\n"
- " be deployed.\n"
- "server update DESC NODE [TARGET ... ] [NAME=VALUE ... ]\n"
- " Update server described in descriptor DESC on the\n"
- " node NODE. If specified the optional targets TARGET\n"
- " will be deployed.\n"
"server remove NAME Remove server NAME.\n"
"server describe NAME Describe server NAME.\n"
"server state NAME Get server NAME state.\n"
@@ -966,7 +958,13 @@ Parser::instantiateServerTemplate(const list<string>& args)
}
}
- _admin->instantiateServer(application, templ, vars);
+ ApplicationUpdateDescriptor update;
+ update.name = application;
+ InstanceDescriptor desc;
+ desc._cpp_template = templ;
+ desc.parameterValues = vars;
+ update.servers.push_back(desc);
+ _admin->updateApplication(update);
}
catch(const IceXML::ParserException& ex)
{
@@ -1112,6 +1110,31 @@ Parser::listAllNodes()
}
void
+Parser::removeServer(const list<string>& args)
+{
+ if(args.size() != 1)
+ {
+ error("`server start' requires exactly one argument\n(`help' for more info)");
+ return;
+ }
+
+ try
+ {
+ InstanceDescriptor server = _admin->getServerDescriptor(args.front());
+ ApplicationUpdateDescriptor update;
+ update.name = ServerDescriptorPtr::dynamicCast(server.descriptor)->application;
+ update.removeServers.push_back(server.descriptor->name);
+ _admin->updateApplication(update);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ ostringstream s;
+ s << ex;
+ error(s.str());
+ }
+}
+
+void
Parser::startServer(const list<string>& args)
{
if(args.size() != 1)