Ejemplo n.º 1
0
 def _get_interface(self):
     omniORB.importIRStubs() # Make sure IR stubs are loaded
     ir = omniORB.orb.resolve_initial_references("InterfaceRepository")
     ir = ir._narrow(CORBA.Repository)
     if ir is None:
         raise CORBA.INTF_REPOS(omniORB.INTF_REPOS_NotAvailable,
                                CORBA.COMPLETED_NO)
     interf = ir.lookup_id(self._NP_RepositoryId)
     return interf._narrow(CORBA.InterfaceDef)
Ejemplo n.º 2
0
 def _get_interface(self):
     omniORB.importIRStubs() # Make sure IR stubs are loaded
     ir = omniORB.orb.resolve_initial_references("InterfaceRepository")
     ir = ir._narrow(CORBA.Repository)
     if ir is None:
         raise CORBA.INTF_REPOS(omniORB.INTF_REPOS_NotAvailable,
                                CORBA.COMPLETED_NO)
     interf = ir.lookup_id(self._NP_RepositoryId)
     return interf._narrow(CORBA.InterfaceDef)
Ejemplo n.º 3
0
    def _get_value_def(self):
        import omniORB
        if omniORB.orb is None:
            raise BAD_INV_ORDER(omniORB.BAD_INV_ORDER_ORBHasShutdown,
                                COMPLETED_NO)

        omniORB.importIRStubs()

        ir = omniORB.orb.resolve_initial_references("InterfaceRepository")
        ir = ir and ir._narrow(Repository)
        if ir is None:
            raise INTF_REPOS(omniORB.INTF_REPOS_NotAvailable, COMPLETED_NO)
        interf = ir.lookup_id(self._NP_RepositoryId)
        return interf._narrow(ValueDef)
Ejemplo n.º 4
0
    def _get_value_def(self):
        import omniORB
        if omniORB.orb is None:
            raise BAD_INV_ORDER(omniORB.BAD_INV_ORDER_ORBHasShutdown,
                                COMPLETED_NO)

        omniORB.importIRStubs()

        ir = omniORB.orb.resolve_initial_references("InterfaceRepository")
        ir = ir and ir._narrow(Repository)
        if ir is None:
            raise INTF_REPOS(omniORB.INTF_REPOS_NotAvailable, COMPLETED_NO)
        interf = ir.lookup_id(self._NP_RepositoryId)
        return interf._narrow(ValueDef)
Ejemplo n.º 5
0
    def _get_interface(self):
        if omniORB.orb is None:
            raise BAD_INV_ORDER(omniORB.BAD_INV_ORDER_ORBHasShutdown,
                                COMPLETED_NO)

        omniORB.importIRStubs()

        try:
            return self._obj.invoke("_interface", _d_Object_interface, ())
        except Exception:
            pass

        ir = omniORB.orb.resolve_initial_references("InterfaceRepository")
        ir = ir and ir._narrow(Repository)
        if ir is None:
            raise INTF_REPOS(omniORB.INTF_REPOS_NotAvailable, COMPLETED_NO)
        interf = ir.lookup_id(self._NP_RepositoryId)
        return interf._narrow(InterfaceDef)
Ejemplo n.º 6
0
    def _get_interface(self):
        if omniORB.orb is None:
            raise BAD_INV_ORDER(omniORB.BAD_INV_ORDER_ORBHasShutdown,
                                COMPLETED_NO)

        omniORB.importIRStubs()

        try:
            return self._obj.invoke("_interface", _d_Object_interface, ())
        except Exception:
            pass

        ir = omniORB.orb.resolve_initial_references("InterfaceRepository")
        ir = ir and ir._narrow(Repository)
        if ir is None:
            raise INTF_REPOS(omniORB.INTF_REPOS_NotAvailable, COMPLETED_NO)
        interf = ir.lookup_id(self._NP_RepositoryId)
        return interf._narrow(InterfaceDef)
Ejemplo n.º 7
0
#! /usr/bin/env python

