Archived

This forum has been archived. Please start a new discussion on GitHub.

How can I list all object in the registry

1)when using the tool 'icepackadmin', there is a command 'object find XXX'.

This need a 'type' specification. But I want to view all objects, not just one type.

I want a command 'type list'!
list all types of registered.

Provided this, I can make a script or tool to administrate all objects.

2)I sugguest that add a wild-cast to 'remove object XXX'.

I am debuging my code, so there are many dead-objects in my
registry, So I want to clean them.

Comments

  • Maybe a workaround

    Hi,

    This isn't what you asked for, but, you can just delete the files in the directory that you stipulate for the ICEPack registry as defined in your config file as IcePack.Registry.Data. That will clear out the registry without causing too much harm I believe and would be equivalent to a remove *.

    Regards,
    Ryan
  • mes
    mes California
    I'm afraid there currently isn't a way to list all of the registered objects. I'll put that on our todo list.

    Take care,
    - Mark
  • I am waiting..

    thanks again
  • How was this progress?
  • ObjectInfoSeq ICE::Admin::getAllObjectInfos(string expr)
    Ice::ObjectPrx base =
        communicator‑>stringToProxy("IceGrid/Registry");
    IceGrid::RegistryPrx registry =
        IceGrid::RegistryPrx::checkedCast(base); 
    string username = ...; 
    string password = ...; 
    IceGrid::AdminSessionPrx session; 
    try { 
        session = registry‑>createAdminSession(username, password); 
        AdminPrx admin = session‑>getAdmin();
        admin->getAllObejctInfos(...);
        // so you can get all object infos
    } catch (const IceGrid::PermissionDeniedException & ex) { 
        cout << "permission denied:\n" << ex.reason << endl; 
    }