20 import omniORB.CORBA
as CORBA
40 "NameService=corbaname::",
41 "-ORBclientCallTimeOutPeriod",
43 arg[1] = arg[1] + name_server
44 self.
orb = CORBA.ORB_init(arg)
45 obj = self.
orb.resolve_initial_references(
"NameService")
46 self.
root_cxt = obj._narrow(CosNaming.NamingContext)
60 cur_cxt = cxt.list(100)
68 cur_obj = cxt.resolve(bc.binding_name)
69 dict_key = bc.binding_name[0].id \
71 + bc.binding_name[0].kind
72 if bc.binding_type == CosNaming.ncontext:
76 "id":bc.binding_name[0].id,
77 "kind":bc.binding_name[0].kind,
78 "bname":bc.binding_name
81 elif bc.binding_type == CosNaming.nobject:
82 ns_dict[dict_key] = (cur_obj,
None)
86 "id":bc.binding_name[0].id,
87 "kind":bc.binding_name[0].kind,
88 "bname":bc.binding_name
105 if __name__ ==
'__main__':
108 if len(sys.argv) == 1:
109 print sys.argv[0] +
" [CosNameService Host Name]" 112 nsh.Connect(sys.argv[1])
113 print nsh.GetNSDict()
def DeleteToContext(self, cxt, bname)
def Connect(self, name_server)
def __GetNameTreeRecursive__(self, cxt)