import sys, os, os.path
import getopt
import string
import omniORB
from omniORB import CORBA, PortableServer
import CosNaming

omniORB.importIRStubs()

##
## Global variables
##

#global orb,ifr
#orb=None
#ifr=None

wrapThreshold = 2


def reference(tc):
    """Render a reference to type tc (?? - ignores context)."""
    kind = tc.kind()
    if (kind == CORBA.tk_objref or kind == CORBA.tk_struct
            or kind == CORBA.tk_union or kind == CORBA.tk_enum
            or kind == CORBA.tk_alias or kind == CORBA.tk_except):
        return tc.name()
    elif (kind == CORBA.tk_void or kind == CORBA.tk_short
          or kind == CORBA.tk_long or kind == CORBA.tk_float
Ejemplo n.º 8
0
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
#
# "@(#) $Id: acsstartupTestLoadIFR.py,v 1.3 2009/06/26 05:55:22 hyatagai Exp $"
#
# who       when      what
# --------  --------  ----------------------------------------------
# arne  2008-02-19  created
#

from __future__ import with_statement
import os
import omniORB
import CORBA

omniORB.importIRStubs()

fname = "%s/ACS_INSTANCE.%s/iors/InterfaceRepositoryIOR" % (os.environ['ACS_TMP'], os.environ['ACS_INSTANCE'])

with open(fname,'r') as ior :
    
    print "Retrieving IR object..."
    orb = CORBA.ORB_init()
    obj = orb.string_to_object(ior.read())
    IR = obj._narrow(CORBA.Repository)

    print "Looking up Container Interface..."
    interf = IR.lookup_id('IDL:ijs.si/maci/Container:1.0')
    print "Interface is: ", interf

#
Ejemplo n.º 9
0
import os
#--CORBA STUBS-----------------------------------------------------------------
from omniORB import CORBA
from omniORB import importIRStubs
from omniORB import installTransientExceptionHandler
import maci__POA
import maci
from maci import Manager
from maci import AuthenticationData
import CosNotifyChannelAdmin
import CDB
import ACSLog
import CosNaming

#This only needs to be done once for omniORB
importIRStubs()
#--ACS Imports-----------------------------------------------------------------
from AcsutilPy.ACSPorts import getIP
from AcsutilPy.ACSPorts import getManagerPort
from AcsutilPy.ACSPorts import getLogPort
from AcsutilPy.ACSPorts import getNamingServicePort
from AcsutilPy.ACSPorts import getCDBPort
from AcsutilPy.ACSPorts import getIRPort
from AcsutilPy.ACSPorts import getNotifyServicePort
from Acspy.Common.TimeHelper import getTimeStamp
#--GLOBALS---------------------------------------------------------------------
ORB = None
POA_ROOT = None
POA_MANAGER = None
MGR_CORBALOC = None
MGR_REF = None
Ejemplo n.º 10
0
# --CORBA STUBS-----------------------------------------------------------------
from omniORB import CORBA
from omniORB import importIRStubs
from omniORB import installTransientExceptionHandler
import maci__POA
import maci
from maci import Manager
from maci import AuthenticationData
import CosNotifyChannelAdmin
import CDB
import ACSLog
import CosNaming

# This only needs to be done once for omniORB
importIRStubs()
# --ACS Imports-----------------------------------------------------------------
from AcsutilPy.ACSPorts import getIP
from AcsutilPy.ACSPorts import getManagerPort
from AcsutilPy.ACSPorts import getLogPort
from AcsutilPy.ACSPorts import getNamingServicePort
from AcsutilPy.ACSPorts import getCDBPort
from AcsutilPy.ACSPorts import getIRPort
from AcsutilPy.ACSPorts import getNotifyServicePort
from Acspy.Common.TimeHelper import getTimeStamp

# --GLOBALS---------------------------------------------------------------------
ORB = None
POA_ROOT = None
POA_MANAGER = None
MGR_CORBALOC = None