summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/AdminI.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2014-09-10 19:09:53 +0000
committerBernard Normier <bernard@zeroc.com>2014-09-10 19:09:53 +0000
commitac587d9f1a6d34e46956fd17c81f99beb7ed97ad (patch)
treefa09b2b2d5b6037c76976ee293eb0d15b7a93717 /cpp/src/IceGrid/AdminI.cpp
parentFix networkProxy test dependencies (diff)
downloadice-ac587d9f1a6d34e46956fd17c81f99beb7ed97ad.tar.bz2
ice-ac587d9f1a6d34e46956fd17c81f99beb7ed97ad.tar.xz
ice-ac587d9f1a6d34e46956fd17c81f99beb7ed97ad.zip
IceGrid::Admin now provides remote access to IceGrid registry and node Admin objects, and icegridadmin uses these
new operations to show the Ice log file for IceGrid registries and IceGrid nodes (ICE-2400)
Diffstat (limited to 'cpp/src/IceGrid/AdminI.cpp')
-rw-r--r--cpp/src/IceGrid/AdminI.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp
index 9f7733b06c5..b6ef3371509 100644
--- a/cpp/src/IceGrid/AdminI.cpp
+++ b/cpp/src/IceGrid/AdminI.cpp
@@ -403,7 +403,7 @@ AdminI::getServerAdminCategory(const Current&) const
return _registry->getServerAdminCategory();
}
-Ice::ObjectPrx
+ObjectPrx
AdminI::getServerAdmin(const string& id, const Current& current) const
{
ServerProxyWrapper proxy(_database, id); // Ensure that the server exists and loaded on the node.
@@ -774,6 +774,20 @@ AdminI::getNodeInfo(const string& name, const Ice::Current&) const
return toNodeInfo(_database->getNode(name)->getInfo());
}
+ObjectPrx
+AdminI::getNodeAdmin(const string& name, const Current& current) const
+{
+ //
+ // Check if the node exists
+ //
+ _database->getNode(name);
+
+ Ice::Identity adminId;
+ adminId.name = name;
+ adminId.category = _registry->getNodeAdminCategory();
+ return current.adapter->createProxy(adminId);
+}
+
bool
AdminI::pingNode(const string& name, const Current&) const
{
@@ -900,6 +914,23 @@ AdminI::getRegistryInfo(const string& name, const Ice::Current&) const
}
}
+ObjectPrx
+AdminI::getRegistryAdmin(const string& name, const Current& current) const
+{
+ if(name != _registry->getName())
+ {
+ //
+ // Check if the replica exists
+ //
+ _database->getReplica(name);
+ }
+
+ Identity adminId;
+ adminId.name = name;
+ adminId.category = _registry->getReplicaAdminCategory();
+ return current.adapter->createProxy(adminId);
+}
+
bool
AdminI::pingRegistry(const string& name, const Current&) const
{