Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-15-2007
rlimberger rlimberger is offline
Registered User
 
Name: rene limberger
Organization: imageworks
Project: netrender
 
Join Date: Feb 2007
Posts: 5
IceGrid::Admin & Python

I would like to write some tools (cmdline and/or GUI) to monitor a registry. I would like to use Python if possible.

Are there some examples i could use as a starting point to do this? My understanding is that is somehow need to use the IceGrid::Admin function set, right? How do i do that from python?

thanks a lot,
-r
Reply With Quote
  #2 (permalink)  
Old 06-15-2007
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
Hi,

You need to establish a session with the registry to obtain a proxy for the IceGrid::Admin interface. The session will also allow you to register observers to receive updates from the IceGrid registry and nodes.

Here's how to create an IceGrid admin session and get the admin proxy with Python and IcePy:

Code:
#!/usr/bin/env python
import sys, Ice, IceGrid

communicator = Ice.initialize(sys.argv)
registry = IceGrid.RegistryPrx.uncheckedCast(communicator.stringToProxy("DemoIceGrid/Registry"))

session = registry.createAdminSession("user", "passord")
admin = session.getAdmin()

print admin.getAllServerIds()

session.destroy()
communicator.destroy()
You'll need to pass the appropriate --Ice.Defaut.Locator=<proxy of the locator> command line option to execute this script.

Cheers,
Benoit.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem keeping IceGrid::Admin session alive borax00 Help Center 2 05-03-2007 04:55 AM
IceGrid Admin Proxy Greenhippo Help Center 1 03-31-2007 12:01 AM
Starting servers with IceGrid::Admin borax00 Help Center 2 03-19-2007 12:00 AM
I can't find ICEGrid GUI Admin tool mic_lee2000 Help Center 4 11-25-2006 08:16 AM
IceGrid 3.0 Admin migration brian Help Center 3 12-15-2005 04:51 AM


All times are GMT -4. The time now is 12:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.