diff options
| author | Nicole Vreden <damba@slartibartfast.traut> | 2010-02-19 20:18:08 +0100 |
|---|---|---|
| committer | Nicole Vreden <damba@slartibartfast.traut> | 2010-02-19 20:18:08 +0100 |
| commit | 47398dbe18e7adb6b6a1493f18fc98247450e798 (patch) | |
| tree | 2a7e26068ce52706055e3eeb9a945af37d88ef34 /src/YalpClients/EflClient/corba_example_mod | |
| parent | 998d09ecda2e86310331a984f8f760de9ef04e50 (diff) | |
| parent | ed22fce7a9f4332037bf0e9fd97a96b1876acba8 (diff) | |
Merge remote branch 'origin/damba' into damba
Diffstat (limited to 'src/YalpClients/EflClient/corba_example_mod')
| -rwxr-xr-x | src/YalpClients/EflClient/corba_example_mod/client.py | 39 | ||||
| -rwxr-xr-x | src/YalpClients/EflClient/corba_example_mod/client.sh | 2 |
2 files changed, 41 insertions, 0 deletions
diff --git a/src/YalpClients/EflClient/corba_example_mod/client.py b/src/YalpClients/EflClient/corba_example_mod/client.py new file mode 100755 index 0000000..ea32ab2 --- /dev/null +++ b/src/YalpClients/EflClient/corba_example_mod/client.py @@ -0,0 +1,39 @@ +#!/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 diff --git a/src/YalpClients/EflClient/corba_example_mod/client.sh b/src/YalpClients/EflClient/corba_example_mod/client.sh new file mode 100755 index 0000000..c88cb1c --- /dev/null +++ b/src/YalpClients/EflClient/corba_example_mod/client.sh @@ -0,0 +1,2 @@ +#!/bin/bash +python2.5 ./client.py -ORBInitRef NameService=corbaloc:iiop:192.168.178.20:1050/NameService |
