#!/usr/bin/env python import sys from omniORB import CORBA import YalpInterfaces, CosNaming, YalpInterfaces__POA orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) obj = orb.resolve_initial_references("NameService") root_context = obj._narrow(CosNaming.NamingContextExt) if root_context is None: print "Failed to narrow the root naming context" sys.exit(1) name = ("YALP_Server") try: obj = root_context.resolve_str(name) except CosNaming.NamingContext.NotFound, ex: print "Name not found", ex sys.exit(1) blubb = obj._narrow(YalpInterfaces.ServerControlInterface) if blubb is None: print "obj ref is not an dbsfeditf::dependency" sys.exit(1) #pkg = HuhuItf.Package("e17-data","0.16.999.063-1","now","amd64"); mlist = [] mlist.append (YalpInterfaces.VIDEO) mlist.append (YalpInterfaces.SOUND) deps = blubb.search("huhu", mlist) print deps for dep in deps: print dep.name, dep.version