Search in sources :

Example 11 with ContainerInfo

use of si.ijs.maci.ContainerInfo in project ACS by ACS-Community.

the class ContainerHandleTest method testContainerHandles.

public void testContainerHandles() throws Throwable {
    String managerRef = AcsLocations.figureOutManagerLocation();
    m_logger.info("Using manager reference: " + managerRef);
    org.omg.CORBA.Object mgrObj = acsCorba.getORB().string_to_object(managerRef);
    Manager manager = ManagerHelper.narrow(mgrObj);
    m_logger.info("Manager reference resolved and narrowed.");
    final int MANAGER_HANDLE = 0x05555555;
    m_logger.info("Querying manager for container info.");
    ContainerInfo[] infos = manager.get_container_info(MANAGER_HANDLE, new int[0], "*");
    m_logger.info("Got infos from " + infos.length + " container(s).");
    for (ContainerInfo info : infos) {
        try {
            int h = info.reference.get_handle();
            m_logger.info("Manager reported handle 0x" + Integer.toHexString(info.h) + ", get_handle() returned 0x" + Integer.toHexString(h));
            assertEquals(info.name + " handle mismatch.", info.h, h);
        } catch (Throwable th) {
            m_logger.info("get_handle() call failed for container with handle 0x" + Integer.toHexString(info.h));
        }
    }
}
Also used : ContainerInfo(si.ijs.maci.ContainerInfo) ClientLogManager(alma.acs.logging.ClientLogManager) Manager(si.ijs.maci.Manager)

Aggregations

ContainerInfo (si.ijs.maci.ContainerInfo)11 ClientInfo (si.ijs.maci.ClientInfo)8 ComponentInfo (si.ijs.maci.ComponentInfo)8 Manager (si.ijs.maci.Manager)3 LoggingConfigurableOperations (alma.Logging.LoggingConfigurableOperations)1 GuiMaciSupervisor (alma.acs.commandcenter.meta.GuiMaciSupervisor)1 IMaciSupervisor (alma.acs.commandcenter.meta.IMaciSupervisor)1 FolderInfo (alma.acs.commandcenter.meta.MaciInfo.FolderInfo)1 InfoDetail (alma.acs.commandcenter.meta.MaciInfo.InfoDetail)1 SortingTreeNode (alma.acs.commandcenter.meta.MaciInfo.SortingTreeNode)1 MaciSupervisor (alma.acs.commandcenter.meta.MaciSupervisor)1 LogPaneNotFoundException (alma.acs.gui.loglevel.LogPaneNotFoundException)1 LogLevelSelectorPanel (alma.acs.gui.loglevel.leveldlg.LogLevelSelectorPanel)1 TreeContainerInfo (alma.acs.gui.loglevel.tree.node.TreeContainerInfo)1 ClientLogManager (alma.acs.logging.ClientLogManager)1 NoPermissionEx (alma.maciErrType.NoPermissionEx)1 AcsJNoPermissionEx (alma.maciErrType.wrappers.AcsJNoPermissionEx)1 BadParametersException (com.cosylab.acs.maci.BadParametersException)1 CoreException (com.cosylab.acs.maci.CoreException)1 NoResourcesException (com.cosylab.acs.maci.NoResourcesException)1