diff options
| author | Nicole Vreden <damba@mecka.net> | 2010-02-11 20:27:20 +0100 |
|---|---|---|
| committer | Nicole Vreden <damba@mecka.net> | 2010-02-11 20:27:20 +0100 |
| commit | 8d3aa692332e4cb3a8e20e8470e64cc11c7537ed (patch) | |
| tree | 8f46a7c616be223d33efdab30e3b3065c0bf5cc1 | |
| parent | 5ae133fc2ab6ad5e2961f19f2a64c5a2d5942e6a (diff) | |
Modified Corba Example
- doesn't work :-(
Signed-off-by: Nicole Vreden <damba@mecka.net>
| -rwxr-xr-x | src/YalpClients/EflClient/corba_example_mod/client.py | 37 |
1 files changed, 37 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..3939110 --- /dev/null +++ b/src/YalpClients/EflClient/corba_example_mod/client.py @@ -0,0 +1,37 @@ +#!/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.NamingContext) + +if root_context is None: + print "Failed to narrow the root naming context" + sys.exit(1) + +name = CosNaming.NameComponent("Yalp_Server") + +try: + obj = root_context.resolve(name) + +except CosNaming.NamingContext.NotFound, ex: + print "Name not found" + 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 = YalpInterfaces.MediaTypes.VIDEO +deps = ServerControlInterface.search("huhu", mlist, results, error) + +for dep in deps: + print dep.name, dep.version |
