blob: b6eff0ae6f055215af497973f7c99512d55d71bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/usr/bin/env python
import sys
from omniORB import CORBA
import HuhuItf, CosNaming
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("huhu", "project"),
CosNaming.NameComponent("blubb", "object")]
try:
obj = root_context.resolve(name)
except CosNaming.NamingContext.NotFound, ex:
print "Name not found"
sys.exit(1)
blubb = obj._narrow(HuhuItf.Blubb)
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");
deps = blubb.get_something(pkg)
for dep in deps:
print dep.name, dep.version
|